projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[tumblr] Add support for pornhub embeds (Closes #5963)
[youtube-dl]
/
youtube_dl
/
extractor
/
common.py
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index 981e34bc7ccce5a87b2ec518efaa016afbd27002..49e4dc7109e151ae124ed1aac15a9762d00eac21 100644
(file)
--- a/
youtube_dl/extractor/common.py
+++ b/
youtube_dl/extractor/common.py
@@
-786,8
+786,8
@@
class InfoExtractor(object):
return True
except ExtractorError as e:
if isinstance(e.cause, compat_HTTPError):
return True
except ExtractorError as e:
if isinstance(e.cause, compat_HTTPError):
- self.
report_warning
(
- '%s
URL is invalid, skipping' % item, video_id
)
+ self.
to_screen
(
+ '%s
: %s URL is invalid, skipping' % (video_id, item)
)
return False
raise
return False
raise
@@
-846,7
+846,7
@@
class InfoExtractor(object):
def _extract_m3u8_formats(self, m3u8_url, video_id, ext=None,
entry_protocol='m3u8', preference=None,
def _extract_m3u8_formats(self, m3u8_url, video_id, ext=None,
entry_protocol='m3u8', preference=None,
- m3u8_id=None):
+ m3u8_id=None
, note=None, errnote=None
):
formats = [{
'format_id': '-'.join(filter(None, [m3u8_id, 'meta'])),
formats = [{
'format_id': '-'.join(filter(None, [m3u8_id, 'meta'])),
@@
-865,8
+865,8
@@
class InfoExtractor(object):
m3u8_doc = self._download_webpage(
m3u8_url, video_id,
m3u8_doc = self._download_webpage(
m3u8_url, video_id,
- note='Downloading m3u8 information',
- errnote='Failed to download m3u8 information')
+ note=
note or
'Downloading m3u8 information',
+ errnote=
errnote or
'Failed to download m3u8 information')
last_info = None
last_media = None
kv_rex = re.compile(
last_info = None
last_media = None
kv_rex = re.compile(
@@
-1072,9
+1072,6
@@
class InfoExtractor(object):
def _get_automatic_captions(self, *args, **kwargs):
raise NotImplementedError("This method must be implemented by subclasses")
def _get_automatic_captions(self, *args, **kwargs):
raise NotImplementedError("This method must be implemented by subclasses")
- def _subtitles_timecode(self, seconds):
- return '%02d:%02d:%02d.%03d' % (seconds / 3600, (seconds % 3600) / 60, seconds % 60, (seconds % 1) * 1000)
-
class SearchInfoExtractor(InfoExtractor):
"""
class SearchInfoExtractor(InfoExtractor):
"""