mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-20 07:32:04 +00:00
Compare commits
13 Commits
a726009987
...
f47627a1c9
Author | SHA1 | Date | |
---|---|---|---|
|
f47627a1c9 | ||
|
efeb9e0fbf | ||
|
e90a890f01 | ||
|
199c645bee | ||
|
503a3744ad | ||
|
ef03721f47 | ||
|
1e8aaa1d15 | ||
|
6423d7054e | ||
|
eb5080286a | ||
|
286e01ce30 | ||
|
8536dcafd8 | ||
|
552b139911 | ||
|
2202cef0e4 |
6
.github/ISSUE_TEMPLATE/1_broken_site.md
vendored
6
.github/ISSUE_TEMPLATE/1_broken_site.md
vendored
@ -18,7 +18,7 @@ title: ''
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
|
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
|
||||||
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.04.26. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
|
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.05.16. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
|
||||||
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
|
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
|
||||||
- Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape.
|
- Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape.
|
||||||
- Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates.
|
- Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates.
|
||||||
@ -26,7 +26,7 @@ Carefully read and work through this check list in order to prevent the most com
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
- [ ] I'm reporting a broken site support
|
- [ ] I'm reporting a broken site support
|
||||||
- [ ] I've verified that I'm running youtube-dl version **2021.04.26**
|
- [ ] I've verified that I'm running youtube-dl version **2021.05.16**
|
||||||
- [ ] I've checked that all provided URLs are alive and playable in a browser
|
- [ ] I've checked that all provided URLs are alive and playable in a browser
|
||||||
- [ ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
|
- [ ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
|
||||||
- [ ] I've searched the bugtracker for similar issues including closed ones
|
- [ ] I've searched the bugtracker for similar issues including closed ones
|
||||||
@ -41,7 +41,7 @@ Add the `-v` flag to your command line you run youtube-dl with (`youtube-dl -v <
|
|||||||
[debug] User config: []
|
[debug] User config: []
|
||||||
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
|
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
|
||||||
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
|
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
|
||||||
[debug] youtube-dl version 2021.04.26
|
[debug] youtube-dl version 2021.05.16
|
||||||
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
|
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
|
||||||
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
|
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
|
||||||
[debug] Proxy map: {}
|
[debug] Proxy map: {}
|
||||||
|
@ -19,7 +19,7 @@ labels: 'site-support-request'
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
|
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
|
||||||
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.04.26. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
|
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.05.16. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
|
||||||
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
|
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
|
||||||
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
|
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
|
||||||
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
|
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
|
||||||
@ -27,7 +27,7 @@ Carefully read and work through this check list in order to prevent the most com
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
- [ ] I'm reporting a new site support request
|
- [ ] I'm reporting a new site support request
|
||||||
- [ ] I've verified that I'm running youtube-dl version **2021.04.26**
|
- [ ] I've verified that I'm running youtube-dl version **2021.05.16**
|
||||||
- [ ] I've checked that all provided URLs are alive and playable in a browser
|
- [ ] I've checked that all provided URLs are alive and playable in a browser
|
||||||
- [ ] I've checked that none of provided URLs violate any copyrights
|
- [ ] I've checked that none of provided URLs violate any copyrights
|
||||||
- [ ] I've searched the bugtracker for similar site support requests including closed ones
|
- [ ] I've searched the bugtracker for similar site support requests including closed ones
|
||||||
|
@ -18,13 +18,13 @@ title: ''
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
|
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
|
||||||
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.04.26. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
|
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.05.16. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
|
||||||
- Search the bugtracker for similar site feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
|
- Search the bugtracker for similar site feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
|
||||||
- Finally, put x into all relevant boxes (like this [x])
|
- Finally, put x into all relevant boxes (like this [x])
|
||||||
-->
|
-->
|
||||||
|
|
||||||
- [ ] I'm reporting a site feature request
|
- [ ] I'm reporting a site feature request
|
||||||
- [ ] I've verified that I'm running youtube-dl version **2021.04.26**
|
- [ ] I've verified that I'm running youtube-dl version **2021.05.16**
|
||||||
- [ ] I've searched the bugtracker for similar site feature requests including closed ones
|
- [ ] I've searched the bugtracker for similar site feature requests including closed ones
|
||||||
|
|
||||||
|
|
||||||
|
6
.github/ISSUE_TEMPLATE/4_bug_report.md
vendored
6
.github/ISSUE_TEMPLATE/4_bug_report.md
vendored
@ -18,7 +18,7 @@ title: ''
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
|
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
|
||||||
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.04.26. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
|
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.05.16. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
|
||||||
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
|
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
|
||||||
- Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape.
|
- Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape.
|
||||||
- Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates.
|
- Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates.
|
||||||
@ -27,7 +27,7 @@ Carefully read and work through this check list in order to prevent the most com
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
- [ ] I'm reporting a broken site support issue
|
- [ ] I'm reporting a broken site support issue
|
||||||
- [ ] I've verified that I'm running youtube-dl version **2021.04.26**
|
- [ ] I've verified that I'm running youtube-dl version **2021.05.16**
|
||||||
- [ ] I've checked that all provided URLs are alive and playable in a browser
|
- [ ] I've checked that all provided URLs are alive and playable in a browser
|
||||||
- [ ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
|
- [ ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
|
||||||
- [ ] I've searched the bugtracker for similar bug reports including closed ones
|
- [ ] I've searched the bugtracker for similar bug reports including closed ones
|
||||||
@ -43,7 +43,7 @@ Add the `-v` flag to your command line you run youtube-dl with (`youtube-dl -v <
|
|||||||
[debug] User config: []
|
[debug] User config: []
|
||||||
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
|
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
|
||||||
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
|
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
|
||||||
[debug] youtube-dl version 2021.04.26
|
[debug] youtube-dl version 2021.05.16
|
||||||
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
|
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
|
||||||
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
|
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
|
||||||
[debug] Proxy map: {}
|
[debug] Proxy map: {}
|
||||||
|
4
.github/ISSUE_TEMPLATE/5_feature_request.md
vendored
4
.github/ISSUE_TEMPLATE/5_feature_request.md
vendored
@ -19,13 +19,13 @@ labels: 'request'
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
|
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
|
||||||
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.04.26. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
|
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.05.16. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
|
||||||
- Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
|
- Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
|
||||||
- Finally, put x into all relevant boxes (like this [x])
|
- Finally, put x into all relevant boxes (like this [x])
|
||||||
-->
|
-->
|
||||||
|
|
||||||
- [ ] I'm reporting a feature request
|
- [ ] I'm reporting a feature request
|
||||||
- [ ] I've verified that I'm running youtube-dl version **2021.04.26**
|
- [ ] I've verified that I'm running youtube-dl version **2021.05.16**
|
||||||
- [ ] I've searched the bugtracker for similar feature requests including closed ones
|
- [ ] I've searched the bugtracker for similar feature requests including closed ones
|
||||||
|
|
||||||
|
|
||||||
|
31
ChangeLog
31
ChangeLog
@ -1,3 +1,34 @@
|
|||||||
|
version 2021.05.16
|
||||||
|
|
||||||
|
Core
|
||||||
|
* [options] Fix thumbnail option group name (#29042)
|
||||||
|
* [YoutubeDL] Improve extract_info doc (#28946)
|
||||||
|
|
||||||
|
Extractors
|
||||||
|
+ [playstuff] Add support for play.stuff.co.nz (#28901, #28931)
|
||||||
|
* [eroprofile] Fix extraction (#23200, #23626, #29008)
|
||||||
|
+ [vivo] Add support for vivo.st (#29009)
|
||||||
|
+ [generic] Add support for og:audio (#28311, #29015)
|
||||||
|
* [phoenix] Fix extraction (#29057)
|
||||||
|
+ [generic] Add support for sibnet embeds
|
||||||
|
+ [vk] Add support for sibnet embeds (#9500)
|
||||||
|
+ [generic] Add Referer header for direct videojs download URLs (#2879,
|
||||||
|
#20217, #29053)
|
||||||
|
* [orf:radio] Switch download URLs to HTTPS (#29012, #29046)
|
||||||
|
- [blinkx] Remove extractor (#28941)
|
||||||
|
* [medaltv] Relax URL regular expression (#28884)
|
||||||
|
+ [funimation] Add support for optional lang code in URLs (#28950)
|
||||||
|
+ [gdcvault] Add support for HTML5 videos
|
||||||
|
* [dispeak] Improve FLV extraction (#13513, #28970)
|
||||||
|
* [kaltura] Improve iframe extraction (#28969)
|
||||||
|
* [kaltura] Make embed code alternatives actually work
|
||||||
|
* [cda] Improve extraction (#28709, #28937)
|
||||||
|
* [twitter] Improve formats extraction from vmap URL (#28909)
|
||||||
|
* [xtube] Fix formats extraction (#28870)
|
||||||
|
* [svtplay] Improve extraction (#28507, #28876)
|
||||||
|
* [tv2dk] Fix extraction (#28888)
|
||||||
|
|
||||||
|
|
||||||
version 2021.04.26
|
version 2021.04.26
|
||||||
|
|
||||||
Extractors
|
Extractors
|
||||||
|
@ -287,7 +287,7 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo
|
|||||||
--no-cache-dir Disable filesystem caching
|
--no-cache-dir Disable filesystem caching
|
||||||
--rm-cache-dir Delete all filesystem cache files
|
--rm-cache-dir Delete all filesystem cache files
|
||||||
|
|
||||||
## Thumbnail images:
|
## Thumbnail Options:
|
||||||
--write-thumbnail Write thumbnail image to disk
|
--write-thumbnail Write thumbnail image to disk
|
||||||
--write-all-thumbnails Write all thumbnail image formats to
|
--write-all-thumbnails Write all thumbnail image formats to
|
||||||
disk
|
disk
|
||||||
|
@ -119,7 +119,6 @@
|
|||||||
- **BitChuteChannel**
|
- **BitChuteChannel**
|
||||||
- **BleacherReport**
|
- **BleacherReport**
|
||||||
- **BleacherReportCMS**
|
- **BleacherReportCMS**
|
||||||
- **blinkx**
|
|
||||||
- **Bloomberg**
|
- **Bloomberg**
|
||||||
- **BokeCC**
|
- **BokeCC**
|
||||||
- **BongaCams**
|
- **BongaCams**
|
||||||
@ -713,6 +712,7 @@
|
|||||||
- **play.fm**
|
- **play.fm**
|
||||||
- **player.sky.it**
|
- **player.sky.it**
|
||||||
- **PlayPlusTV**
|
- **PlayPlusTV**
|
||||||
|
- **PlayStuff**
|
||||||
- **PlaysTV**
|
- **PlaysTV**
|
||||||
- **Playtvak**: Playtvak.cz, iDNES.cz and Lidovky.cz
|
- **Playtvak**: Playtvak.cz, iDNES.cz and Lidovky.cz
|
||||||
- **Playvid**
|
- **Playvid**
|
||||||
|
@ -6,7 +6,7 @@ from .common import InfoExtractor
|
|||||||
from ..compat import compat_urllib_parse_urlencode
|
from ..compat import compat_urllib_parse_urlencode
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
unescapeHTML
|
merge_dicts,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -24,7 +24,8 @@ class EroProfileIE(InfoExtractor):
|
|||||||
'title': 'sexy babe softcore',
|
'title': 'sexy babe softcore',
|
||||||
'thumbnail': r're:https?://.*\.jpg',
|
'thumbnail': r're:https?://.*\.jpg',
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
}
|
},
|
||||||
|
'skip': 'Video not found',
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.eroprofile.com/m/videos/view/Try-It-On-Pee_cut_2-wmv-4shared-com-file-sharing-download-movie-file',
|
'url': 'http://www.eroprofile.com/m/videos/view/Try-It-On-Pee_cut_2-wmv-4shared-com-file-sharing-download-movie-file',
|
||||||
'md5': '1baa9602ede46ce904c431f5418d8916',
|
'md5': '1baa9602ede46ce904c431f5418d8916',
|
||||||
@ -77,19 +78,15 @@ class EroProfileIE(InfoExtractor):
|
|||||||
[r"glbUpdViews\s*\('\d*','(\d+)'", r'p/report/video/(\d+)'],
|
[r"glbUpdViews\s*\('\d*','(\d+)'", r'p/report/video/(\d+)'],
|
||||||
webpage, 'video id', default=None)
|
webpage, 'video id', default=None)
|
||||||
|
|
||||||
video_url = unescapeHTML(self._search_regex(
|
|
||||||
r'<source src="([^"]+)', webpage, 'video url'))
|
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
r'Title:</th><td>([^<]+)</td>', webpage, 'title')
|
(r'Title:</th><td>([^<]+)</td>', r'<h1[^>]*>(.+?)</h1>'),
|
||||||
thumbnail = self._search_regex(
|
webpage, 'title')
|
||||||
r'onclick="showVideoPlayer\(\)"><img src="([^"]+)',
|
|
||||||
webpage, 'thumbnail', fatal=False)
|
|
||||||
|
|
||||||
return {
|
info = self._parse_html5_media_entries(url, webpage, video_id)[0]
|
||||||
|
|
||||||
|
return merge_dicts(info, {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'display_id': display_id,
|
'display_id': display_id,
|
||||||
'url': video_url,
|
|
||||||
'title': title,
|
'title': title,
|
||||||
'thumbnail': thumbnail,
|
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
}
|
})
|
||||||
|
@ -925,6 +925,7 @@ from .platzi import (
|
|||||||
from .playfm import PlayFMIE
|
from .playfm import PlayFMIE
|
||||||
from .playplustv import PlayPlusTVIE
|
from .playplustv import PlayPlusTVIE
|
||||||
from .plays import PlaysTVIE
|
from .plays import PlaysTVIE
|
||||||
|
from .playstuff import PlayStuffIE
|
||||||
from .playtvak import PlaytvakIE
|
from .playtvak import PlaytvakIE
|
||||||
from .playvid import PlayvidIE
|
from .playvid import PlayvidIE
|
||||||
from .playwire import PlaywireIE
|
from .playwire import PlaywireIE
|
||||||
|
@ -126,6 +126,7 @@ from .viqeo import ViqeoIE
|
|||||||
from .expressen import ExpressenIE
|
from .expressen import ExpressenIE
|
||||||
from .zype import ZypeIE
|
from .zype import ZypeIE
|
||||||
from .odnoklassniki import OdnoklassnikiIE
|
from .odnoklassniki import OdnoklassnikiIE
|
||||||
|
from .vk import VKIE
|
||||||
from .kinja import KinjaEmbedIE
|
from .kinja import KinjaEmbedIE
|
||||||
from .arcpublishing import ArcPublishingIE
|
from .arcpublishing import ArcPublishingIE
|
||||||
from .medialaan import MedialaanIE
|
from .medialaan import MedialaanIE
|
||||||
@ -2248,6 +2249,11 @@ class GenericIE(InfoExtractor):
|
|||||||
},
|
},
|
||||||
'playlist_mincount': 52,
|
'playlist_mincount': 52,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# Sibnet embed (https://help.sibnet.ru/?sibnet_video_embed)
|
||||||
|
'url': 'https://phpbb3.x-tk.ru/bbcode-video-sibnet-t24.html',
|
||||||
|
'only_matching': True,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
def report_following_redirect(self, new_url):
|
def report_following_redirect(self, new_url):
|
||||||
@ -2777,6 +2783,11 @@ class GenericIE(InfoExtractor):
|
|||||||
if odnoklassniki_url:
|
if odnoklassniki_url:
|
||||||
return self.url_result(odnoklassniki_url, OdnoklassnikiIE.ie_key())
|
return self.url_result(odnoklassniki_url, OdnoklassnikiIE.ie_key())
|
||||||
|
|
||||||
|
# Look for sibnet embedded player
|
||||||
|
sibnet_urls = VKIE._extract_sibnet_urls(webpage)
|
||||||
|
if sibnet_urls:
|
||||||
|
return self.playlist_from_matches(sibnet_urls, video_id, video_title)
|
||||||
|
|
||||||
# Look for embedded ivi player
|
# Look for embedded ivi player
|
||||||
mobj = re.search(r'<embed[^>]+?src=(["\'])(?P<url>https?://(?:www\.)?ivi\.ru/video/player.+?)\1', webpage)
|
mobj = re.search(r'<embed[^>]+?src=(["\'])(?P<url>https?://(?:www\.)?ivi\.ru/video/player.+?)\1', webpage)
|
||||||
if mobj is not None:
|
if mobj is not None:
|
||||||
@ -3400,6 +3411,9 @@ class GenericIE(InfoExtractor):
|
|||||||
'url': src,
|
'url': src,
|
||||||
'ext': (mimetype2ext(src_type)
|
'ext': (mimetype2ext(src_type)
|
||||||
or ext if ext in KNOWN_EXTENSIONS else 'mp4'),
|
or ext if ext in KNOWN_EXTENSIONS else 'mp4'),
|
||||||
|
'http_headers': {
|
||||||
|
'Referer': full_response.geturl(),
|
||||||
|
},
|
||||||
})
|
})
|
||||||
if formats:
|
if formats:
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
@ -3468,7 +3482,7 @@ class GenericIE(InfoExtractor):
|
|||||||
m_video_type = re.findall(r'<meta.*?property="og:video:type".*?content="video/(.*?)"', webpage)
|
m_video_type = re.findall(r'<meta.*?property="og:video:type".*?content="video/(.*?)"', webpage)
|
||||||
# We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
|
# We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
|
||||||
if m_video_type is not None:
|
if m_video_type is not None:
|
||||||
found = filter_video(re.findall(r'<meta.*?property="og:video".*?content="(.*?)"', webpage))
|
found = filter_video(re.findall(r'<meta.*?property="og:(?:video|audio)".*?content="(.*?)"', webpage))
|
||||||
if not found:
|
if not found:
|
||||||
REDIRECT_REGEX = r'[0-9]{,2};\s*(?:URL|url)=\'?([^\'"]+)'
|
REDIRECT_REGEX = r'[0-9]{,2};\s*(?:URL|url)=\'?([^\'"]+)'
|
||||||
found = re.search(
|
found = re.search(
|
||||||
|
@ -182,7 +182,7 @@ class ORFRadioIE(InfoExtractor):
|
|||||||
duration = end - start if end and start else None
|
duration = end - start if end and start else None
|
||||||
entries.append({
|
entries.append({
|
||||||
'id': loop_stream_id.replace('.mp3', ''),
|
'id': loop_stream_id.replace('.mp3', ''),
|
||||||
'url': 'http://loopstream01.apa.at/?channel=%s&id=%s' % (self._LOOP_STATION, loop_stream_id),
|
'url': 'https://loopstream01.apa.at/?channel=%s&id=%s' % (self._LOOP_STATION, loop_stream_id),
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': clean_html(data.get('subtitle')),
|
'description': clean_html(data.get('subtitle')),
|
||||||
'duration': duration,
|
'duration': duration,
|
||||||
|
@ -9,8 +9,9 @@ from ..compat import compat_str
|
|||||||
from ..utils import (
|
from ..utils import (
|
||||||
int_or_none,
|
int_or_none,
|
||||||
merge_dicts,
|
merge_dicts,
|
||||||
|
try_get,
|
||||||
unified_timestamp,
|
unified_timestamp,
|
||||||
xpath_text,
|
urljoin,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -27,10 +28,11 @@ class PhoenixIE(ZDFBaseIE):
|
|||||||
'title': 'Wohin führt der Protest in der Pandemie?',
|
'title': 'Wohin führt der Protest in der Pandemie?',
|
||||||
'description': 'md5:7d643fe7f565e53a24aac036b2122fbd',
|
'description': 'md5:7d643fe7f565e53a24aac036b2122fbd',
|
||||||
'duration': 1691,
|
'duration': 1691,
|
||||||
'timestamp': 1613906100,
|
'timestamp': 1613902500,
|
||||||
'upload_date': '20210221',
|
'upload_date': '20210221',
|
||||||
'uploader': 'Phoenix',
|
'uploader': 'Phoenix',
|
||||||
'channel': 'corona nachgehakt',
|
'series': 'corona nachgehakt',
|
||||||
|
'episode': 'Wohin führt der Protest in der Pandemie?',
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
# Youtube embed
|
# Youtube embed
|
||||||
@ -79,36 +81,39 @@ class PhoenixIE(ZDFBaseIE):
|
|||||||
|
|
||||||
video_id = compat_str(video.get('basename') or video.get('content'))
|
video_id = compat_str(video.get('basename') or video.get('content'))
|
||||||
|
|
||||||
details = self._download_xml(
|
details = self._download_json(
|
||||||
'https://www.phoenix.de/php/mediaplayer/data/beitrags_details.php',
|
'https://www.phoenix.de/php/mediaplayer/data/beitrags_details.php',
|
||||||
video_id, 'Downloading details XML', query={
|
video_id, 'Downloading details JSON', query={
|
||||||
'ak': 'web',
|
'ak': 'web',
|
||||||
'ptmd': 'true',
|
'ptmd': 'true',
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'profile': 'player2',
|
'profile': 'player2',
|
||||||
})
|
})
|
||||||
|
|
||||||
title = title or xpath_text(
|
title = title or details['title']
|
||||||
details, './/information/title', 'title', fatal=True)
|
content_id = details['tracking']['nielsen']['content']['assetid']
|
||||||
content_id = xpath_text(
|
|
||||||
details, './/video/details/basename', 'content id', fatal=True)
|
|
||||||
|
|
||||||
info = self._extract_ptmd(
|
info = self._extract_ptmd(
|
||||||
'https://tmd.phoenix.de/tmd/2/ngplayer_2_3/vod/ptmd/phoenix/%s' % content_id,
|
'https://tmd.phoenix.de/tmd/2/ngplayer_2_3/vod/ptmd/phoenix/%s' % content_id,
|
||||||
content_id, None, url)
|
content_id, None, url)
|
||||||
|
|
||||||
timestamp = unified_timestamp(xpath_text(details, './/details/airtime'))
|
duration = int_or_none(try_get(
|
||||||
|
details, lambda x: x['tracking']['nielsen']['content']['length']))
|
||||||
|
timestamp = unified_timestamp(details.get('editorialDate'))
|
||||||
|
series = try_get(
|
||||||
|
details, lambda x: x['tracking']['nielsen']['content']['program'],
|
||||||
|
compat_str)
|
||||||
|
episode = title if details.get('contentType') == 'episode' else None
|
||||||
|
|
||||||
thumbnails = []
|
thumbnails = []
|
||||||
for node in details.findall('.//teaserimages/teaserimage'):
|
teaser_images = try_get(details, lambda x: x['teaserImageRef']['layouts'], dict) or {}
|
||||||
thumbnail_url = node.text
|
for thumbnail_key, thumbnail_url in teaser_images.items():
|
||||||
|
thumbnail_url = urljoin(url, thumbnail_url)
|
||||||
if not thumbnail_url:
|
if not thumbnail_url:
|
||||||
continue
|
continue
|
||||||
thumbnail = {
|
thumbnail = {
|
||||||
'url': thumbnail_url,
|
'url': thumbnail_url,
|
||||||
}
|
}
|
||||||
thumbnail_key = node.get('key')
|
|
||||||
if thumbnail_key:
|
|
||||||
m = re.match('^([0-9]+)x([0-9]+)$', thumbnail_key)
|
m = re.match('^([0-9]+)x([0-9]+)$', thumbnail_key)
|
||||||
if m:
|
if m:
|
||||||
thumbnail['width'] = int(m.group(1))
|
thumbnail['width'] = int(m.group(1))
|
||||||
@ -118,11 +123,11 @@ class PhoenixIE(ZDFBaseIE):
|
|||||||
return merge_dicts(info, {
|
return merge_dicts(info, {
|
||||||
'id': content_id,
|
'id': content_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': xpath_text(details, './/information/detail'),
|
'description': details.get('leadParagraph'),
|
||||||
'duration': int_or_none(xpath_text(details, './/details/lengthSec')),
|
'duration': duration,
|
||||||
'thumbnails': thumbnails,
|
'thumbnails': thumbnails,
|
||||||
'timestamp': timestamp,
|
'timestamp': timestamp,
|
||||||
'uploader': xpath_text(details, './/details/channel'),
|
'uploader': details.get('tvService'),
|
||||||
'uploader_id': xpath_text(details, './/details/originChannelId'),
|
'series': series,
|
||||||
'channel': xpath_text(details, './/details/originChannelTitle'),
|
'episode': episode,
|
||||||
})
|
})
|
||||||
|
65
youtube_dl/extractor/playstuff.py
Normal file
65
youtube_dl/extractor/playstuff.py
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from .common import InfoExtractor
|
||||||
|
from ..compat import compat_str
|
||||||
|
from ..utils import (
|
||||||
|
smuggle_url,
|
||||||
|
try_get,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class PlayStuffIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'https?://(?:www\.)?play\.stuff\.co\.nz/details/(?P<id>[^/?#&]+)'
|
||||||
|
_TESTS = [{
|
||||||
|
'url': 'https://play.stuff.co.nz/details/608778ac1de1c4001a3fa09a',
|
||||||
|
'md5': 'c82d3669e5247c64bc382577843e5bd0',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '6250584958001',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Episode 1: Rotorua/Mt Maunganui/Tauranga',
|
||||||
|
'description': 'md5:c154bafb9f0dd02d01fd4100fb1c1913',
|
||||||
|
'uploader_id': '6005208634001',
|
||||||
|
'timestamp': 1619491027,
|
||||||
|
'upload_date': '20210427',
|
||||||
|
},
|
||||||
|
'add_ie': ['BrightcoveNew'],
|
||||||
|
}, {
|
||||||
|
# geo restricted, bypassable
|
||||||
|
'url': 'https://play.stuff.co.nz/details/_6155660351001',
|
||||||
|
'only_matching': True,
|
||||||
|
}]
|
||||||
|
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/%s/%s_default/index.html?videoId=%s'
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
|
state = self._parse_json(
|
||||||
|
self._search_regex(
|
||||||
|
r'__INITIAL_STATE__\s*=\s*({.+?})\s*;', webpage, 'state'),
|
||||||
|
video_id)
|
||||||
|
|
||||||
|
account_id = try_get(
|
||||||
|
state, lambda x: x['configurations']['accountId'],
|
||||||
|
compat_str) or '6005208634001'
|
||||||
|
player_id = try_get(
|
||||||
|
state, lambda x: x['configurations']['playerId'],
|
||||||
|
compat_str) or 'default'
|
||||||
|
|
||||||
|
entries = []
|
||||||
|
for item_id, video in state['items'].items():
|
||||||
|
if not isinstance(video, dict):
|
||||||
|
continue
|
||||||
|
asset_id = try_get(
|
||||||
|
video, lambda x: x['content']['attributes']['assetId'],
|
||||||
|
compat_str)
|
||||||
|
if not asset_id:
|
||||||
|
continue
|
||||||
|
entries.append(self.url_result(
|
||||||
|
smuggle_url(
|
||||||
|
self.BRIGHTCOVE_URL_TEMPLATE % (account_id, player_id, asset_id),
|
||||||
|
{'geo_countries': ['NZ']}),
|
||||||
|
'BrightcoveNew', video_id))
|
||||||
|
|
||||||
|
return self.playlist_result(entries, video_id)
|
@ -86,10 +86,10 @@ class SharedIE(SharedBaseIE):
|
|||||||
|
|
||||||
class VivoIE(SharedBaseIE):
|
class VivoIE(SharedBaseIE):
|
||||||
IE_DESC = 'vivo.sx'
|
IE_DESC = 'vivo.sx'
|
||||||
_VALID_URL = r'https?://vivo\.sx/(?P<id>[\da-z]{10})'
|
_VALID_URL = r'https?://vivo\.s[xt]/(?P<id>[\da-z]{10})'
|
||||||
_FILE_NOT_FOUND = '>The file you have requested does not exists or has been removed'
|
_FILE_NOT_FOUND = '>The file you have requested does not exists or has been removed'
|
||||||
|
|
||||||
_TEST = {
|
_TESTS = [{
|
||||||
'url': 'http://vivo.sx/d7ddda0e78',
|
'url': 'http://vivo.sx/d7ddda0e78',
|
||||||
'md5': '15b3af41be0b4fe01f4df075c2678b2c',
|
'md5': '15b3af41be0b4fe01f4df075c2678b2c',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
@ -98,7 +98,10 @@ class VivoIE(SharedBaseIE):
|
|||||||
'title': 'Chicken',
|
'title': 'Chicken',
|
||||||
'filesize': 515659,
|
'filesize': 515659,
|
||||||
},
|
},
|
||||||
}
|
}, {
|
||||||
|
'url': 'http://vivo.st/d7ddda0e78',
|
||||||
|
'only_matching': True,
|
||||||
|
}]
|
||||||
|
|
||||||
def _extract_title(self, webpage):
|
def _extract_title(self, webpage):
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
|
@ -300,6 +300,13 @@ class VKIE(VKBaseIE):
|
|||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _extract_sibnet_urls(webpage):
|
||||||
|
# https://help.sibnet.ru/?sibnet_video_embed
|
||||||
|
return [unescapeHTML(mobj.group('url')) for mobj in re.finditer(
|
||||||
|
r'<iframe\b[^>]+\bsrc=(["\'])(?P<url>(?:https?:)?//video\.sibnet\.ru/shell\.php\?.*?\bvideoid=\d+.*?)\1',
|
||||||
|
webpage)]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
mobj = re.match(self._VALID_URL, url)
|
mobj = re.match(self._VALID_URL, url)
|
||||||
video_id = mobj.group('videoid')
|
video_id = mobj.group('videoid')
|
||||||
@ -408,6 +415,10 @@ class VKIE(VKBaseIE):
|
|||||||
if odnoklassniki_url:
|
if odnoklassniki_url:
|
||||||
return self.url_result(odnoklassniki_url, OdnoklassnikiIE.ie_key())
|
return self.url_result(odnoklassniki_url, OdnoklassnikiIE.ie_key())
|
||||||
|
|
||||||
|
sibnet_urls = self._extract_sibnet_urls(info_page)
|
||||||
|
if sibnet_urls:
|
||||||
|
return self.url_result(sibnet_urls[0])
|
||||||
|
|
||||||
m_opts = re.search(r'(?s)var\s+opts\s*=\s*({.+?});', info_page)
|
m_opts = re.search(r'(?s)var\s+opts\s*=\s*({.+?});', info_page)
|
||||||
if m_opts:
|
if m_opts:
|
||||||
m_opts_url = re.search(r"url\s*:\s*'((?!/\b)[^']+)", m_opts.group(1))
|
m_opts_url = re.search(r"url\s*:\s*'((?!/\b)[^']+)", m_opts.group(1))
|
||||||
|
@ -768,7 +768,7 @@ def parseOpts(overrideArguments=None):
|
|||||||
action='store_true', dest='rm_cachedir',
|
action='store_true', dest='rm_cachedir',
|
||||||
help='Delete all filesystem cache files')
|
help='Delete all filesystem cache files')
|
||||||
|
|
||||||
thumbnail = optparse.OptionGroup(parser, 'Thumbnail images')
|
thumbnail = optparse.OptionGroup(parser, 'Thumbnail Options')
|
||||||
thumbnail.add_option(
|
thumbnail.add_option(
|
||||||
'--write-thumbnail',
|
'--write-thumbnail',
|
||||||
action='store_true', dest='writethumbnail', default=False,
|
action='store_true', dest='writethumbnail', default=False,
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
__version__ = '2021.04.26'
|
__version__ = '2021.05.16'
|
||||||
|
Loading…
Reference in New Issue
Block a user