projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[facebook] Add support for plugin video embeds and multiple embeds (closes #13493)
[youtube-dl]
/
youtube_dl
/
extractor
/
fourtube.py
diff --git
a/youtube_dl/extractor/fourtube.py
b/youtube_dl/extractor/fourtube.py
index fc4a5a0fbf01801d598e20a9addd29ebef4a298e..e3fd08bcfb6610b3394d2309e45f743e8562c97b 100644
(file)
--- a/
youtube_dl/extractor/fourtube.py
+++ b/
youtube_dl/extractor/fourtube.py
@@
-43,14
+43,14
@@
class FourTubeIE(InfoExtractor):
'uploadDate', webpage))
thumbnail = self._html_search_meta('thumbnailUrl', webpage)
uploader_id = self._html_search_regex(
'uploadDate', webpage))
thumbnail = self._html_search_meta('thumbnailUrl', webpage)
uploader_id = self._html_search_regex(
- r'<a class="i
mg-avatar
" href="[^"]+/channels/([^/"]+)" title="Go to [^"]+ page">',
+ r'<a class="i
tem-to-subscribe
" href="[^"]+/channels/([^/"]+)" title="Go to [^"]+ page">',
webpage, 'uploader id', fatal=False)
uploader = self._html_search_regex(
webpage, 'uploader id', fatal=False)
uploader = self._html_search_regex(
- r'<a class="i
mg-avatar
" href="[^"]+/channels/[^/"]+" title="Go to ([^"]+) page">',
+ r'<a class="i
tem-to-subscribe
" href="[^"]+/channels/[^/"]+" title="Go to ([^"]+) page">',
webpage, 'uploader', fatal=False)
categories_html = self._search_regex(
webpage, 'uploader', fatal=False)
categories_html = self._search_regex(
- r'(?s)><i class="icon icon-tag"></i>\s*Categories / Tags\s*.*?<ul class="
list
">(.*?)</ul>',
+ r'(?s)><i class="icon icon-tag"></i>\s*Categories / Tags\s*.*?<ul class="
[^"]*?list[^"]*?
">(.*?)</ul>',
webpage, 'categories', fatal=False)
categories = None
if categories_html:
webpage, 'categories', fatal=False)
categories = None
if categories_html:
@@
-59,10
+59,10
@@
class FourTubeIE(InfoExtractor):
r'(?s)<li><a.*?>(.*?)</a>', categories_html)]
view_count = str_to_int(self._search_regex(
r'(?s)<li><a.*?>(.*?)</a>', categories_html)]
view_count = str_to_int(self._search_regex(
- r'<meta
itemprop="interactionCount"
content="UserPlays:([0-9,]+)">',
+ r'<meta
[^>]+itemprop="interactionCount"[^>]+
content="UserPlays:([0-9,]+)">',
webpage, 'view count', fatal=False))
like_count = str_to_int(self._search_regex(
webpage, 'view count', fatal=False))
like_count = str_to_int(self._search_regex(
- r'<meta
itemprop="interactionCount"
content="UserLikes:([0-9,]+)">',
+ r'<meta
[^>]+itemprop="interactionCount"[^>]+
content="UserLikes:([0-9,]+)">',
webpage, 'like count', fatal=False))
duration = parse_duration(self._html_search_meta('duration', webpage))
webpage, 'like count', fatal=False))
duration = parse_duration(self._html_search_meta('duration', webpage))
@@
-85,11
+85,11
@@
class FourTubeIE(InfoExtractor):
media_id = params[0]
sources = ['%s' % p for p in params[2]]
media_id = params[0]
sources = ['%s' % p for p in params[2]]
- token_url = 'http
://tkn.4tube
.com/{0}/desktop/{1}'.format(
+ token_url = 'http
s://tkn.kodicdn
.com/{0}/desktop/{1}'.format(
media_id, '+'.join(sources))
headers = {
b'Content-Type': b'application/x-www-form-urlencoded',
media_id, '+'.join(sources))
headers = {
b'Content-Type': b'application/x-www-form-urlencoded',
- b'Origin': b'http://www.4tube.com',
+ b'Origin': b'http
s
://www.4tube.com',
}
token_req = sanitized_Request(token_url, b'{}', headers)
tokens = self._download_json(token_req, video_id)
}
token_req = sanitized_Request(token_url, b'{}', headers)
tokens = self._download_json(token_req, video_id)