projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[pornhub:playlistbase] Improve extract entries
[youtube-dl]
/
youtube_dl
/
extractor
/
theplatform.py
diff --git
a/youtube_dl/extractor/theplatform.py
b/youtube_dl/extractor/theplatform.py
index 0bf6726b53641734fd0fcafb73a76d8c3621b302..755f816fff95bbe3567afe0168936eb6adb53095 100644
(file)
--- a/
youtube_dl/extractor/theplatform.py
+++ b/
youtube_dl/extractor/theplatform.py
@@
-20,7
+20,6
@@
from ..utils import (
int_or_none,
sanitized_Request,
unsmuggle_url,
int_or_none,
sanitized_Request,
unsmuggle_url,
- url_basename,
xpath_with_ns,
)
xpath_with_ns,
)
@@
-85,7
+84,7
@@
class ThePlatformBaseIE(InfoExtractor):
class ThePlatformIE(ThePlatformBaseIE):
_VALID_URL = r'''(?x)
(?:https?://(?:link|player)\.theplatform\.com/[sp]/(?P<provider_id>[^/]+)/
class ThePlatformIE(ThePlatformBaseIE):
_VALID_URL = r'''(?x)
(?:https?://(?:link|player)\.theplatform\.com/[sp]/(?P<provider_id>[^/]+)/
- (?:(?P<media>(?:
[^/]+/)+select/
media/)|(?P<config>(?:[^/\?]+/(?:swf|config)|onsite)/select/))?
+ (?:(?P<media>(?:
(?:[^/]+/)+select/)?
media/)|(?P<config>(?:[^/\?]+/(?:swf|config)|onsite)/select/))?
|theplatform:)(?P<id>[^/\?&]+)'''
_TESTS = [{
|theplatform:)(?P<id>[^/\?&]+)'''
_TESTS = [{
@@
-283,8
+282,8
@@
class ThePlatformFeedIE(ThePlatformBaseIE):
first_video_id = None
duration = None
for item in entry['media$content']:
first_video_id = None
duration = None
for item in entry['media$content']:
- smil_url = item['plfile$url'] + '&format=SMIL&
Tracking=true&Embedded=true&formats=MPEG4,F4M
'
- cur_video_id =
url_basename
(smil_url)
+ smil_url = item['plfile$url'] + '&format=SMIL&
mbr=true
'
+ cur_video_id =
ThePlatformIE._match_id
(smil_url)
if first_video_id is None:
first_video_id = cur_video_id
duration = float_or_none(item.get('plfile$duration'))
if first_video_id is None:
first_video_id = cur_video_id
duration = float_or_none(item.get('plfile$duration'))