From aa97faf6e4a800dcb85dd67f1d3b51f3b59db885 Mon Sep 17 00:00:00 2001 From: "J.Luis" Date: Thu, 27 Mar 2025 23:32:45 +0100 Subject: [PATCH] [ivoox] Style changes --- yt_dlp/extractor/ivoox.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/yt_dlp/extractor/ivoox.py b/yt_dlp/extractor/ivoox.py index c001b4018e..e482603f88 100644 --- a/yt_dlp/extractor/ivoox.py +++ b/yt_dlp/extractor/ivoox.py @@ -1,11 +1,11 @@ +import datetime + from .common import InfoExtractor -from datetime import datetime -import json class IvooxIE(InfoExtractor): _VALID_URL = ( r'https?://(?:www\.)?ivoox\.com/.*_rf_(?P[0-9]+)_1\.html', - r'https?://go\.ivoox\.com/rf/(?P[0-9]+)' + r'https?://go\.ivoox\.com/rf/(?P[0-9]+)', ) _TESTS = [ { @@ -19,7 +19,7 @@ class IvooxIE(InfoExtractor): 'author': 'Santiago Camacho', 'channel': 'DIAS EXTRAÑOS con Santiago Camacho', 'title': 'DEx 08x30 Rostros del mal: Los asesinos en serie que aterrorizaron España', - } + }, }, { 'url': 'https://go.ivoox.com/rf/143594959', @@ -32,7 +32,7 @@ class IvooxIE(InfoExtractor): 'author': 'Santiago Camacho', 'channel': 'DIAS EXTRAÑOS con Santiago Camacho', 'title': 'DEx 08x30 Rostros del mal: Los asesinos en serie que aterrorizaron España', - } + }, }, ] @@ -41,8 +41,8 @@ class IvooxIE(InfoExtractor): webpage = self._download_webpage(url, media_id) # Extract the podcast info - date = datetime.fromisoformat(self._html_search_regex(r'data-prm-pubdate="(.+?)"', webpage, 'title')) - timestamp = int(datetime.timestamp(date)) + date = datetime.datetime.fromisoformat(self._html_search_regex(r'data-prm-pubdate="(.+?)"', webpage, 'title')) + timestamp = int(datetime.datetime.timestamp(date)) author = self._html_search_regex(r'data-prm-author="(.+?)"', webpage, 'title') podcast = self._html_search_regex(r'data-prm-podname="(.+?)"', webpage, 'title') title = self._html_search_regex(r'data-prm-title="(.+?)"', webpage, 'title') @@ -53,7 +53,7 @@ class IvooxIE(InfoExtractor): 'Accept-Encoding': 'identity', 'Origin': 'https://www.ivoox.com', 'Referer': 'https://www.ivoox.com/', - 'Priority': 'u=1, i' + 'Priority': 'u=1, i', } metadata_url = f'https://vcore-web.ivoox.com/v1/public/audios/{media_id}/download-url' download_json = self._download_json(metadata_url, media_id, headers=headers) @@ -66,8 +66,8 @@ class IvooxIE(InfoExtractor): 'url': url, 'ext': 'mp3', 'format_id': 'mp3_default', - 'http_headers': headers - } + 'http_headers': headers, + }, ] return { @@ -78,4 +78,4 @@ class IvooxIE(InfoExtractor): 'timestamp': timestamp, 'description': self._og_search_description(webpage), 'formats': formats, - } \ No newline at end of file + }