0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-27 03:03:01 +00:00

fix recursive error

This commit is contained in:
remitamine 2015-07-17 14:52:01 +01:00
parent d1cc05e17e
commit 36dbca8784

View file

@ -26,7 +26,7 @@ def _real_extract(self, url):
video_id = self._match_id(url) video_id = self._match_id(url)
return { return {
'_type': 'url', '_type': 'url',
'ie-key': 'GoogleDrive', 'ie_key': 'GoogleDrive',
'url': 'https://drive.google.com/file/d/%s' % video_id 'url': 'https://drive.google.com/file/d/%s' % video_id
} }
@ -66,34 +66,34 @@ def _real_extract(self, url):
) )
try: try:
title = self._html_search_regex( title = self._html_search_regex(
r'"title"\s+,\s+"[^"]+', r'"title"\s*,\s*"([^"]+)',
webpage, webpage,
'title' 'title'
) )
fmt_stream_map = self._html_search_regex( fmt_stream_map = self._html_search_regex(
r'"fmt_stream_map"\s+,\s+"[^"]+', r'"fmt_stream_map"\s*,\s*"([^"]+)',
webpage, webpage,
'fmt_stream_map' 'fmt_stream_map'
) )
fmt_list = self._html_search_regex( fmt_list = self._html_search_regex(
r'"fmt_list"\s+,\s+"[^"]+', r'"fmt_list"\s*,\s*"([^"]+)',
webpage, webpage,
'fmt_list' 'fmt_list'
) )
# timestamp = self._html_search_regex( # timestamp = self._html_search_regex(
# r'"timestamp"\s+,\s+"[^"]+', # r'"timestamp"\s*,\s*"([^"]+)',
# webpage, # webpage,
# 'timestamp' # 'timestamp'
# ) # )
length_seconds = self._html_search_regex( length_seconds = self._html_search_regex(
r'"length_seconds"\s+,\s+"[^"]+', r'"length_seconds"\s*,\s*"([^"]+)',
webpage, webpage,
'length_seconds' 'length_seconds'
) )
except RegexNotFoundError: except RegexNotFoundError:
try: try:
reason = self._html_search_regex( reason = self._html_search_regex(
r'"reason","[^"]+', r'"reason","([^"]+)',
webpage, webpage,
'reason' 'reason'
) )