aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/yahoo.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-06-27 01:25:17 +0800
committerJesús <heckyel@hyperbola.info>2022-06-27 01:25:17 +0800
commit16e8548f6a720a78679e417a20a300db2036bf6c (patch)
treeb1247bca3417ce882e4a4d80213f41c20113c1a4 /yt_dlp/extractor/yahoo.py
parent4bbf329feb5a820ac21269fa426c95ca14d7af25 (diff)
parente08f72e6759fb6b1102521f0bdb9457038ef7c06 (diff)
downloadhypervideo-pre-16e8548f6a720a78679e417a20a300db2036bf6c.tar.lz
hypervideo-pre-16e8548f6a720a78679e417a20a300db2036bf6c.tar.xz
hypervideo-pre-16e8548f6a720a78679e417a20a300db2036bf6c.zip
updated from upstream | 27/06/2022 at 01:25
Diffstat (limited to 'yt_dlp/extractor/yahoo.py')
-rw-r--r--yt_dlp/extractor/yahoo.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/yt_dlp/extractor/yahoo.py b/yt_dlp/extractor/yahoo.py
index 3fe6192bf..8811df6d8 100644
--- a/yt_dlp/extractor/yahoo.py
+++ b/yt_dlp/extractor/yahoo.py
@@ -1,15 +1,15 @@
import hashlib
import itertools
import re
+import urllib.parse
+from .brightcove import BrightcoveNewIE
from .common import InfoExtractor, SearchInfoExtractor
-from ..compat import (
- compat_str,
- compat_urllib_parse,
-)
+from .youtube import YoutubeIE
+from ..compat import compat_str
from ..utils import (
- clean_html,
ExtractorError,
+ clean_html,
int_or_none,
mimetype2ext,
parse_iso8601,
@@ -18,9 +18,6 @@ from ..utils import (
url_or_none,
)
-from .brightcove import BrightcoveNewIE
-from .youtube import YoutubeIE
-
class YahooIE(InfoExtractor):
IE_DESC = 'Yahoo screen and movies'
@@ -333,7 +330,7 @@ class YahooSearchIE(SearchInfoExtractor):
def _search_results(self, query):
for pagenum in itertools.count(0):
- result_url = 'http://video.search.yahoo.com/search/?p=%s&fr=screen&o=js&gs=0&b=%d' % (compat_urllib_parse.quote_plus(query), pagenum * 30)
+ result_url = 'http://video.search.yahoo.com/search/?p=%s&fr=screen&o=js&gs=0&b=%d' % (urllib.parse.quote_plus(query), pagenum * 30)
info = self._download_json(result_url, query,
note='Downloading results page ' + str(pagenum + 1))
yield from (self.url_result(result['rurl']) for result in info['results'])
@@ -434,7 +431,7 @@ class YahooGyaOIE(InfoExtractor):
page = 1
while True:
playlist = self._download_json(
- f'https://gyao.yahoo.co.jp/api/programs/{program_id}/videos?page={page}', program_id,
+ f'https://gyao.yahoo.co.jp/api/programs/{program_id}/videos?page={page}&serviceId=gy', program_id,
note=f'Downloading JSON metadata page {page}')
if not playlist:
break