2016-10-02 07:39:18 -04:00
|
|
|
# coding: utf-8
|
2014-01-06 23:23:20 -05:00
|
|
|
from __future__ import unicode_literals
|
2013-09-26 07:53:57 -04:00
|
|
|
|
2018-10-15 13:41:57 -04:00
|
|
|
import base64
|
|
|
|
import re
|
|
|
|
import struct
|
2013-07-05 15:31:50 -04:00
|
|
|
|
pull changes from remote master (#190)
* [scrippsnetworks] Add new extractor(closes #19857)(closes #22981)
* [teachable] Improve locked lessons detection (#23528)
* [teachable] Fail with error message if no video URL found
* [extractors] add missing import for ScrippsNetworksIE
* [brightcove] cache brightcove player policy keys
* [prosiebensat1] improve geo restriction handling(closes #23571)
* [soundcloud] automatically update client id on failing requests
* [spankbang] Fix extraction (closes #23307, closes #23423, closes #23444)
* [spankbang] Improve removed video detection (#23423)
* [brightcove] update policy key on failing requests
* [pornhub] Fix extraction and add support for m3u8 formats (closes #22749, closes #23082)
* [pornhub] Improve locked videos detection (closes #22449, closes #22780)
* [brightcove] invalidate policy key cache on failing requests
* [soundcloud] fix client id extraction for non fatal requests
* [ChangeLog] Actualize
[ci skip]
* [devscripts/create-github-release] Switch to using PAT for authentication
Basic authentication will be deprecated soon
* release 2020.01.01
* [redtube] Detect private videos (#23518)
* [vice] improve extraction(closes #23631)
* [devscripts/create-github-release] Remove unused import
* [wistia] improve format extraction and extract subtitles(closes #22590)
* [nrktv:seriebase] Fix extraction (closes #23625) (#23537)
* [discovery] fix anonymous token extraction(closes #23650)
* [scrippsnetworks] add support for www.discovery.com videos
* [scrippsnetworks] correct test case URL
* [dctp] fix format extraction(closes #23656)
* [pandatv] Remove extractor (#23630)
* [naver] improve extraction
- improve geo-restriction handling
- extract automatic captions
- extract uploader metadata
- extract VLive HLS formats
* [naver] improve metadata extraction
* [cloudflarestream] improve extraction
- add support for bytehighway.net domain
- add support for signed URLs
- extract thumbnail
* [cloudflarestream] import embed URL extraction
* [lego] fix extraction and extract subtitle(closes #23687)
* [safari] Fix kaltura session extraction (closes #23679) (#23670)
* [orf:fm4] Fix extraction (#23599)
* [orf:radio] Clean description and improve extraction
* [twitter] add support for promo_video_website cards(closes #23711)
* [vodplatform] add support for embed.kwikmotion.com domain
* [ndr:base:embed] Improve thumbnails extraction (closes #23731)
* [canvas] Add support for new API endpoint and update tests (closes #17680, closes #18629)
* [travis] Add flake8 job (#23720)
* [yourporn] Fix extraction (closes #21645, closes #22255, closes #23459)
* [ChangeLog] Actualize
[ci skip]
* release 2020.01.15
* [soundcloud] Restore previews extraction (closes #23739)
* [orf:tvthek] Improve geo restricted videos detection (closes #23741)
* [zype] improve extraction
- extract subtitles(closes #21258)
- support URLs with alternative keys/tokens(#21258)
- extract more metadata
* [americastestkitchen] fix extraction
* [nbc] add support for nbc multi network URLs(closes #23049)
* [ard] improve extraction(closes #23761)
- simplify extraction
- extract age limit and series
- bypass geo-restriction
* [ivi:compilation] Fix entries extraction (closes #23770)
* [24video] Add support for 24video.vip (closes #23753)
* [businessinsider] Fix jwplatform id extraction (closes #22929) (#22954)
* [ard] add a missing condition
* [azmedien] fix extraction(closes #23783)
* [voicerepublic] fix extraction
* [stretchinternet] fix extraction(closes #4319)
* [youtube] Fix sigfunc name extraction (closes #23819)
* [ChangeLog] Actualize
[ci skip]
* release 2020.01.24
* [soundcloud] imporve private playlist/set tracks extraction
https://github.com/ytdl-org/youtube-dl/issues/3707#issuecomment-577873539
* [svt] fix article extraction(closes #22897)(closes #22919)
* [svt] fix series extraction(closes #22297)
* [viewlift] improve extraction
- fix extraction(closes #23851)
- add add support for authentication
- add support for more domains
* [vimeo] fix album extraction(closes #23864)
* [tva] Relax _VALID_URL (closes #23903)
* [tv5mondeplus] Fix extraction (closes #23907, closes #23911)
* [twitch:stream] Lowercase channel id for stream request (closes #23917)
* [sportdeutschland] Update to new sportdeutschland API
They switched to SSL, but under a different host AND path...
Remove the old test cases because these videos have become unavailable.
* [popcorntimes] Add extractor (closes #23949)
* [thisoldhouse] fix extraction(closes #23951)
* [toggle] Add support for mewatch.sg (closes #23895) (#23930)
* [compat] Introduce compat_realpath (refs #23991)
* [update] Fix updating via symlinks (closes #23991)
* [nytimes] improve format sorting(closes #24010)
* [abc:iview] Support 720p (#22907) (#22921)
* [nova:embed] Fix extraction (closes #23672)
* [nova:embed] Improve (closes #23690)
* [nova] Improve extraction (refs #23690)
* [jpopsuki] Remove extractor (closes #23858)
* [YoutubeDL] Fix playlist entry indexing with --playlist-items (closes #10591, closes #10622)
* [test_YoutubeDL] Fix get_ids
* [test_YoutubeDL] Add tests for #10591 (closes #23873)
* [24video] Add support for porn.24video.net (closes #23779, closes #23784)
* [npr] Add support for streams (closes #24042)
* [ChangeLog] Actualize
[ci skip]
* release 2020.02.16
* [tv2dk:bornholm:play] Fix extraction (#24076)
* [imdb] Fix extraction (closes #23443)
* [wistia] Add support for multiple generic embeds (closes #8347, closes #11385)
* [teachable] Add support for multiple videos per lecture (closes #24101)
* [pornhd] Fix extraction (closes #24128)
* [options] Remove duplicate short option -v for --version (#24162)
* [extractor/common] Convert ISM manifest to unicode before processing on python 2 (#24152)
* [YoutubeDL] Force redirect URL to unicode on python 2
* Remove no longer needed compat_str around geturl
* [youjizz] Fix extraction (closes #24181)
* [test_subtitles] Remove obsolete test
* [zdf:channel] Fix tests
* [zapiks] Fix test
* [xtube] Fix metadata extraction (closes #21073, closes #22455)
* [xtube:user] Fix test
* [telecinco] Fix extraction (refs #24195)
* [telecinco] Add support for article opening videos
* [franceculture] Fix extraction (closes #24204)
* [xhamster] Fix extraction (closes #24205)
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.01
* [vimeo] Fix subtitles URLs (#24209)
* [servus] Add support for new URL schema (closes #23475, closes #23583, closes #24142)
* [youtube:playlist] Fix tests (closes #23872) (#23885)
* [peertube] Improve extraction
* [peertube] Fix issues and improve extraction (closes #23657)
* [pornhub] Improve title extraction (closes #24184)
* [vimeo] fix showcase password protected video extraction(closes #24224)
* [youtube] Fix age-gated videos support without login (closes #24248)
* [youtube] Fix tests
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.06
* [nhk] update API version(closes #24270)
* [youtube] Improve extraction in 429 error conditions (closes #24283)
* [youtube] Improve age-gated videos extraction in 429 error conditions (refs #24283)
* [youtube] Remove outdated code
Additional get_video_info requests don't seem to provide any extra itags any longer
* [README.md] Clarify 429 error
* [pornhub] Add support for pornhubpremium.com (#24288)
* [utils] Add support for cookies with spaces used instead of tabs
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.08
* Revert "[utils] Add support for cookies with spaces used instead of tabs"
According to [1] TABs must be used as separators between fields.
Files produces by some tools with spaces as separators are considered
malformed.
1. https://curl.haxx.se/docs/http-cookies.html
This reverts commit cff99c91d150df2a4e21962a3ca8d4ae94533b8c.
* [utils] Add reference to cookie file format
* Revert "[vimeo] fix showcase password protected video extraction(closes #24224)"
This reverts commit 12ee431676bb655f04c7dd416a73c1f142ed368d.
* [nhk] Relax _VALID_URL (#24329)
* [nhk] Remove obsolete rtmp formats (closes #24329)
* [nhk] Update m3u8 URL and use native hls (#24329)
* [ndr] Fix extraction (closes #24326)
* [xtube] Fix formats extraction (closes #24348)
* [xtube] Fix typo
* [hellporno] Fix extraction (closes #24399)
* [cbc:watch] Add support for authentication
* [cbc:watch] Fix authenticated device token caching (closes #19160)
* [soundcloud] fix download url extraction(closes #24394)
* [limelight] remove disabled API requests(closes #24255)
* [bilibili] Add support for new URL schema with BV ids (closes #24439, closes #24442)
* [bilibili] Add support for player.bilibili.com (closes #24402)
* [teachable] Extract chapter metadata (closes #24421)
* [generic] Look for teachable embeds before wistia
* [teachable] Update upskillcourses domain
New version does not use teachable platform any longer
* [teachable] Update gns3 domain
* [teachable] Update test
* [ChangeLog] Actualize
[ci skip]
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.24
* [spankwire] Fix extraction (closes #18924, closes #20648)
* [spankwire] Add support for generic embeds (refs #24633)
* [youporn] Add support form generic embeds
* [mofosex] Add support for generic embeds (closes #24633)
* [tele5] Fix extraction (closes #24553)
* [extractor/common] Skip malformed ISM manifest XMLs while extracting ISM formats (#24667)
* [tv4] Fix ISM formats extraction (closes #24667)
* [twitch:clips] Extend _VALID_URL (closes #24290) (#24642)
* [motherless] Fix extraction (closes #24699)
* [nova:embed] Fix extraction (closes #24700)
* [youtube] Skip broken multifeed videos (closes #24711)
* [soundcloud] Extract AAC format
* [soundcloud] Improve AAC format extraction (closes #19173, closes #24708)
* [thisoldhouse] Fix video id extraction (closes #24548)
Added support for:
with of without "www."
and either ".chorus.build" or ".com"
It now validated correctly on older URL's
```
<iframe src="https://thisoldhouse.chorus.build/videos/zype/5e33baec27d2e50001d5f52f
```
and newer ones
```
<iframe src="https://www.thisoldhouse.com/videos/zype/5e2b70e95216cc0001615120
```
* [thisoldhouse] Improve video id extraction (closes #24549)
* [youtube] Fix DRM videos detection (refs #24736)
* [options] Clarify doc on --exec command (closes #19087) (#24883)
* [prosiebensat1] Improve extraction and remove 7tv.de support (#24948)
* [prosiebensat1] Extract series metadata
* [tenplay] Relax _VALID_URL (closes #25001)
* [tvplay] fix Viafree extraction(closes #15189)(closes #24473)(closes #24789)
* [yahoo] fix GYAO Player extraction and relax title URL regex(closes #24178)(closes #24778)
* [youtube] Use redirected video id if any (closes #25063)
* [youtube] Improve player id extraction and add tests
* [extractor/common] Extract multiple JSON-LD entries
* [crunchyroll] Fix and improve extraction (closes #25096, closes #25060)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.03
* [puhutv] Remove no longer available HTTP formats (closes #25124)
* [utils] Improve cookie files support
+ Add support for UTF-8 in cookie files
* Skip malformed cookie file entries instead of crashing (invalid entry len, invalid expires at)
* [dailymotion] Fix typo
* [compat] Introduce compat_cookiejar_Cookie
* [extractor/common] Use compat_cookiejar_Cookie for _set_cookie (closes #23256, closes #24776)
To always ensure cookie name and value are bytestrings on python 2.
* [orf] Add support for more radio stations (closes #24938) (#24968)
* [uol] fix extraction(closes #22007)
* [downloader/http] Finish downloading once received data length matches expected
Always do this if possible, i.e. if Content-Length or expected length is known, not only in test.
This will save unnecessary last extra loop trying to read 0 bytes.
* [downloader/http] Request last data block of exact remaining size
Always request last data block of exact size remaining to download if possible not the current block size.
* [iprima] Improve extraction (closes #25138)
* [youtube] Improve signature cipher extraction (closes #25188)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.08
* [spike] fix Bellator mgid extraction(closes #25195)
* [bbccouk] PEP8
* [mailru] Fix extraction (closes #24530) (#25239)
* [README.md] flake8 HTTPS URL (#25230)
* [youtube] Add support for yewtu.be (#25226)
* [soundcloud] reduce API playlist page limit(closes #25274)
* [vimeo] improve format extraction and sorting(closes #25285)
* [redtube] Improve title extraction (#25208)
* [indavideo] Switch to HTTPS for API request (#25191)
* [utils] Fix file permissions in write_json_file (closes #12471) (#25122)
* [redtube] Improve formats extraction and extract m3u8 formats (closes #25311, closes #25321)
* [ard] Improve _VALID_URL (closes #25134) (#25198)
* [giantbomb] Extend _VALID_URL (#25222)
* [postprocessor/ffmpeg] Embed series metadata with --add-metadata
* [youtube] Add support for more invidious instances (#25417)
* [ard:beta] Extend _VALID_URL (closes #25405)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.29
* [jwplatform] Improve embeds extraction (closes #25467)
* [periscope] Fix untitled broadcasts (#25482)
* [twitter:broadcast] Add untitled periscope broadcast test
* [malltv] Add support for sk.mall.tv (#25445)
* [brightcove] Fix subtitles extraction (closes #25540)
* [brightcove] Sort imports
* [twitch] Pass v5 accept header and fix thumbnails extraction (closes #25531)
* [twitch:stream] Fix extraction (closes #25528)
* [twitch:stream] Expect 400 and 410 HTTP errors from API
* [tele5] Prefer jwplatform over nexx (closes #25533)
* [jwplatform] Add support for bypass geo restriction
* [tele5] Bypass geo restriction
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.06
* [kaltura] Add support for multiple embeds on a webpage (closes #25523)
* [youtube] Extract chapters from JSON (closes #24819)
* [facebook] Support single-video ID links
I stumbled upon this at https://www.facebook.com/bwfbadminton/posts/10157127020046316 . No idea how prevalent it is yet.
* [youtube] Fix playlist and feed extraction (closes #25675)
* [youtube] Fix thumbnails extraction and remove uploader id extraction warning (closes #25676)
* [youtube] Fix upload date extraction
* [youtube] Improve view count extraction
* [youtube] Fix uploader id and uploader URL extraction
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.16
* [youtube] Fix categories and improve tags extraction
* [youtube] Force old layout (closes #25682, closes #25683, closes #25680, closes #25686)
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.16.1
* [brightcove] Improve embed detection (closes #25674)
* [bellmedia] add support for cp24.com clip URLs(closes #25764)
* [youtube:playlists] Extend _VALID_URL (closes #25810)
* [youtube] Prevent excess HTTP 301 (#25786)
* [wistia] Restrict embed regex (closes #25969)
* [youtube] Improve description extraction (closes #25937) (#25980)
* [youtube] Fix sigfunc name extraction (closes #26134, closes #26135, closes #26136, closes #26137)
* [ChangeLog] Actualize
[ci skip]
* release 2020.07.28
* [xhamster] Extend _VALID_URL (closes #25789) (#25804)
* [xhamster] Fix extraction (closes #26157) (#26254)
* [xhamster] Extend _VALID_URL (closes #25927)
Co-authored-by: Remita Amine <remitamine@gmail.com>
Co-authored-by: Sergey M․ <dstftw@gmail.com>
Co-authored-by: nmeum <soeren+github@soeren-tempel.net>
Co-authored-by: Roxedus <me@roxedus.dev>
Co-authored-by: Singwai Chan <c.singwai@gmail.com>
Co-authored-by: cdarlint <cdarlint@users.noreply.github.com>
Co-authored-by: Johannes N <31795504+jonolt@users.noreply.github.com>
Co-authored-by: jnozsc <jnozsc@gmail.com>
Co-authored-by: Moritz Patelscheck <moritz.patelscheck@campus.tu-berlin.de>
Co-authored-by: PB <3854688+uno20001@users.noreply.github.com>
Co-authored-by: Philipp Hagemeister <phihag@phihag.de>
Co-authored-by: Xaver Hellauer <software@hellauer.bayern>
Co-authored-by: d2au <d2au.dev@gmail.com>
Co-authored-by: Jan 'Yenda' Trmal <jtrmal@gmail.com>
Co-authored-by: jxu <7989982+jxu@users.noreply.github.com>
Co-authored-by: Martin Ström <name@my-domain.se>
Co-authored-by: The Hatsune Daishi <nao20010128@gmail.com>
Co-authored-by: tsia <github@tsia.de>
Co-authored-by: 3risian <59593325+3risian@users.noreply.github.com>
Co-authored-by: Tristan Waddington <tristan.waddington@gmail.com>
Co-authored-by: Devon Meunier <devon.meunier@gmail.com>
Co-authored-by: Felix Stupp <felix.stupp@outlook.com>
Co-authored-by: tom <tomster954@gmail.com>
Co-authored-by: AndrewMBL <62922222+AndrewMBL@users.noreply.github.com>
Co-authored-by: willbeaufoy <will@willbeaufoy.net>
Co-authored-by: Philipp Stehle <anderschwiedu@googlemail.com>
Co-authored-by: hh0rva1h <61889859+hh0rva1h@users.noreply.github.com>
Co-authored-by: comsomisha <shmelev1996@mail.ru>
Co-authored-by: TotalCaesar659 <14265316+TotalCaesar659@users.noreply.github.com>
Co-authored-by: Juan Francisco Cantero Hurtado <iam@juanfra.info>
Co-authored-by: Dave Loyall <dave@the-good-guys.net>
Co-authored-by: tlsssl <63866177+tlsssl@users.noreply.github.com>
Co-authored-by: Rob <ankenyr@gmail.com>
Co-authored-by: Michael Klein <github@a98shuttle.de>
Co-authored-by: JordanWeatherby <47519158+JordanWeatherby@users.noreply.github.com>
Co-authored-by: striker.sh <19488257+strikersh@users.noreply.github.com>
Co-authored-by: Matej Dujava <mdujava@gmail.com>
Co-authored-by: Glenn Slayden <5589855+glenn-slayden@users.noreply.github.com>
Co-authored-by: MRWITEK <mrvvitek@gmail.com>
Co-authored-by: JChris246 <43832407+JChris246@users.noreply.github.com>
Co-authored-by: TheRealDude2 <the.real.dude@gmx.de>
2020-08-25 10:53:34 -04:00
|
|
|
from .common import InfoExtractor
|
2020-08-26 10:52:32 -04:00
|
|
|
from .adobepass import AdobePassIE
|
2014-12-13 06:24:42 -05:00
|
|
|
from ..compat import (
|
2015-10-25 15:04:55 -04:00
|
|
|
compat_etree_fromstring,
|
2014-01-20 20:09:49 -05:00
|
|
|
compat_parse_qs,
|
2014-11-05 17:14:33 -05:00
|
|
|
compat_urllib_parse_urlparse,
|
2014-12-13 06:24:42 -05:00
|
|
|
compat_urlparse,
|
2015-06-23 11:34:29 -04:00
|
|
|
compat_xml_parse_error,
|
2020-08-26 10:52:32 -04:00
|
|
|
compat_HTTPError,
|
2014-12-13 06:24:42 -05:00
|
|
|
)
|
|
|
|
from ..utils import (
|
pull changes from remote master (#190)
* [scrippsnetworks] Add new extractor(closes #19857)(closes #22981)
* [teachable] Improve locked lessons detection (#23528)
* [teachable] Fail with error message if no video URL found
* [extractors] add missing import for ScrippsNetworksIE
* [brightcove] cache brightcove player policy keys
* [prosiebensat1] improve geo restriction handling(closes #23571)
* [soundcloud] automatically update client id on failing requests
* [spankbang] Fix extraction (closes #23307, closes #23423, closes #23444)
* [spankbang] Improve removed video detection (#23423)
* [brightcove] update policy key on failing requests
* [pornhub] Fix extraction and add support for m3u8 formats (closes #22749, closes #23082)
* [pornhub] Improve locked videos detection (closes #22449, closes #22780)
* [brightcove] invalidate policy key cache on failing requests
* [soundcloud] fix client id extraction for non fatal requests
* [ChangeLog] Actualize
[ci skip]
* [devscripts/create-github-release] Switch to using PAT for authentication
Basic authentication will be deprecated soon
* release 2020.01.01
* [redtube] Detect private videos (#23518)
* [vice] improve extraction(closes #23631)
* [devscripts/create-github-release] Remove unused import
* [wistia] improve format extraction and extract subtitles(closes #22590)
* [nrktv:seriebase] Fix extraction (closes #23625) (#23537)
* [discovery] fix anonymous token extraction(closes #23650)
* [scrippsnetworks] add support for www.discovery.com videos
* [scrippsnetworks] correct test case URL
* [dctp] fix format extraction(closes #23656)
* [pandatv] Remove extractor (#23630)
* [naver] improve extraction
- improve geo-restriction handling
- extract automatic captions
- extract uploader metadata
- extract VLive HLS formats
* [naver] improve metadata extraction
* [cloudflarestream] improve extraction
- add support for bytehighway.net domain
- add support for signed URLs
- extract thumbnail
* [cloudflarestream] import embed URL extraction
* [lego] fix extraction and extract subtitle(closes #23687)
* [safari] Fix kaltura session extraction (closes #23679) (#23670)
* [orf:fm4] Fix extraction (#23599)
* [orf:radio] Clean description and improve extraction
* [twitter] add support for promo_video_website cards(closes #23711)
* [vodplatform] add support for embed.kwikmotion.com domain
* [ndr:base:embed] Improve thumbnails extraction (closes #23731)
* [canvas] Add support for new API endpoint and update tests (closes #17680, closes #18629)
* [travis] Add flake8 job (#23720)
* [yourporn] Fix extraction (closes #21645, closes #22255, closes #23459)
* [ChangeLog] Actualize
[ci skip]
* release 2020.01.15
* [soundcloud] Restore previews extraction (closes #23739)
* [orf:tvthek] Improve geo restricted videos detection (closes #23741)
* [zype] improve extraction
- extract subtitles(closes #21258)
- support URLs with alternative keys/tokens(#21258)
- extract more metadata
* [americastestkitchen] fix extraction
* [nbc] add support for nbc multi network URLs(closes #23049)
* [ard] improve extraction(closes #23761)
- simplify extraction
- extract age limit and series
- bypass geo-restriction
* [ivi:compilation] Fix entries extraction (closes #23770)
* [24video] Add support for 24video.vip (closes #23753)
* [businessinsider] Fix jwplatform id extraction (closes #22929) (#22954)
* [ard] add a missing condition
* [azmedien] fix extraction(closes #23783)
* [voicerepublic] fix extraction
* [stretchinternet] fix extraction(closes #4319)
* [youtube] Fix sigfunc name extraction (closes #23819)
* [ChangeLog] Actualize
[ci skip]
* release 2020.01.24
* [soundcloud] imporve private playlist/set tracks extraction
https://github.com/ytdl-org/youtube-dl/issues/3707#issuecomment-577873539
* [svt] fix article extraction(closes #22897)(closes #22919)
* [svt] fix series extraction(closes #22297)
* [viewlift] improve extraction
- fix extraction(closes #23851)
- add add support for authentication
- add support for more domains
* [vimeo] fix album extraction(closes #23864)
* [tva] Relax _VALID_URL (closes #23903)
* [tv5mondeplus] Fix extraction (closes #23907, closes #23911)
* [twitch:stream] Lowercase channel id for stream request (closes #23917)
* [sportdeutschland] Update to new sportdeutschland API
They switched to SSL, but under a different host AND path...
Remove the old test cases because these videos have become unavailable.
* [popcorntimes] Add extractor (closes #23949)
* [thisoldhouse] fix extraction(closes #23951)
* [toggle] Add support for mewatch.sg (closes #23895) (#23930)
* [compat] Introduce compat_realpath (refs #23991)
* [update] Fix updating via symlinks (closes #23991)
* [nytimes] improve format sorting(closes #24010)
* [abc:iview] Support 720p (#22907) (#22921)
* [nova:embed] Fix extraction (closes #23672)
* [nova:embed] Improve (closes #23690)
* [nova] Improve extraction (refs #23690)
* [jpopsuki] Remove extractor (closes #23858)
* [YoutubeDL] Fix playlist entry indexing with --playlist-items (closes #10591, closes #10622)
* [test_YoutubeDL] Fix get_ids
* [test_YoutubeDL] Add tests for #10591 (closes #23873)
* [24video] Add support for porn.24video.net (closes #23779, closes #23784)
* [npr] Add support for streams (closes #24042)
* [ChangeLog] Actualize
[ci skip]
* release 2020.02.16
* [tv2dk:bornholm:play] Fix extraction (#24076)
* [imdb] Fix extraction (closes #23443)
* [wistia] Add support for multiple generic embeds (closes #8347, closes #11385)
* [teachable] Add support for multiple videos per lecture (closes #24101)
* [pornhd] Fix extraction (closes #24128)
* [options] Remove duplicate short option -v for --version (#24162)
* [extractor/common] Convert ISM manifest to unicode before processing on python 2 (#24152)
* [YoutubeDL] Force redirect URL to unicode on python 2
* Remove no longer needed compat_str around geturl
* [youjizz] Fix extraction (closes #24181)
* [test_subtitles] Remove obsolete test
* [zdf:channel] Fix tests
* [zapiks] Fix test
* [xtube] Fix metadata extraction (closes #21073, closes #22455)
* [xtube:user] Fix test
* [telecinco] Fix extraction (refs #24195)
* [telecinco] Add support for article opening videos
* [franceculture] Fix extraction (closes #24204)
* [xhamster] Fix extraction (closes #24205)
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.01
* [vimeo] Fix subtitles URLs (#24209)
* [servus] Add support for new URL schema (closes #23475, closes #23583, closes #24142)
* [youtube:playlist] Fix tests (closes #23872) (#23885)
* [peertube] Improve extraction
* [peertube] Fix issues and improve extraction (closes #23657)
* [pornhub] Improve title extraction (closes #24184)
* [vimeo] fix showcase password protected video extraction(closes #24224)
* [youtube] Fix age-gated videos support without login (closes #24248)
* [youtube] Fix tests
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.06
* [nhk] update API version(closes #24270)
* [youtube] Improve extraction in 429 error conditions (closes #24283)
* [youtube] Improve age-gated videos extraction in 429 error conditions (refs #24283)
* [youtube] Remove outdated code
Additional get_video_info requests don't seem to provide any extra itags any longer
* [README.md] Clarify 429 error
* [pornhub] Add support for pornhubpremium.com (#24288)
* [utils] Add support for cookies with spaces used instead of tabs
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.08
* Revert "[utils] Add support for cookies with spaces used instead of tabs"
According to [1] TABs must be used as separators between fields.
Files produces by some tools with spaces as separators are considered
malformed.
1. https://curl.haxx.se/docs/http-cookies.html
This reverts commit cff99c91d150df2a4e21962a3ca8d4ae94533b8c.
* [utils] Add reference to cookie file format
* Revert "[vimeo] fix showcase password protected video extraction(closes #24224)"
This reverts commit 12ee431676bb655f04c7dd416a73c1f142ed368d.
* [nhk] Relax _VALID_URL (#24329)
* [nhk] Remove obsolete rtmp formats (closes #24329)
* [nhk] Update m3u8 URL and use native hls (#24329)
* [ndr] Fix extraction (closes #24326)
* [xtube] Fix formats extraction (closes #24348)
* [xtube] Fix typo
* [hellporno] Fix extraction (closes #24399)
* [cbc:watch] Add support for authentication
* [cbc:watch] Fix authenticated device token caching (closes #19160)
* [soundcloud] fix download url extraction(closes #24394)
* [limelight] remove disabled API requests(closes #24255)
* [bilibili] Add support for new URL schema with BV ids (closes #24439, closes #24442)
* [bilibili] Add support for player.bilibili.com (closes #24402)
* [teachable] Extract chapter metadata (closes #24421)
* [generic] Look for teachable embeds before wistia
* [teachable] Update upskillcourses domain
New version does not use teachable platform any longer
* [teachable] Update gns3 domain
* [teachable] Update test
* [ChangeLog] Actualize
[ci skip]
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.24
* [spankwire] Fix extraction (closes #18924, closes #20648)
* [spankwire] Add support for generic embeds (refs #24633)
* [youporn] Add support form generic embeds
* [mofosex] Add support for generic embeds (closes #24633)
* [tele5] Fix extraction (closes #24553)
* [extractor/common] Skip malformed ISM manifest XMLs while extracting ISM formats (#24667)
* [tv4] Fix ISM formats extraction (closes #24667)
* [twitch:clips] Extend _VALID_URL (closes #24290) (#24642)
* [motherless] Fix extraction (closes #24699)
* [nova:embed] Fix extraction (closes #24700)
* [youtube] Skip broken multifeed videos (closes #24711)
* [soundcloud] Extract AAC format
* [soundcloud] Improve AAC format extraction (closes #19173, closes #24708)
* [thisoldhouse] Fix video id extraction (closes #24548)
Added support for:
with of without "www."
and either ".chorus.build" or ".com"
It now validated correctly on older URL's
```
<iframe src="https://thisoldhouse.chorus.build/videos/zype/5e33baec27d2e50001d5f52f
```
and newer ones
```
<iframe src="https://www.thisoldhouse.com/videos/zype/5e2b70e95216cc0001615120
```
* [thisoldhouse] Improve video id extraction (closes #24549)
* [youtube] Fix DRM videos detection (refs #24736)
* [options] Clarify doc on --exec command (closes #19087) (#24883)
* [prosiebensat1] Improve extraction and remove 7tv.de support (#24948)
* [prosiebensat1] Extract series metadata
* [tenplay] Relax _VALID_URL (closes #25001)
* [tvplay] fix Viafree extraction(closes #15189)(closes #24473)(closes #24789)
* [yahoo] fix GYAO Player extraction and relax title URL regex(closes #24178)(closes #24778)
* [youtube] Use redirected video id if any (closes #25063)
* [youtube] Improve player id extraction and add tests
* [extractor/common] Extract multiple JSON-LD entries
* [crunchyroll] Fix and improve extraction (closes #25096, closes #25060)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.03
* [puhutv] Remove no longer available HTTP formats (closes #25124)
* [utils] Improve cookie files support
+ Add support for UTF-8 in cookie files
* Skip malformed cookie file entries instead of crashing (invalid entry len, invalid expires at)
* [dailymotion] Fix typo
* [compat] Introduce compat_cookiejar_Cookie
* [extractor/common] Use compat_cookiejar_Cookie for _set_cookie (closes #23256, closes #24776)
To always ensure cookie name and value are bytestrings on python 2.
* [orf] Add support for more radio stations (closes #24938) (#24968)
* [uol] fix extraction(closes #22007)
* [downloader/http] Finish downloading once received data length matches expected
Always do this if possible, i.e. if Content-Length or expected length is known, not only in test.
This will save unnecessary last extra loop trying to read 0 bytes.
* [downloader/http] Request last data block of exact remaining size
Always request last data block of exact size remaining to download if possible not the current block size.
* [iprima] Improve extraction (closes #25138)
* [youtube] Improve signature cipher extraction (closes #25188)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.08
* [spike] fix Bellator mgid extraction(closes #25195)
* [bbccouk] PEP8
* [mailru] Fix extraction (closes #24530) (#25239)
* [README.md] flake8 HTTPS URL (#25230)
* [youtube] Add support for yewtu.be (#25226)
* [soundcloud] reduce API playlist page limit(closes #25274)
* [vimeo] improve format extraction and sorting(closes #25285)
* [redtube] Improve title extraction (#25208)
* [indavideo] Switch to HTTPS for API request (#25191)
* [utils] Fix file permissions in write_json_file (closes #12471) (#25122)
* [redtube] Improve formats extraction and extract m3u8 formats (closes #25311, closes #25321)
* [ard] Improve _VALID_URL (closes #25134) (#25198)
* [giantbomb] Extend _VALID_URL (#25222)
* [postprocessor/ffmpeg] Embed series metadata with --add-metadata
* [youtube] Add support for more invidious instances (#25417)
* [ard:beta] Extend _VALID_URL (closes #25405)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.29
* [jwplatform] Improve embeds extraction (closes #25467)
* [periscope] Fix untitled broadcasts (#25482)
* [twitter:broadcast] Add untitled periscope broadcast test
* [malltv] Add support for sk.mall.tv (#25445)
* [brightcove] Fix subtitles extraction (closes #25540)
* [brightcove] Sort imports
* [twitch] Pass v5 accept header and fix thumbnails extraction (closes #25531)
* [twitch:stream] Fix extraction (closes #25528)
* [twitch:stream] Expect 400 and 410 HTTP errors from API
* [tele5] Prefer jwplatform over nexx (closes #25533)
* [jwplatform] Add support for bypass geo restriction
* [tele5] Bypass geo restriction
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.06
* [kaltura] Add support for multiple embeds on a webpage (closes #25523)
* [youtube] Extract chapters from JSON (closes #24819)
* [facebook] Support single-video ID links
I stumbled upon this at https://www.facebook.com/bwfbadminton/posts/10157127020046316 . No idea how prevalent it is yet.
* [youtube] Fix playlist and feed extraction (closes #25675)
* [youtube] Fix thumbnails extraction and remove uploader id extraction warning (closes #25676)
* [youtube] Fix upload date extraction
* [youtube] Improve view count extraction
* [youtube] Fix uploader id and uploader URL extraction
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.16
* [youtube] Fix categories and improve tags extraction
* [youtube] Force old layout (closes #25682, closes #25683, closes #25680, closes #25686)
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.16.1
* [brightcove] Improve embed detection (closes #25674)
* [bellmedia] add support for cp24.com clip URLs(closes #25764)
* [youtube:playlists] Extend _VALID_URL (closes #25810)
* [youtube] Prevent excess HTTP 301 (#25786)
* [wistia] Restrict embed regex (closes #25969)
* [youtube] Improve description extraction (closes #25937) (#25980)
* [youtube] Fix sigfunc name extraction (closes #26134, closes #26135, closes #26136, closes #26137)
* [ChangeLog] Actualize
[ci skip]
* release 2020.07.28
* [xhamster] Extend _VALID_URL (closes #25789) (#25804)
* [xhamster] Fix extraction (closes #26157) (#26254)
* [xhamster] Extend _VALID_URL (closes #25927)
Co-authored-by: Remita Amine <remitamine@gmail.com>
Co-authored-by: Sergey M․ <dstftw@gmail.com>
Co-authored-by: nmeum <soeren+github@soeren-tempel.net>
Co-authored-by: Roxedus <me@roxedus.dev>
Co-authored-by: Singwai Chan <c.singwai@gmail.com>
Co-authored-by: cdarlint <cdarlint@users.noreply.github.com>
Co-authored-by: Johannes N <31795504+jonolt@users.noreply.github.com>
Co-authored-by: jnozsc <jnozsc@gmail.com>
Co-authored-by: Moritz Patelscheck <moritz.patelscheck@campus.tu-berlin.de>
Co-authored-by: PB <3854688+uno20001@users.noreply.github.com>
Co-authored-by: Philipp Hagemeister <phihag@phihag.de>
Co-authored-by: Xaver Hellauer <software@hellauer.bayern>
Co-authored-by: d2au <d2au.dev@gmail.com>
Co-authored-by: Jan 'Yenda' Trmal <jtrmal@gmail.com>
Co-authored-by: jxu <7989982+jxu@users.noreply.github.com>
Co-authored-by: Martin Ström <name@my-domain.se>
Co-authored-by: The Hatsune Daishi <nao20010128@gmail.com>
Co-authored-by: tsia <github@tsia.de>
Co-authored-by: 3risian <59593325+3risian@users.noreply.github.com>
Co-authored-by: Tristan Waddington <tristan.waddington@gmail.com>
Co-authored-by: Devon Meunier <devon.meunier@gmail.com>
Co-authored-by: Felix Stupp <felix.stupp@outlook.com>
Co-authored-by: tom <tomster954@gmail.com>
Co-authored-by: AndrewMBL <62922222+AndrewMBL@users.noreply.github.com>
Co-authored-by: willbeaufoy <will@willbeaufoy.net>
Co-authored-by: Philipp Stehle <anderschwiedu@googlemail.com>
Co-authored-by: hh0rva1h <61889859+hh0rva1h@users.noreply.github.com>
Co-authored-by: comsomisha <shmelev1996@mail.ru>
Co-authored-by: TotalCaesar659 <14265316+TotalCaesar659@users.noreply.github.com>
Co-authored-by: Juan Francisco Cantero Hurtado <iam@juanfra.info>
Co-authored-by: Dave Loyall <dave@the-good-guys.net>
Co-authored-by: tlsssl <63866177+tlsssl@users.noreply.github.com>
Co-authored-by: Rob <ankenyr@gmail.com>
Co-authored-by: Michael Klein <github@a98shuttle.de>
Co-authored-by: JordanWeatherby <47519158+JordanWeatherby@users.noreply.github.com>
Co-authored-by: striker.sh <19488257+strikersh@users.noreply.github.com>
Co-authored-by: Matej Dujava <mdujava@gmail.com>
Co-authored-by: Glenn Slayden <5589855+glenn-slayden@users.noreply.github.com>
Co-authored-by: MRWITEK <mrvvitek@gmail.com>
Co-authored-by: JChris246 <43832407+JChris246@users.noreply.github.com>
Co-authored-by: TheRealDude2 <the.real.dude@gmx.de>
2020-08-25 10:53:34 -04:00
|
|
|
ExtractorError,
|
2020-08-26 10:52:32 -04:00
|
|
|
extract_attributes,
|
2014-12-13 06:24:42 -05:00
|
|
|
find_xpath_attr,
|
|
|
|
fix_xml_ampersands,
|
2015-11-13 18:09:50 -05:00
|
|
|
float_or_none,
|
pull changes from remote master (#190)
* [scrippsnetworks] Add new extractor(closes #19857)(closes #22981)
* [teachable] Improve locked lessons detection (#23528)
* [teachable] Fail with error message if no video URL found
* [extractors] add missing import for ScrippsNetworksIE
* [brightcove] cache brightcove player policy keys
* [prosiebensat1] improve geo restriction handling(closes #23571)
* [soundcloud] automatically update client id on failing requests
* [spankbang] Fix extraction (closes #23307, closes #23423, closes #23444)
* [spankbang] Improve removed video detection (#23423)
* [brightcove] update policy key on failing requests
* [pornhub] Fix extraction and add support for m3u8 formats (closes #22749, closes #23082)
* [pornhub] Improve locked videos detection (closes #22449, closes #22780)
* [brightcove] invalidate policy key cache on failing requests
* [soundcloud] fix client id extraction for non fatal requests
* [ChangeLog] Actualize
[ci skip]
* [devscripts/create-github-release] Switch to using PAT for authentication
Basic authentication will be deprecated soon
* release 2020.01.01
* [redtube] Detect private videos (#23518)
* [vice] improve extraction(closes #23631)
* [devscripts/create-github-release] Remove unused import
* [wistia] improve format extraction and extract subtitles(closes #22590)
* [nrktv:seriebase] Fix extraction (closes #23625) (#23537)
* [discovery] fix anonymous token extraction(closes #23650)
* [scrippsnetworks] add support for www.discovery.com videos
* [scrippsnetworks] correct test case URL
* [dctp] fix format extraction(closes #23656)
* [pandatv] Remove extractor (#23630)
* [naver] improve extraction
- improve geo-restriction handling
- extract automatic captions
- extract uploader metadata
- extract VLive HLS formats
* [naver] improve metadata extraction
* [cloudflarestream] improve extraction
- add support for bytehighway.net domain
- add support for signed URLs
- extract thumbnail
* [cloudflarestream] import embed URL extraction
* [lego] fix extraction and extract subtitle(closes #23687)
* [safari] Fix kaltura session extraction (closes #23679) (#23670)
* [orf:fm4] Fix extraction (#23599)
* [orf:radio] Clean description and improve extraction
* [twitter] add support for promo_video_website cards(closes #23711)
* [vodplatform] add support for embed.kwikmotion.com domain
* [ndr:base:embed] Improve thumbnails extraction (closes #23731)
* [canvas] Add support for new API endpoint and update tests (closes #17680, closes #18629)
* [travis] Add flake8 job (#23720)
* [yourporn] Fix extraction (closes #21645, closes #22255, closes #23459)
* [ChangeLog] Actualize
[ci skip]
* release 2020.01.15
* [soundcloud] Restore previews extraction (closes #23739)
* [orf:tvthek] Improve geo restricted videos detection (closes #23741)
* [zype] improve extraction
- extract subtitles(closes #21258)
- support URLs with alternative keys/tokens(#21258)
- extract more metadata
* [americastestkitchen] fix extraction
* [nbc] add support for nbc multi network URLs(closes #23049)
* [ard] improve extraction(closes #23761)
- simplify extraction
- extract age limit and series
- bypass geo-restriction
* [ivi:compilation] Fix entries extraction (closes #23770)
* [24video] Add support for 24video.vip (closes #23753)
* [businessinsider] Fix jwplatform id extraction (closes #22929) (#22954)
* [ard] add a missing condition
* [azmedien] fix extraction(closes #23783)
* [voicerepublic] fix extraction
* [stretchinternet] fix extraction(closes #4319)
* [youtube] Fix sigfunc name extraction (closes #23819)
* [ChangeLog] Actualize
[ci skip]
* release 2020.01.24
* [soundcloud] imporve private playlist/set tracks extraction
https://github.com/ytdl-org/youtube-dl/issues/3707#issuecomment-577873539
* [svt] fix article extraction(closes #22897)(closes #22919)
* [svt] fix series extraction(closes #22297)
* [viewlift] improve extraction
- fix extraction(closes #23851)
- add add support for authentication
- add support for more domains
* [vimeo] fix album extraction(closes #23864)
* [tva] Relax _VALID_URL (closes #23903)
* [tv5mondeplus] Fix extraction (closes #23907, closes #23911)
* [twitch:stream] Lowercase channel id for stream request (closes #23917)
* [sportdeutschland] Update to new sportdeutschland API
They switched to SSL, but under a different host AND path...
Remove the old test cases because these videos have become unavailable.
* [popcorntimes] Add extractor (closes #23949)
* [thisoldhouse] fix extraction(closes #23951)
* [toggle] Add support for mewatch.sg (closes #23895) (#23930)
* [compat] Introduce compat_realpath (refs #23991)
* [update] Fix updating via symlinks (closes #23991)
* [nytimes] improve format sorting(closes #24010)
* [abc:iview] Support 720p (#22907) (#22921)
* [nova:embed] Fix extraction (closes #23672)
* [nova:embed] Improve (closes #23690)
* [nova] Improve extraction (refs #23690)
* [jpopsuki] Remove extractor (closes #23858)
* [YoutubeDL] Fix playlist entry indexing with --playlist-items (closes #10591, closes #10622)
* [test_YoutubeDL] Fix get_ids
* [test_YoutubeDL] Add tests for #10591 (closes #23873)
* [24video] Add support for porn.24video.net (closes #23779, closes #23784)
* [npr] Add support for streams (closes #24042)
* [ChangeLog] Actualize
[ci skip]
* release 2020.02.16
* [tv2dk:bornholm:play] Fix extraction (#24076)
* [imdb] Fix extraction (closes #23443)
* [wistia] Add support for multiple generic embeds (closes #8347, closes #11385)
* [teachable] Add support for multiple videos per lecture (closes #24101)
* [pornhd] Fix extraction (closes #24128)
* [options] Remove duplicate short option -v for --version (#24162)
* [extractor/common] Convert ISM manifest to unicode before processing on python 2 (#24152)
* [YoutubeDL] Force redirect URL to unicode on python 2
* Remove no longer needed compat_str around geturl
* [youjizz] Fix extraction (closes #24181)
* [test_subtitles] Remove obsolete test
* [zdf:channel] Fix tests
* [zapiks] Fix test
* [xtube] Fix metadata extraction (closes #21073, closes #22455)
* [xtube:user] Fix test
* [telecinco] Fix extraction (refs #24195)
* [telecinco] Add support for article opening videos
* [franceculture] Fix extraction (closes #24204)
* [xhamster] Fix extraction (closes #24205)
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.01
* [vimeo] Fix subtitles URLs (#24209)
* [servus] Add support for new URL schema (closes #23475, closes #23583, closes #24142)
* [youtube:playlist] Fix tests (closes #23872) (#23885)
* [peertube] Improve extraction
* [peertube] Fix issues and improve extraction (closes #23657)
* [pornhub] Improve title extraction (closes #24184)
* [vimeo] fix showcase password protected video extraction(closes #24224)
* [youtube] Fix age-gated videos support without login (closes #24248)
* [youtube] Fix tests
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.06
* [nhk] update API version(closes #24270)
* [youtube] Improve extraction in 429 error conditions (closes #24283)
* [youtube] Improve age-gated videos extraction in 429 error conditions (refs #24283)
* [youtube] Remove outdated code
Additional get_video_info requests don't seem to provide any extra itags any longer
* [README.md] Clarify 429 error
* [pornhub] Add support for pornhubpremium.com (#24288)
* [utils] Add support for cookies with spaces used instead of tabs
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.08
* Revert "[utils] Add support for cookies with spaces used instead of tabs"
According to [1] TABs must be used as separators between fields.
Files produces by some tools with spaces as separators are considered
malformed.
1. https://curl.haxx.se/docs/http-cookies.html
This reverts commit cff99c91d150df2a4e21962a3ca8d4ae94533b8c.
* [utils] Add reference to cookie file format
* Revert "[vimeo] fix showcase password protected video extraction(closes #24224)"
This reverts commit 12ee431676bb655f04c7dd416a73c1f142ed368d.
* [nhk] Relax _VALID_URL (#24329)
* [nhk] Remove obsolete rtmp formats (closes #24329)
* [nhk] Update m3u8 URL and use native hls (#24329)
* [ndr] Fix extraction (closes #24326)
* [xtube] Fix formats extraction (closes #24348)
* [xtube] Fix typo
* [hellporno] Fix extraction (closes #24399)
* [cbc:watch] Add support for authentication
* [cbc:watch] Fix authenticated device token caching (closes #19160)
* [soundcloud] fix download url extraction(closes #24394)
* [limelight] remove disabled API requests(closes #24255)
* [bilibili] Add support for new URL schema with BV ids (closes #24439, closes #24442)
* [bilibili] Add support for player.bilibili.com (closes #24402)
* [teachable] Extract chapter metadata (closes #24421)
* [generic] Look for teachable embeds before wistia
* [teachable] Update upskillcourses domain
New version does not use teachable platform any longer
* [teachable] Update gns3 domain
* [teachable] Update test
* [ChangeLog] Actualize
[ci skip]
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.24
* [spankwire] Fix extraction (closes #18924, closes #20648)
* [spankwire] Add support for generic embeds (refs #24633)
* [youporn] Add support form generic embeds
* [mofosex] Add support for generic embeds (closes #24633)
* [tele5] Fix extraction (closes #24553)
* [extractor/common] Skip malformed ISM manifest XMLs while extracting ISM formats (#24667)
* [tv4] Fix ISM formats extraction (closes #24667)
* [twitch:clips] Extend _VALID_URL (closes #24290) (#24642)
* [motherless] Fix extraction (closes #24699)
* [nova:embed] Fix extraction (closes #24700)
* [youtube] Skip broken multifeed videos (closes #24711)
* [soundcloud] Extract AAC format
* [soundcloud] Improve AAC format extraction (closes #19173, closes #24708)
* [thisoldhouse] Fix video id extraction (closes #24548)
Added support for:
with of without "www."
and either ".chorus.build" or ".com"
It now validated correctly on older URL's
```
<iframe src="https://thisoldhouse.chorus.build/videos/zype/5e33baec27d2e50001d5f52f
```
and newer ones
```
<iframe src="https://www.thisoldhouse.com/videos/zype/5e2b70e95216cc0001615120
```
* [thisoldhouse] Improve video id extraction (closes #24549)
* [youtube] Fix DRM videos detection (refs #24736)
* [options] Clarify doc on --exec command (closes #19087) (#24883)
* [prosiebensat1] Improve extraction and remove 7tv.de support (#24948)
* [prosiebensat1] Extract series metadata
* [tenplay] Relax _VALID_URL (closes #25001)
* [tvplay] fix Viafree extraction(closes #15189)(closes #24473)(closes #24789)
* [yahoo] fix GYAO Player extraction and relax title URL regex(closes #24178)(closes #24778)
* [youtube] Use redirected video id if any (closes #25063)
* [youtube] Improve player id extraction and add tests
* [extractor/common] Extract multiple JSON-LD entries
* [crunchyroll] Fix and improve extraction (closes #25096, closes #25060)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.03
* [puhutv] Remove no longer available HTTP formats (closes #25124)
* [utils] Improve cookie files support
+ Add support for UTF-8 in cookie files
* Skip malformed cookie file entries instead of crashing (invalid entry len, invalid expires at)
* [dailymotion] Fix typo
* [compat] Introduce compat_cookiejar_Cookie
* [extractor/common] Use compat_cookiejar_Cookie for _set_cookie (closes #23256, closes #24776)
To always ensure cookie name and value are bytestrings on python 2.
* [orf] Add support for more radio stations (closes #24938) (#24968)
* [uol] fix extraction(closes #22007)
* [downloader/http] Finish downloading once received data length matches expected
Always do this if possible, i.e. if Content-Length or expected length is known, not only in test.
This will save unnecessary last extra loop trying to read 0 bytes.
* [downloader/http] Request last data block of exact remaining size
Always request last data block of exact size remaining to download if possible not the current block size.
* [iprima] Improve extraction (closes #25138)
* [youtube] Improve signature cipher extraction (closes #25188)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.08
* [spike] fix Bellator mgid extraction(closes #25195)
* [bbccouk] PEP8
* [mailru] Fix extraction (closes #24530) (#25239)
* [README.md] flake8 HTTPS URL (#25230)
* [youtube] Add support for yewtu.be (#25226)
* [soundcloud] reduce API playlist page limit(closes #25274)
* [vimeo] improve format extraction and sorting(closes #25285)
* [redtube] Improve title extraction (#25208)
* [indavideo] Switch to HTTPS for API request (#25191)
* [utils] Fix file permissions in write_json_file (closes #12471) (#25122)
* [redtube] Improve formats extraction and extract m3u8 formats (closes #25311, closes #25321)
* [ard] Improve _VALID_URL (closes #25134) (#25198)
* [giantbomb] Extend _VALID_URL (#25222)
* [postprocessor/ffmpeg] Embed series metadata with --add-metadata
* [youtube] Add support for more invidious instances (#25417)
* [ard:beta] Extend _VALID_URL (closes #25405)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.29
* [jwplatform] Improve embeds extraction (closes #25467)
* [periscope] Fix untitled broadcasts (#25482)
* [twitter:broadcast] Add untitled periscope broadcast test
* [malltv] Add support for sk.mall.tv (#25445)
* [brightcove] Fix subtitles extraction (closes #25540)
* [brightcove] Sort imports
* [twitch] Pass v5 accept header and fix thumbnails extraction (closes #25531)
* [twitch:stream] Fix extraction (closes #25528)
* [twitch:stream] Expect 400 and 410 HTTP errors from API
* [tele5] Prefer jwplatform over nexx (closes #25533)
* [jwplatform] Add support for bypass geo restriction
* [tele5] Bypass geo restriction
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.06
* [kaltura] Add support for multiple embeds on a webpage (closes #25523)
* [youtube] Extract chapters from JSON (closes #24819)
* [facebook] Support single-video ID links
I stumbled upon this at https://www.facebook.com/bwfbadminton/posts/10157127020046316 . No idea how prevalent it is yet.
* [youtube] Fix playlist and feed extraction (closes #25675)
* [youtube] Fix thumbnails extraction and remove uploader id extraction warning (closes #25676)
* [youtube] Fix upload date extraction
* [youtube] Improve view count extraction
* [youtube] Fix uploader id and uploader URL extraction
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.16
* [youtube] Fix categories and improve tags extraction
* [youtube] Force old layout (closes #25682, closes #25683, closes #25680, closes #25686)
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.16.1
* [brightcove] Improve embed detection (closes #25674)
* [bellmedia] add support for cp24.com clip URLs(closes #25764)
* [youtube:playlists] Extend _VALID_URL (closes #25810)
* [youtube] Prevent excess HTTP 301 (#25786)
* [wistia] Restrict embed regex (closes #25969)
* [youtube] Improve description extraction (closes #25937) (#25980)
* [youtube] Fix sigfunc name extraction (closes #26134, closes #26135, closes #26136, closes #26137)
* [ChangeLog] Actualize
[ci skip]
* release 2020.07.28
* [xhamster] Extend _VALID_URL (closes #25789) (#25804)
* [xhamster] Fix extraction (closes #26157) (#26254)
* [xhamster] Extend _VALID_URL (closes #25927)
Co-authored-by: Remita Amine <remitamine@gmail.com>
Co-authored-by: Sergey M․ <dstftw@gmail.com>
Co-authored-by: nmeum <soeren+github@soeren-tempel.net>
Co-authored-by: Roxedus <me@roxedus.dev>
Co-authored-by: Singwai Chan <c.singwai@gmail.com>
Co-authored-by: cdarlint <cdarlint@users.noreply.github.com>
Co-authored-by: Johannes N <31795504+jonolt@users.noreply.github.com>
Co-authored-by: jnozsc <jnozsc@gmail.com>
Co-authored-by: Moritz Patelscheck <moritz.patelscheck@campus.tu-berlin.de>
Co-authored-by: PB <3854688+uno20001@users.noreply.github.com>
Co-authored-by: Philipp Hagemeister <phihag@phihag.de>
Co-authored-by: Xaver Hellauer <software@hellauer.bayern>
Co-authored-by: d2au <d2au.dev@gmail.com>
Co-authored-by: Jan 'Yenda' Trmal <jtrmal@gmail.com>
Co-authored-by: jxu <7989982+jxu@users.noreply.github.com>
Co-authored-by: Martin Ström <name@my-domain.se>
Co-authored-by: The Hatsune Daishi <nao20010128@gmail.com>
Co-authored-by: tsia <github@tsia.de>
Co-authored-by: 3risian <59593325+3risian@users.noreply.github.com>
Co-authored-by: Tristan Waddington <tristan.waddington@gmail.com>
Co-authored-by: Devon Meunier <devon.meunier@gmail.com>
Co-authored-by: Felix Stupp <felix.stupp@outlook.com>
Co-authored-by: tom <tomster954@gmail.com>
Co-authored-by: AndrewMBL <62922222+AndrewMBL@users.noreply.github.com>
Co-authored-by: willbeaufoy <will@willbeaufoy.net>
Co-authored-by: Philipp Stehle <anderschwiedu@googlemail.com>
Co-authored-by: hh0rva1h <61889859+hh0rva1h@users.noreply.github.com>
Co-authored-by: comsomisha <shmelev1996@mail.ru>
Co-authored-by: TotalCaesar659 <14265316+TotalCaesar659@users.noreply.github.com>
Co-authored-by: Juan Francisco Cantero Hurtado <iam@juanfra.info>
Co-authored-by: Dave Loyall <dave@the-good-guys.net>
Co-authored-by: tlsssl <63866177+tlsssl@users.noreply.github.com>
Co-authored-by: Rob <ankenyr@gmail.com>
Co-authored-by: Michael Klein <github@a98shuttle.de>
Co-authored-by: JordanWeatherby <47519158+JordanWeatherby@users.noreply.github.com>
Co-authored-by: striker.sh <19488257+strikersh@users.noreply.github.com>
Co-authored-by: Matej Dujava <mdujava@gmail.com>
Co-authored-by: Glenn Slayden <5589855+glenn-slayden@users.noreply.github.com>
Co-authored-by: MRWITEK <mrvvitek@gmail.com>
Co-authored-by: JChris246 <43832407+JChris246@users.noreply.github.com>
Co-authored-by: TheRealDude2 <the.real.dude@gmx.de>
2020-08-25 10:53:34 -04:00
|
|
|
js_to_json,
|
2020-08-26 10:52:32 -04:00
|
|
|
int_or_none,
|
2015-09-10 23:46:21 -04:00
|
|
|
parse_iso8601,
|
2019-09-19 13:02:26 -04:00
|
|
|
smuggle_url,
|
2015-11-13 19:08:36 -05:00
|
|
|
unescapeHTML,
|
|
|
|
unsmuggle_url,
|
pull changes from remote master (#190)
* [scrippsnetworks] Add new extractor(closes #19857)(closes #22981)
* [teachable] Improve locked lessons detection (#23528)
* [teachable] Fail with error message if no video URL found
* [extractors] add missing import for ScrippsNetworksIE
* [brightcove] cache brightcove player policy keys
* [prosiebensat1] improve geo restriction handling(closes #23571)
* [soundcloud] automatically update client id on failing requests
* [spankbang] Fix extraction (closes #23307, closes #23423, closes #23444)
* [spankbang] Improve removed video detection (#23423)
* [brightcove] update policy key on failing requests
* [pornhub] Fix extraction and add support for m3u8 formats (closes #22749, closes #23082)
* [pornhub] Improve locked videos detection (closes #22449, closes #22780)
* [brightcove] invalidate policy key cache on failing requests
* [soundcloud] fix client id extraction for non fatal requests
* [ChangeLog] Actualize
[ci skip]
* [devscripts/create-github-release] Switch to using PAT for authentication
Basic authentication will be deprecated soon
* release 2020.01.01
* [redtube] Detect private videos (#23518)
* [vice] improve extraction(closes #23631)
* [devscripts/create-github-release] Remove unused import
* [wistia] improve format extraction and extract subtitles(closes #22590)
* [nrktv:seriebase] Fix extraction (closes #23625) (#23537)
* [discovery] fix anonymous token extraction(closes #23650)
* [scrippsnetworks] add support for www.discovery.com videos
* [scrippsnetworks] correct test case URL
* [dctp] fix format extraction(closes #23656)
* [pandatv] Remove extractor (#23630)
* [naver] improve extraction
- improve geo-restriction handling
- extract automatic captions
- extract uploader metadata
- extract VLive HLS formats
* [naver] improve metadata extraction
* [cloudflarestream] improve extraction
- add support for bytehighway.net domain
- add support for signed URLs
- extract thumbnail
* [cloudflarestream] import embed URL extraction
* [lego] fix extraction and extract subtitle(closes #23687)
* [safari] Fix kaltura session extraction (closes #23679) (#23670)
* [orf:fm4] Fix extraction (#23599)
* [orf:radio] Clean description and improve extraction
* [twitter] add support for promo_video_website cards(closes #23711)
* [vodplatform] add support for embed.kwikmotion.com domain
* [ndr:base:embed] Improve thumbnails extraction (closes #23731)
* [canvas] Add support for new API endpoint and update tests (closes #17680, closes #18629)
* [travis] Add flake8 job (#23720)
* [yourporn] Fix extraction (closes #21645, closes #22255, closes #23459)
* [ChangeLog] Actualize
[ci skip]
* release 2020.01.15
* [soundcloud] Restore previews extraction (closes #23739)
* [orf:tvthek] Improve geo restricted videos detection (closes #23741)
* [zype] improve extraction
- extract subtitles(closes #21258)
- support URLs with alternative keys/tokens(#21258)
- extract more metadata
* [americastestkitchen] fix extraction
* [nbc] add support for nbc multi network URLs(closes #23049)
* [ard] improve extraction(closes #23761)
- simplify extraction
- extract age limit and series
- bypass geo-restriction
* [ivi:compilation] Fix entries extraction (closes #23770)
* [24video] Add support for 24video.vip (closes #23753)
* [businessinsider] Fix jwplatform id extraction (closes #22929) (#22954)
* [ard] add a missing condition
* [azmedien] fix extraction(closes #23783)
* [voicerepublic] fix extraction
* [stretchinternet] fix extraction(closes #4319)
* [youtube] Fix sigfunc name extraction (closes #23819)
* [ChangeLog] Actualize
[ci skip]
* release 2020.01.24
* [soundcloud] imporve private playlist/set tracks extraction
https://github.com/ytdl-org/youtube-dl/issues/3707#issuecomment-577873539
* [svt] fix article extraction(closes #22897)(closes #22919)
* [svt] fix series extraction(closes #22297)
* [viewlift] improve extraction
- fix extraction(closes #23851)
- add add support for authentication
- add support for more domains
* [vimeo] fix album extraction(closes #23864)
* [tva] Relax _VALID_URL (closes #23903)
* [tv5mondeplus] Fix extraction (closes #23907, closes #23911)
* [twitch:stream] Lowercase channel id for stream request (closes #23917)
* [sportdeutschland] Update to new sportdeutschland API
They switched to SSL, but under a different host AND path...
Remove the old test cases because these videos have become unavailable.
* [popcorntimes] Add extractor (closes #23949)
* [thisoldhouse] fix extraction(closes #23951)
* [toggle] Add support for mewatch.sg (closes #23895) (#23930)
* [compat] Introduce compat_realpath (refs #23991)
* [update] Fix updating via symlinks (closes #23991)
* [nytimes] improve format sorting(closes #24010)
* [abc:iview] Support 720p (#22907) (#22921)
* [nova:embed] Fix extraction (closes #23672)
* [nova:embed] Improve (closes #23690)
* [nova] Improve extraction (refs #23690)
* [jpopsuki] Remove extractor (closes #23858)
* [YoutubeDL] Fix playlist entry indexing with --playlist-items (closes #10591, closes #10622)
* [test_YoutubeDL] Fix get_ids
* [test_YoutubeDL] Add tests for #10591 (closes #23873)
* [24video] Add support for porn.24video.net (closes #23779, closes #23784)
* [npr] Add support for streams (closes #24042)
* [ChangeLog] Actualize
[ci skip]
* release 2020.02.16
* [tv2dk:bornholm:play] Fix extraction (#24076)
* [imdb] Fix extraction (closes #23443)
* [wistia] Add support for multiple generic embeds (closes #8347, closes #11385)
* [teachable] Add support for multiple videos per lecture (closes #24101)
* [pornhd] Fix extraction (closes #24128)
* [options] Remove duplicate short option -v for --version (#24162)
* [extractor/common] Convert ISM manifest to unicode before processing on python 2 (#24152)
* [YoutubeDL] Force redirect URL to unicode on python 2
* Remove no longer needed compat_str around geturl
* [youjizz] Fix extraction (closes #24181)
* [test_subtitles] Remove obsolete test
* [zdf:channel] Fix tests
* [zapiks] Fix test
* [xtube] Fix metadata extraction (closes #21073, closes #22455)
* [xtube:user] Fix test
* [telecinco] Fix extraction (refs #24195)
* [telecinco] Add support for article opening videos
* [franceculture] Fix extraction (closes #24204)
* [xhamster] Fix extraction (closes #24205)
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.01
* [vimeo] Fix subtitles URLs (#24209)
* [servus] Add support for new URL schema (closes #23475, closes #23583, closes #24142)
* [youtube:playlist] Fix tests (closes #23872) (#23885)
* [peertube] Improve extraction
* [peertube] Fix issues and improve extraction (closes #23657)
* [pornhub] Improve title extraction (closes #24184)
* [vimeo] fix showcase password protected video extraction(closes #24224)
* [youtube] Fix age-gated videos support without login (closes #24248)
* [youtube] Fix tests
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.06
* [nhk] update API version(closes #24270)
* [youtube] Improve extraction in 429 error conditions (closes #24283)
* [youtube] Improve age-gated videos extraction in 429 error conditions (refs #24283)
* [youtube] Remove outdated code
Additional get_video_info requests don't seem to provide any extra itags any longer
* [README.md] Clarify 429 error
* [pornhub] Add support for pornhubpremium.com (#24288)
* [utils] Add support for cookies with spaces used instead of tabs
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.08
* Revert "[utils] Add support for cookies with spaces used instead of tabs"
According to [1] TABs must be used as separators between fields.
Files produces by some tools with spaces as separators are considered
malformed.
1. https://curl.haxx.se/docs/http-cookies.html
This reverts commit cff99c91d150df2a4e21962a3ca8d4ae94533b8c.
* [utils] Add reference to cookie file format
* Revert "[vimeo] fix showcase password protected video extraction(closes #24224)"
This reverts commit 12ee431676bb655f04c7dd416a73c1f142ed368d.
* [nhk] Relax _VALID_URL (#24329)
* [nhk] Remove obsolete rtmp formats (closes #24329)
* [nhk] Update m3u8 URL and use native hls (#24329)
* [ndr] Fix extraction (closes #24326)
* [xtube] Fix formats extraction (closes #24348)
* [xtube] Fix typo
* [hellporno] Fix extraction (closes #24399)
* [cbc:watch] Add support for authentication
* [cbc:watch] Fix authenticated device token caching (closes #19160)
* [soundcloud] fix download url extraction(closes #24394)
* [limelight] remove disabled API requests(closes #24255)
* [bilibili] Add support for new URL schema with BV ids (closes #24439, closes #24442)
* [bilibili] Add support for player.bilibili.com (closes #24402)
* [teachable] Extract chapter metadata (closes #24421)
* [generic] Look for teachable embeds before wistia
* [teachable] Update upskillcourses domain
New version does not use teachable platform any longer
* [teachable] Update gns3 domain
* [teachable] Update test
* [ChangeLog] Actualize
[ci skip]
* [ChangeLog] Actualize
[ci skip]
* release 2020.03.24
* [spankwire] Fix extraction (closes #18924, closes #20648)
* [spankwire] Add support for generic embeds (refs #24633)
* [youporn] Add support form generic embeds
* [mofosex] Add support for generic embeds (closes #24633)
* [tele5] Fix extraction (closes #24553)
* [extractor/common] Skip malformed ISM manifest XMLs while extracting ISM formats (#24667)
* [tv4] Fix ISM formats extraction (closes #24667)
* [twitch:clips] Extend _VALID_URL (closes #24290) (#24642)
* [motherless] Fix extraction (closes #24699)
* [nova:embed] Fix extraction (closes #24700)
* [youtube] Skip broken multifeed videos (closes #24711)
* [soundcloud] Extract AAC format
* [soundcloud] Improve AAC format extraction (closes #19173, closes #24708)
* [thisoldhouse] Fix video id extraction (closes #24548)
Added support for:
with of without "www."
and either ".chorus.build" or ".com"
It now validated correctly on older URL's
```
<iframe src="https://thisoldhouse.chorus.build/videos/zype/5e33baec27d2e50001d5f52f
```
and newer ones
```
<iframe src="https://www.thisoldhouse.com/videos/zype/5e2b70e95216cc0001615120
```
* [thisoldhouse] Improve video id extraction (closes #24549)
* [youtube] Fix DRM videos detection (refs #24736)
* [options] Clarify doc on --exec command (closes #19087) (#24883)
* [prosiebensat1] Improve extraction and remove 7tv.de support (#24948)
* [prosiebensat1] Extract series metadata
* [tenplay] Relax _VALID_URL (closes #25001)
* [tvplay] fix Viafree extraction(closes #15189)(closes #24473)(closes #24789)
* [yahoo] fix GYAO Player extraction and relax title URL regex(closes #24178)(closes #24778)
* [youtube] Use redirected video id if any (closes #25063)
* [youtube] Improve player id extraction and add tests
* [extractor/common] Extract multiple JSON-LD entries
* [crunchyroll] Fix and improve extraction (closes #25096, closes #25060)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.03
* [puhutv] Remove no longer available HTTP formats (closes #25124)
* [utils] Improve cookie files support
+ Add support for UTF-8 in cookie files
* Skip malformed cookie file entries instead of crashing (invalid entry len, invalid expires at)
* [dailymotion] Fix typo
* [compat] Introduce compat_cookiejar_Cookie
* [extractor/common] Use compat_cookiejar_Cookie for _set_cookie (closes #23256, closes #24776)
To always ensure cookie name and value are bytestrings on python 2.
* [orf] Add support for more radio stations (closes #24938) (#24968)
* [uol] fix extraction(closes #22007)
* [downloader/http] Finish downloading once received data length matches expected
Always do this if possible, i.e. if Content-Length or expected length is known, not only in test.
This will save unnecessary last extra loop trying to read 0 bytes.
* [downloader/http] Request last data block of exact remaining size
Always request last data block of exact size remaining to download if possible not the current block size.
* [iprima] Improve extraction (closes #25138)
* [youtube] Improve signature cipher extraction (closes #25188)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.08
* [spike] fix Bellator mgid extraction(closes #25195)
* [bbccouk] PEP8
* [mailru] Fix extraction (closes #24530) (#25239)
* [README.md] flake8 HTTPS URL (#25230)
* [youtube] Add support for yewtu.be (#25226)
* [soundcloud] reduce API playlist page limit(closes #25274)
* [vimeo] improve format extraction and sorting(closes #25285)
* [redtube] Improve title extraction (#25208)
* [indavideo] Switch to HTTPS for API request (#25191)
* [utils] Fix file permissions in write_json_file (closes #12471) (#25122)
* [redtube] Improve formats extraction and extract m3u8 formats (closes #25311, closes #25321)
* [ard] Improve _VALID_URL (closes #25134) (#25198)
* [giantbomb] Extend _VALID_URL (#25222)
* [postprocessor/ffmpeg] Embed series metadata with --add-metadata
* [youtube] Add support for more invidious instances (#25417)
* [ard:beta] Extend _VALID_URL (closes #25405)
* [ChangeLog] Actualize
[ci skip]
* release 2020.05.29
* [jwplatform] Improve embeds extraction (closes #25467)
* [periscope] Fix untitled broadcasts (#25482)
* [twitter:broadcast] Add untitled periscope broadcast test
* [malltv] Add support for sk.mall.tv (#25445)
* [brightcove] Fix subtitles extraction (closes #25540)
* [brightcove] Sort imports
* [twitch] Pass v5 accept header and fix thumbnails extraction (closes #25531)
* [twitch:stream] Fix extraction (closes #25528)
* [twitch:stream] Expect 400 and 410 HTTP errors from API
* [tele5] Prefer jwplatform over nexx (closes #25533)
* [jwplatform] Add support for bypass geo restriction
* [tele5] Bypass geo restriction
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.06
* [kaltura] Add support for multiple embeds on a webpage (closes #25523)
* [youtube] Extract chapters from JSON (closes #24819)
* [facebook] Support single-video ID links
I stumbled upon this at https://www.facebook.com/bwfbadminton/posts/10157127020046316 . No idea how prevalent it is yet.
* [youtube] Fix playlist and feed extraction (closes #25675)
* [youtube] Fix thumbnails extraction and remove uploader id extraction warning (closes #25676)
* [youtube] Fix upload date extraction
* [youtube] Improve view count extraction
* [youtube] Fix uploader id and uploader URL extraction
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.16
* [youtube] Fix categories and improve tags extraction
* [youtube] Force old layout (closes #25682, closes #25683, closes #25680, closes #25686)
* [ChangeLog] Actualize
[ci skip]
* release 2020.06.16.1
* [brightcove] Improve embed detection (closes #25674)
* [bellmedia] add support for cp24.com clip URLs(closes #25764)
* [youtube:playlists] Extend _VALID_URL (closes #25810)
* [youtube] Prevent excess HTTP 301 (#25786)
* [wistia] Restrict embed regex (closes #25969)
* [youtube] Improve description extraction (closes #25937) (#25980)
* [youtube] Fix sigfunc name extraction (closes #26134, closes #26135, closes #26136, closes #26137)
* [ChangeLog] Actualize
[ci skip]
* release 2020.07.28
* [xhamster] Extend _VALID_URL (closes #25789) (#25804)
* [xhamster] Fix extraction (closes #26157) (#26254)
* [xhamster] Extend _VALID_URL (closes #25927)
Co-authored-by: Remita Amine <remitamine@gmail.com>
Co-authored-by: Sergey M․ <dstftw@gmail.com>
Co-authored-by: nmeum <soeren+github@soeren-tempel.net>
Co-authored-by: Roxedus <me@roxedus.dev>
Co-authored-by: Singwai Chan <c.singwai@gmail.com>
Co-authored-by: cdarlint <cdarlint@users.noreply.github.com>
Co-authored-by: Johannes N <31795504+jonolt@users.noreply.github.com>
Co-authored-by: jnozsc <jnozsc@gmail.com>
Co-authored-by: Moritz Patelscheck <moritz.patelscheck@campus.tu-berlin.de>
Co-authored-by: PB <3854688+uno20001@users.noreply.github.com>
Co-authored-by: Philipp Hagemeister <phihag@phihag.de>
Co-authored-by: Xaver Hellauer <software@hellauer.bayern>
Co-authored-by: d2au <d2au.dev@gmail.com>
Co-authored-by: Jan 'Yenda' Trmal <jtrmal@gmail.com>
Co-authored-by: jxu <7989982+jxu@users.noreply.github.com>
Co-authored-by: Martin Ström <name@my-domain.se>
Co-authored-by: The Hatsune Daishi <nao20010128@gmail.com>
Co-authored-by: tsia <github@tsia.de>
Co-authored-by: 3risian <59593325+3risian@users.noreply.github.com>
Co-authored-by: Tristan Waddington <tristan.waddington@gmail.com>
Co-authored-by: Devon Meunier <devon.meunier@gmail.com>
Co-authored-by: Felix Stupp <felix.stupp@outlook.com>
Co-authored-by: tom <tomster954@gmail.com>
Co-authored-by: AndrewMBL <62922222+AndrewMBL@users.noreply.github.com>
Co-authored-by: willbeaufoy <will@willbeaufoy.net>
Co-authored-by: Philipp Stehle <anderschwiedu@googlemail.com>
Co-authored-by: hh0rva1h <61889859+hh0rva1h@users.noreply.github.com>
Co-authored-by: comsomisha <shmelev1996@mail.ru>
Co-authored-by: TotalCaesar659 <14265316+TotalCaesar659@users.noreply.github.com>
Co-authored-by: Juan Francisco Cantero Hurtado <iam@juanfra.info>
Co-authored-by: Dave Loyall <dave@the-good-guys.net>
Co-authored-by: tlsssl <63866177+tlsssl@users.noreply.github.com>
Co-authored-by: Rob <ankenyr@gmail.com>
Co-authored-by: Michael Klein <github@a98shuttle.de>
Co-authored-by: JordanWeatherby <47519158+JordanWeatherby@users.noreply.github.com>
Co-authored-by: striker.sh <19488257+strikersh@users.noreply.github.com>
Co-authored-by: Matej Dujava <mdujava@gmail.com>
Co-authored-by: Glenn Slayden <5589855+glenn-slayden@users.noreply.github.com>
Co-authored-by: MRWITEK <mrvvitek@gmail.com>
Co-authored-by: JChris246 <43832407+JChris246@users.noreply.github.com>
Co-authored-by: TheRealDude2 <the.real.dude@gmx.de>
2020-08-25 10:53:34 -04:00
|
|
|
update_url_query,
|
2020-08-26 10:52:32 -04:00
|
|
|
clean_html,
|
|
|
|
mimetype2ext,
|
|
|
|
UnsupportedError,
|
2013-07-10 11:49:11 -04:00
|
|
|
)
|
2013-07-05 15:31:50 -04:00
|
|
|
|
2013-11-07 15:06:48 -05:00
|
|
|
|
2015-11-13 18:54:16 -05:00
|
|
|
class BrightcoveLegacyIE(InfoExtractor):
|
2015-11-13 18:56:51 -05:00
|
|
|
IE_NAME = 'brightcove:legacy'
|
2014-12-16 10:38:26 -05:00
|
|
|
_VALID_URL = r'(?:https?://.*brightcove\.com/(services|viewer).*?\?|brightcove:)(?P<query>.*)'
|
2013-09-26 07:53:57 -04:00
|
|
|
|
|
|
|
_TESTS = [
|
|
|
|
{
|
2013-09-26 12:59:56 -04:00
|
|
|
# From http://www.8tv.cat/8aldia/videos/xavier-sala-i-martin-aquesta-tarda-a-8-al-dia/
|
2014-01-06 23:23:20 -05:00
|
|
|
'url': 'http://c.brightcove.com/services/viewer/htmlFederated?playerID=1654948606001&flashID=myExperience&%40videoPlayer=2371591881001',
|
|
|
|
'md5': '5423e113865d26e40624dce2e4b45d95',
|
|
|
|
'note': 'Test Brightcove downloads and detection in GenericIE',
|
|
|
|
'info_dict': {
|
2014-06-15 05:24:05 -04:00
|
|
|
'id': '2371591881001',
|
|
|
|
'ext': 'mp4',
|
2014-01-06 23:23:20 -05:00
|
|
|
'title': 'Xavier Sala i Martín: “Un banc que no presta és un banc zombi que no serveix per a res”',
|
|
|
|
'uploader': '8TV',
|
|
|
|
'description': 'md5:a950cc4285c43e44d763d036710cd9cd',
|
2016-04-02 13:54:40 -04:00
|
|
|
'timestamp': 1368213670,
|
|
|
|
'upload_date': '20130510',
|
2016-04-02 15:55:44 -04:00
|
|
|
'uploader_id': '1589608506001',
|
2019-09-19 13:02:26 -04:00
|
|
|
},
|
|
|
|
'skip': 'The player has been deactivated by the content owner',
|
2013-09-26 07:53:57 -04:00
|
|
|
},
|
|
|
|
{
|
2013-09-26 12:59:56 -04:00
|
|
|
# From http://medianetwork.oracle.com/video/player/1785452137001
|
2014-01-06 23:23:20 -05:00
|
|
|
'url': 'http://c.brightcove.com/services/viewer/htmlFederated?playerID=1217746023001&flashID=myPlayer&%40videoPlayer=1785452137001',
|
|
|
|
'info_dict': {
|
2014-06-15 05:24:05 -04:00
|
|
|
'id': '1785452137001',
|
|
|
|
'ext': 'flv',
|
2014-01-06 23:23:20 -05:00
|
|
|
'title': 'JVMLS 2012: Arrays 2.0 - Opportunities and Challenges',
|
|
|
|
'description': 'John Rose speaks at the JVM Language Summit, August 1, 2012.',
|
|
|
|
'uploader': 'Oracle',
|
2016-04-02 13:54:40 -04:00
|
|
|
'timestamp': 1344975024,
|
|
|
|
'upload_date': '20120814',
|
2016-04-02 15:55:44 -04:00
|
|
|
'uploader_id': '1460825906',
|
2013-09-26 07:53:57 -04:00
|
|
|
},
|
2019-09-19 13:02:26 -04:00
|
|
|
'skip': 'video not playable',
|
2013-09-26 07:53:57 -04:00
|
|
|
},
|
2013-11-06 11:25:38 -05:00
|
|
|
{
|
|
|
|
# From http://mashable.com/2013/10/26/thermoelectric-bracelet-lets-you-control-your-body-temperature/
|
2014-01-06 23:23:20 -05:00
|
|
|
'url': 'http://c.brightcove.com/services/viewer/federated_f9?&playerID=1265504713001&publisherID=AQ%7E%7E%2CAAABBzUwv1E%7E%2CxP-xFHVUstiMFlNYfvF4G9yFnNaqCw_9&videoID=2750934548001',
|
|
|
|
'info_dict': {
|
|
|
|
'id': '2750934548001',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'This Bracelet Acts as a Personal Thermostat',
|
|
|
|
'description': 'md5:547b78c64f4112766ccf4e151c20b6a0',
|
2019-09-19 13:02:26 -04:00
|
|
|
# 'uploader': 'Mashable',
|
2016-04-02 13:54:40 -04:00
|
|
|
'timestamp': 1382041798,
|
|
|
|
'upload_date': '20131017',
|
2016-04-02 15:55:44 -04:00
|
|
|
'uploader_id': '1130468786001',
|
2013-11-06 11:25:38 -05:00
|
|
|
},
|
|
|
|
},
|
2013-12-09 14:01:43 -05:00
|
|
|
{
|
|
|
|
# test that the default referer works
|
|
|
|
# from http://national.ballet.ca/interact/video/Lost_in_Motion_II/
|
2014-01-06 23:23:20 -05:00
|
|
|
'url': 'http://link.brightcove.com/services/player/bcpid756015033001?bckey=AQ~~,AAAApYJi_Ck~,GxhXCegT1Dp39ilhXuxMJxasUhVNZiil&bctid=2878862109001',
|
|
|
|
'info_dict': {
|
|
|
|
'id': '2878862109001',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Lost in Motion II',
|
|
|
|
'description': 'md5:363109c02998fee92ec02211bd8000df',
|
|
|
|
'uploader': 'National Ballet of Canada',
|
2013-12-09 14:01:43 -05:00
|
|
|
},
|
2016-07-06 13:13:37 -04:00
|
|
|
'skip': 'Video gone',
|
2014-06-15 05:20:40 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
# test flv videos served by akamaihd.net
|
|
|
|
# From http://www.redbull.com/en/bike/stories/1331655643987/replay-uci-dh-world-cup-2014-from-fort-william
|
2016-04-02 13:54:40 -04:00
|
|
|
'url': 'http://c.brightcove.com/services/viewer/htmlFederated?%40videoPlayer=ref%3Aevent-stream-356&linkBaseURL=http%3A%2F%2Fwww.redbull.com%2Fen%2Fbike%2Fvideos%2F1331655630249%2Freplay-uci-fort-william-2014-dh&playerKey=AQ%7E%7E%2CAAAApYJ7UqE%7E%2Cxqr_zXk0I-zzNndy8NlHogrCb5QdyZRf&playerID=1398061561001#__youtubedl_smuggle=%7B%22Referer%22%3A+%22http%3A%2F%2Fwww.redbull.com%2Fen%2Fbike%2Fstories%2F1331655643987%2Freplay-uci-dh-world-cup-2014-from-fort-william%22%7D',
|
2014-06-15 05:20:40 -04:00
|
|
|
# The md5 checksum changes on each download
|
|
|
|
'info_dict': {
|
2016-04-02 13:54:40 -04:00
|
|
|
'id': '3750436379001',
|
2014-06-15 05:20:40 -04:00
|
|
|
'ext': 'flv',
|
|
|
|
'title': 'UCI MTB World Cup 2014: Fort William, UK - Downhill Finals',
|
2016-04-02 13:54:40 -04:00
|
|
|
'uploader': 'RBTV Old (do not use)',
|
2014-06-15 05:20:40 -04:00
|
|
|
'description': 'UCI MTB World Cup 2014: Fort William, UK - Downhill Finals',
|
2016-04-02 13:54:40 -04:00
|
|
|
'timestamp': 1409122195,
|
|
|
|
'upload_date': '20140827',
|
2016-04-02 15:55:44 -04:00
|
|
|
'uploader_id': '710858724001',
|
2014-06-15 05:20:40 -04:00
|
|
|
},
|
2017-02-12 08:26:36 -05:00
|
|
|
'skip': 'Video gone',
|
2014-06-15 05:20:40 -04:00
|
|
|
},
|
2014-10-13 10:26:53 -04:00
|
|
|
{
|
2016-07-06 13:13:37 -04:00
|
|
|
# playlist with 'videoList'
|
2014-10-13 10:26:53 -04:00
|
|
|
# from http://support.brightcove.com/en/video-cloud/docs/playlist-support-single-video-players
|
|
|
|
'url': 'http://c.brightcove.com/services/viewer/htmlFederated?playerID=3550052898001&playerKey=AQ%7E%7E%2CAAABmA9XpXk%7E%2C-Kp7jNgisre1fG5OdqpAFUTcs0lP_ZoL',
|
|
|
|
'info_dict': {
|
|
|
|
'title': 'Sealife',
|
2015-02-18 13:56:10 -05:00
|
|
|
'id': '3550319591001',
|
2014-10-13 10:26:53 -04:00
|
|
|
},
|
|
|
|
'playlist_mincount': 7,
|
2019-09-19 13:02:26 -04:00
|
|
|
'skip': 'Unsupported URL',
|
2014-10-13 10:26:53 -04:00
|
|
|
},
|
2016-07-06 13:13:37 -04:00
|
|
|
{
|
2019-03-09 07:14:41 -05:00
|
|
|
# playlist with 'playlistTab' (https://github.com/ytdl-org/youtube-dl/issues/9965)
|
2016-07-06 13:13:37 -04:00
|
|
|
'url': 'http://c.brightcove.com/services/json/experience/runtime/?command=get_programming_for_experience&playerKey=AQ%7E%7E,AAABXlLMdok%7E,NJ4EoMlZ4rZdx9eU1rkMVd8EaYPBBUlg',
|
|
|
|
'info_dict': {
|
|
|
|
'id': '1522758701001',
|
|
|
|
'title': 'Lesson 08',
|
|
|
|
},
|
|
|
|
'playlist_mincount': 10,
|
2019-09-19 13:02:26 -04:00
|
|
|
'skip': 'Unsupported URL',
|
2016-07-06 13:13:37 -04:00
|
|
|
},
|
2017-04-18 11:03:03 -04:00
|
|
|
{
|
|
|
|
# playerID inferred from bcpid
|
|
|
|
# from http://www.un.org/chinese/News/story.asp?NewsID=27724
|
|
|
|
'url': 'https://link.brightcove.com/services/player/bcpid1722935254001/?bctid=5360463607001&autoStart=false&secureConnections=true&width=650&height=350',
|
|
|
|
'only_matching': True, # Tested in GenericIE
|
|
|
|
}
|
2013-09-26 07:53:57 -04:00
|
|
|
]
|
2013-07-10 11:49:11 -04:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def _build_brighcove_url(cls, object_str):
|
|
|
|
"""
|
|
|
|
Build a Brightcove url from a xml string containing
|
|
|
|
<object class="BrightcoveExperience">{params}</object>
|
|
|
|
"""
|
2013-10-04 05:53:49 -04:00
|
|
|
|
2019-03-09 07:14:41 -05:00
|
|
|
# Fix up some stupid HTML, see https://github.com/ytdl-org/youtube-dl/issues/1553
|
2015-02-02 17:47:14 -05:00
|
|
|
object_str = re.sub(r'(<param(?:\s+[a-zA-Z0-9_]+="[^"]*")*)>',
|
2013-10-04 05:53:49 -04:00
|
|
|
lambda m: m.group(1) + '/>', object_str)
|
2019-03-09 07:14:41 -05:00
|
|
|
# Fix up some stupid XML, see https://github.com/ytdl-org/youtube-dl/issues/1608
|
2014-01-06 23:23:20 -05:00
|
|
|
object_str = object_str.replace('<--', '<!--')
|
2014-11-20 12:37:08 -05:00
|
|
|
# remove namespace to simplify extraction
|
|
|
|
object_str = re.sub(r'(<object[^>]*)(xmlns=".*?")', r'\1', object_str)
|
2014-01-20 20:09:49 -05:00
|
|
|
object_str = fix_xml_ampersands(object_str)
|
2013-10-04 05:53:49 -04:00
|
|
|
|
2015-04-14 07:50:53 -04:00
|
|
|
try:
|
2015-10-25 15:04:55 -04:00
|
|
|
object_doc = compat_etree_fromstring(object_str.encode('utf-8'))
|
2015-06-23 11:34:29 -04:00
|
|
|
except compat_xml_parse_error:
|
2015-04-14 07:50:53 -04:00
|
|
|
return
|
2014-01-20 20:09:49 -05:00
|
|
|
|
|
|
|
fv_el = find_xpath_attr(object_doc, './param', 'name', 'flashVars')
|
2014-01-21 16:04:46 -05:00
|
|
|
if fv_el is not None:
|
|
|
|
flashvars = dict(
|
|
|
|
(k, v[0])
|
|
|
|
for k, v in compat_parse_qs(fv_el.attrib['value']).items())
|
|
|
|
else:
|
|
|
|
flashvars = {}
|
2014-01-20 20:09:49 -05:00
|
|
|
|
2016-03-25 04:17:54 -04:00
|
|
|
data_url = object_doc.attrib.get('data', '')
|
|
|
|
data_url_params = compat_parse_qs(compat_urllib_parse_urlparse(data_url).query)
|
|
|
|
|
2013-11-23 17:26:06 -05:00
|
|
|
def find_param(name):
|
2014-01-20 20:09:49 -05:00
|
|
|
if name in flashvars:
|
|
|
|
return flashvars[name]
|
2013-11-24 05:02:34 -05:00
|
|
|
node = find_xpath_attr(object_doc, './param', 'name', name)
|
|
|
|
if node is not None:
|
|
|
|
return node.attrib['value']
|
2016-03-25 04:17:54 -04:00
|
|
|
return data_url_params.get(name)
|
2014-01-20 20:09:49 -05:00
|
|
|
|
|
|
|
params = {}
|
|
|
|
|
2017-01-15 11:06:52 -05:00
|
|
|
playerID = find_param('playerID') or find_param('playerId')
|
2014-01-20 20:09:49 -05:00
|
|
|
if playerID is None:
|
|
|
|
raise ExtractorError('Cannot find player ID')
|
|
|
|
params['playerID'] = playerID
|
|
|
|
|
2013-11-23 17:26:06 -05:00
|
|
|
playerKey = find_param('playerKey')
|
2013-07-10 11:49:11 -04:00
|
|
|
# Not all pages define this value
|
|
|
|
if playerKey is not None:
|
2013-11-24 05:02:34 -05:00
|
|
|
params['playerKey'] = playerKey
|
2016-03-16 04:14:37 -04:00
|
|
|
# These fields hold the id of the video
|
2016-03-15 17:57:59 -04:00
|
|
|
videoPlayer = find_param('@videoPlayer') or find_param('videoId') or find_param('videoID') or find_param('@videoList')
|
2013-07-10 18:04:33 -04:00
|
|
|
if videoPlayer is not None:
|
2017-02-18 15:07:09 -05:00
|
|
|
if isinstance(videoPlayer, list):
|
|
|
|
videoPlayer = videoPlayer[0]
|
2017-03-07 10:59:33 -05:00
|
|
|
videoPlayer = videoPlayer.strip()
|
|
|
|
# UUID is also possible for videoPlayer (e.g.
|
|
|
|
# http://www.popcornflix.com/hoodies-vs-hooligans/7f2d2b87-bbf2-4623-acfb-ea942b4f01dd
|
|
|
|
# or http://www8.hp.com/cn/zh/home.html)
|
|
|
|
if not (re.match(
|
|
|
|
r'^(?:\d+|[\da-fA-F]{8}-?[\da-fA-F]{4}-?[\da-fA-F]{4}-?[\da-fA-F]{4}-?[\da-fA-F]{12})$',
|
|
|
|
videoPlayer) or videoPlayer.startswith('ref:')):
|
2017-02-18 15:07:09 -05:00
|
|
|
return None
|
2013-11-24 05:02:34 -05:00
|
|
|
params['@videoPlayer'] = videoPlayer
|
2013-11-23 17:26:06 -05:00
|
|
|
linkBase = find_param('linkBaseURL')
|
2013-11-07 15:06:48 -05:00
|
|
|
if linkBase is not None:
|
2013-11-24 05:02:34 -05:00
|
|
|
params['linkBaseURL'] = linkBase
|
2015-06-13 09:53:32 -04:00
|
|
|
return cls._make_brightcove_url(params)
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def _build_brighcove_url_from_js(cls, object_js):
|
|
|
|
# The layout of JS is as follows:
|
|
|
|
# customBC.createVideo = function (width, height, playerID, playerKey, videoPlayer, VideoRandomID) {
|
|
|
|
# // build Brightcove <object /> XML
|
|
|
|
# }
|
|
|
|
m = re.search(
|
2017-01-13 18:26:11 -05:00
|
|
|
r'''(?x)customBC\.createVideo\(
|
2015-06-13 09:53:32 -04:00
|
|
|
.*? # skipping width and height
|
|
|
|
["\'](?P<playerID>\d+)["\']\s*,\s* # playerID
|
|
|
|
["\'](?P<playerKey>AQ[^"\']{48})[^"\']*["\']\s*,\s* # playerKey begins with AQ and is 50 characters
|
|
|
|
# in length, however it's appended to itself
|
|
|
|
# in places, so truncate
|
|
|
|
["\'](?P<videoID>\d+)["\'] # @videoPlayer
|
|
|
|
''', object_js)
|
|
|
|
if m:
|
|
|
|
return cls._make_brightcove_url(m.groupdict())
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def _make_brightcove_url(cls, params):
|
2019-09-19 13:02:26 -04:00
|
|
|
return update_url_query(
|
|
|
|
'http://c.brightcove.com/services/viewer/htmlFederated', params)
|
2013-07-05 15:31:50 -04:00
|
|
|
|
2013-11-06 10:40:24 -05:00
|
|
|
@classmethod
|
|
|
|
def _extract_brightcove_url(cls, webpage):
|
2014-02-03 09:19:40 -05:00
|
|
|
"""Try to extract the brightcove url from the webpage, returns None
|
2013-11-06 10:40:24 -05:00
|
|
|
if it can't be found
|
|
|
|
"""
|
2014-02-03 09:19:40 -05:00
|
|
|
urls = cls._extract_brightcove_urls(webpage)
|
|
|
|
return urls[0] if urls else None
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def _extract_brightcove_urls(cls, webpage):
|
|
|
|
"""Return a list of all Brightcove URLs from the webpage """
|
2014-01-27 18:53:46 -05:00
|
|
|
|
2014-08-23 20:41:21 -04:00
|
|
|
url_m = re.search(
|
2016-12-24 10:46:27 -05:00
|
|
|
r'''(?x)
|
|
|
|
<meta\s+
|
|
|
|
(?:property|itemprop)=([\'"])(?:og:video|embedURL)\1[^>]+
|
|
|
|
content=([\'"])(?P<url>https?://(?:secure|c)\.brightcove.com/(?:(?!\2).)+)\2
|
|
|
|
''', webpage)
|
2014-01-27 18:53:46 -05:00
|
|
|
if url_m:
|
2016-12-24 10:46:27 -05:00
|
|
|
url = unescapeHTML(url_m.group('url'))
|
2014-04-12 06:53:48 -04:00
|
|
|
# Some sites don't add it, we can't download with this url, for example:
|
|
|
|
# http://www.ktvu.com/videos/news/raw-video-caltrain-releases-video-of-man-almost/vCTZdY/
|
2016-12-24 10:46:27 -05:00
|
|
|
if 'playerKey' in url or 'videoId' in url or 'idVideo' in url:
|
2014-04-12 06:53:48 -04:00
|
|
|
return [url]
|
2014-01-27 18:53:46 -05:00
|
|
|
|
2014-02-03 09:19:40 -05:00
|
|
|
matches = re.findall(
|
2014-01-20 20:09:49 -05:00
|
|
|
r'''(?sx)<object
|
|
|
|
(?:
|
2014-02-03 09:19:40 -05:00
|
|
|
[^>]+?class=[\'"][^>]*?BrightcoveExperience.*?[\'"] |
|
2014-01-20 20:09:49 -05:00
|
|
|
[^>]*?>\s*<param\s+name="movie"\s+value="https?://[^/]*brightcove\.com/
|
2015-04-14 07:48:41 -04:00
|
|
|
).+?>\s*</object>''',
|
2014-01-20 20:09:49 -05:00
|
|
|
webpage)
|
2015-06-13 07:09:44 -04:00
|
|
|
if matches:
|
|
|
|
return list(filter(None, [cls._build_brighcove_url(m) for m in matches]))
|
|
|
|
|
2017-04-18 11:03:03 -04:00
|
|
|
matches = re.findall(r'(customBC\.createVideo\(.+?\);)', webpage)
|
|
|
|
if matches:
|
|
|
|
return list(filter(None, [
|
|
|
|
cls._build_brighcove_url_from_js(custom_bc)
|
|
|
|
for custom_bc in matches]))
|
2017-04-19 10:47:03 -04:00
|
|
|
return [src for _, src in re.findall(
|
2017-04-18 11:03:03 -04:00
|
|
|
r'<iframe[^>]+src=([\'"])((?:https?:)?//link\.brightcove\.com/services/player/(?!\1).+)\1', webpage)]
|
2013-11-06 10:40:24 -05:00
|
|
|
|
2013-07-05 15:31:50 -04:00
|
|
|
def _real_extract(self, url):
|
2014-01-06 23:34:14 -05:00
|
|
|
url, smuggled_data = unsmuggle_url(url, {})
|
|
|
|
|
2013-11-06 16:03:00 -05:00
|
|
|
# Change the 'videoId' and others field to '@videoPlayer'
|
2016-12-24 10:46:27 -05:00
|
|
|
url = re.sub(r'(?<=[?&])(videoI(d|D)|idVideo|bctid)', '%40videoPlayer', url)
|
2013-11-06 16:03:00 -05:00
|
|
|
# Change bckey (used by bcove.me urls) to playerKey
|
|
|
|
url = re.sub(r'(?<=[?&])bckey', 'playerKey', url)
|
2013-07-05 15:31:50 -04:00
|
|
|
mobj = re.match(self._VALID_URL, url)
|
2013-07-12 08:53:28 -04:00
|
|
|
query_str = mobj.group('query')
|
|
|
|
query = compat_urlparse.parse_qs(query_str)
|
2013-07-05 15:31:50 -04:00
|
|
|
|
2013-07-12 08:53:28 -04:00
|
|
|
videoPlayer = query.get('@videoPlayer')
|
|
|
|
if videoPlayer:
|
2014-01-06 23:34:14 -05:00
|
|
|
# We set the original url as the default 'Referer' header
|
2019-09-19 13:02:26 -04:00
|
|
|
referer = query.get('linkBaseURL', [None])[0] or smuggled_data.get('Referer', url)
|
|
|
|
video_id = videoPlayer[0]
|
2017-04-18 11:03:03 -04:00
|
|
|
if 'playerID' not in query:
|
|
|
|
mobj = re.search(r'/bcpid(\d+)', url)
|
|
|
|
if mobj is not None:
|
|
|
|
query['playerID'] = [mobj.group(1)]
|
2018-10-15 13:41:57 -04:00
|
|
|
publisher_id = query.get('publisherId')
|
|
|
|
if publisher_id and publisher_id[0].isdigit():
|
|
|
|
publisher_id = publisher_id[0]
|
|
|
|
if not publisher_id:
|
|
|
|
player_key = query.get('playerKey')
|
|
|
|
if player_key and ',' in player_key[0]:
|
|
|
|
player_key = player_key[0]
|
|
|
|
else:
|
|
|
|
player_id = query.get('playerID')
|
|
|
|
if player_id and player_id[0].isdigit():
|
2019-09-19 13:02:26 -04:00
|
|
|
headers = {}
|
|
|
|
if referer:
|
|
|
|
headers['Referer'] = referer
|
2018-10-15 13:41:57 -04:00
|
|
|
player_page = self._download_webpage(
|
|
|
|
'http://link.brightcove.com/services/player/bcpid' + player_id[0],
|
|
|
|
video_id, headers=headers, fatal=False)
|
|
|
|
if player_page:
|
|
|
|
player_key = self._search_regex(
|
|
|
|
r'<param\s+name="playerKey"\s+value="([\w~,-]+)"',
|
|
|
|
player_page, 'player key', fatal=False)
|
|
|
|
if player_key:
|
|
|
|
enc_pub_id = player_key.split(',')[1].replace('~', '=')
|
|
|
|
publisher_id = struct.unpack('>Q', base64.urlsafe_b64decode(enc_pub_id))[0]
|
2019-09-19 13:02:26 -04:00
|
|
|
if publisher_id:
|
|
|
|
brightcove_new_url = 'http://players.brightcove.net/%s/default_default/index.html?videoId=%s' % (publisher_id, video_id)
|
|
|
|
if referer:
|
|
|
|
brightcove_new_url = smuggle_url(brightcove_new_url, {'referrer': referer})
|
|
|
|
return self.url_result(brightcove_new_url, BrightcoveNewIE.ie_key(), video_id)
|
|
|
|
# TODO: figure out if it's possible to extract playlistId from playerKey
|
|
|
|
# elif 'playerKey' in query:
|
|
|
|
# player_key = query['playerKey']
|
|
|
|
# return self._get_playlist_info(player_key[0])
|
|
|
|
raise UnsupportedError(url)
|
2015-09-10 23:46:21 -04:00
|
|
|
|
|
|
|
|
2017-05-08 19:47:37 -04:00
|
|
|
class BrightcoveNewIE(AdobePassIE):
|
2015-11-13 18:56:51 -05:00
|
|
|
IE_NAME = 'brightcove:new'
|
2019-06-23 06:04:05 -04:00
|
|
|
_VALID_URL = r'https?://players\.brightcove\.net/(?P<account_id>\d+)/(?P<player_id>[^/]+)_(?P<embed>[^/]+)/index\.html\?.*(?P<content_type>video|playlist)Id=(?P<video_id>\d+|ref:[^&]+)'
|
2015-11-13 19:20:09 -05:00
|
|
|
_TESTS = [{
|
2015-09-10 23:46:21 -04:00
|
|
|
'url': 'http://players.brightcove.net/929656772001/e41d32dc-ec74-459e-a845-6c69f7b724ea_default/index.html?videoId=4463358922001',
|
2015-09-30 06:20:43 -04:00
|
|
|
'md5': 'c8100925723840d4b0d243f7025703be',
|
2015-09-10 23:46:21 -04:00
|
|
|
'info_dict': {
|
|
|
|
'id': '4463358922001',
|
2015-09-30 06:20:43 -04:00
|
|
|
'ext': 'mp4',
|
2015-09-10 23:46:21 -04:00
|
|
|
'title': 'Meet the man behind Popcorn Time',
|
2015-09-30 06:20:43 -04:00
|
|
|
'description': 'md5:eac376a4fe366edc70279bfb681aea16',
|
2015-11-13 19:20:09 -05:00
|
|
|
'duration': 165.768,
|
2015-09-30 06:20:43 -04:00
|
|
|
'timestamp': 1441391203,
|
|
|
|
'upload_date': '20150904',
|
|
|
|
'uploader_id': '929656772001',
|
2017-12-23 07:21:33 -05:00
|
|
|
'formats': 'mincount:20',
|
2015-11-13 19:20:09 -05:00
|
|
|
},
|
|
|
|
}, {
|
|
|
|
# with rtmp streams
|
|
|
|
'url': 'http://players.brightcove.net/4036320279001/5d112ed9-283f-485f-a7f9-33f42e8bc042_default/index.html?videoId=4279049078001',
|
|
|
|
'info_dict': {
|
|
|
|
'id': '4279049078001',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Titansgrave: Chapter 0',
|
|
|
|
'description': 'Titansgrave: Chapter 0',
|
|
|
|
'duration': 1242.058,
|
|
|
|
'timestamp': 1433556729,
|
|
|
|
'upload_date': '20150606',
|
|
|
|
'uploader_id': '4036320279001',
|
2017-12-23 07:21:33 -05:00
|
|
|
'formats': 'mincount:39',
|
2015-11-13 19:20:09 -05:00
|
|
|
},
|
|
|
|
'params': {
|
2016-04-02 05:57:57 -04:00
|
|
|
# m3u8 download
|
2015-11-13 19:20:09 -05:00
|
|
|
'skip_download': True,
|
2015-09-10 23:46:21 -04:00
|
|
|
}
|
2019-06-23 06:04:05 -04:00
|
|
|
}, {
|
|
|
|
# playlist stream
|
|
|
|
'url': 'https://players.brightcove.net/1752604059001/S13cJdUBz_default/index.html?playlistId=5718313430001',
|
|
|
|
'info_dict': {
|
|
|
|
'id': '5718313430001',
|
|
|
|
'title': 'No Audio Playlist',
|
|
|
|
},
|
|
|
|
'playlist_count': 7,
|
|
|
|
'params': {
|
|
|
|
# m3u8 download
|
|
|
|
'skip_download': True,
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
'url': 'http://players.brightcove.net/5690807595001/HyZNerRl7_default/index.html?playlistId=5743160747001',
|
|
|
|
'only_matching': True,
|
2015-12-18 11:31:48 -05:00
|
|
|
}, {
|
|
|
|
# ref: prefixed video id
|
|
|
|
'url': 'http://players.brightcove.net/3910869709001/21519b5c-4b3b-4363-accb-bdc8f358f823_default/index.html?videoId=ref:7069442',
|
|
|
|
'only_matching': True,
|
2016-03-15 05:03:08 -04:00
|
|
|
}, {
|
|
|
|
# non numeric ref: prefixed video id
|
|
|
|
'url': 'http://players.brightcove.net/710858724001/default_default/index.html?videoId=ref:event-stream-356',
|
|
|
|
'only_matching': True,
|
2016-05-20 14:59:06 -04:00
|
|
|
}, {
|
|
|
|
# unavailable video without message but with error_code
|
|
|
|
'url': 'http://players.brightcove.net/1305187701/c832abfb-641b-44eb-9da0-2fe76786505f_default/index.html?videoId=4377407326001',
|
|
|
|
'only_matching': True,
|
2015-11-13 19:20:09 -05:00
|
|
|
}]
|
2015-09-10 23:46:21 -04:00
|
|
|
|
2015-12-18 11:05:32 -05:00
|
|
|
@staticmethod
|
2017-04-18 10:46:25 -04:00
|
|
|
def _extract_url(ie, webpage):
|
|
|
|
urls = BrightcoveNewIE._extract_urls(ie, webpage)
|
2015-12-18 11:05:32 -05:00
|
|
|
return urls[0] if urls else None
|
|
|
|
|
2015-11-13 19:01:56 -05:00
|
|
|
@staticmethod
|
2017-04-15 09:30:51 -04:00
|
|
|
def _extract_urls(ie, webpage):
|
2015-11-13 18:51:05 -05:00
|
|
|
# Reference:
|
|
|
|
# 1. http://docs.brightcove.com/en/video-cloud/brightcove-player/guides/publish-video.html#setvideoiniframe
|
2017-02-12 08:26:36 -05:00
|
|
|
# 2. http://docs.brightcove.com/en/video-cloud/brightcove-player/guides/publish-video.html#tag
|
|
|
|
# 3. http://docs.brightcove.com/en/video-cloud/brightcove-player/guides/publish-video.html#setvideousingjavascript
|
|
|
|
# 4. http://docs.brightcove.com/en/video-cloud/brightcove-player/guides/in-page-embed-player-implementation.html
|
|
|
|
# 5. https://support.brightcove.com/en/video-cloud/docs/dynamically-assigning-videos-player
|
2015-11-13 18:51:05 -05:00
|
|
|
|
|
|
|
entries = []
|
|
|
|
|
|
|
|
# Look for iframe embeds [1]
|
|
|
|
for _, url in re.findall(
|
2016-03-16 06:46:53 -04:00
|
|
|
r'<iframe[^>]+src=(["\'])((?:https?:)?//players\.brightcove\.net/\d+/[^/]+/index\.html.+?)\1', webpage):
|
|
|
|
entries.append(url if url.startswith('http') else 'http:' + url)
|
2015-11-13 19:22:12 -05:00
|
|
|
|
2017-02-12 08:26:36 -05:00
|
|
|
# Look for <video> tags [2] and embed_in_page embeds [3]
|
|
|
|
# [2] looks like:
|
|
|
|
for video, script_tag, account_id, player_id, embed in re.findall(
|
2017-04-15 09:30:51 -04:00
|
|
|
r'''(?isx)
|
2020-08-26 10:52:32 -04:00
|
|
|
(<video\s+[^>]*\bdata-video-id\s*=\s*['"]?[^>]+>)
|
2017-04-15 09:30:51 -04:00
|
|
|
(?:.*?
|
|
|
|
(<script[^>]+
|
|
|
|
src=["\'](?:https?:)?//players\.brightcove\.net/
|
|
|
|
(\d+)/([^/]+)_([^/]+)/index(?:\.min)?\.js
|
|
|
|
)
|
|
|
|
)?
|
|
|
|
''', webpage):
|
2017-02-12 08:26:36 -05:00
|
|
|
attrs = extract_attributes(video)
|
|
|
|
|
|
|
|
# According to examples from [4] it's unclear whether video id
|
|
|
|
# may be optional and what to do when it is
|
|
|
|
video_id = attrs.get('data-video-id')
|
2017-04-15 09:30:51 -04:00
|
|
|
if not video_id:
|
|
|
|
continue
|
2017-02-12 08:26:36 -05:00
|
|
|
|
2017-04-15 09:30:51 -04:00
|
|
|
account_id = account_id or attrs.get('data-account')
|
2017-02-12 08:26:36 -05:00
|
|
|
if not account_id:
|
2017-04-15 09:30:51 -04:00
|
|
|
continue
|
|
|
|
|
|
|
|
player_id = player_id or attrs.get('data-player') or 'default'
|
|
|
|
embed = embed or attrs.get('data-embed') or 'default'
|
|
|
|
|
|
|
|
bc_url = 'http://players.brightcove.net/%s/%s_%s/index.html?videoId=%s' % (
|
|
|
|
account_id, player_id, embed, video_id)
|
|
|
|
|
|
|
|
# Some brightcove videos may be embedded with video tag only and
|
|
|
|
# without script tag or any mentioning of brightcove at all. Such
|
|
|
|
# embeds are considered ambiguous since they are matched based only
|
|
|
|
# on data-video-id and data-account attributes and in the wild may
|
|
|
|
# not be brightcove embeds at all. Let's check reconstructed
|
|
|
|
# brightcove URLs in case of such embeds and only process valid
|
|
|
|
# ones. By this we ensure there is indeed a brightcove embed.
|
|
|
|
if not script_tag and not ie._is_valid_url(
|
|
|
|
bc_url, video_id, 'possible brightcove video'):
|
|
|
|
continue
|
|
|
|
|
|
|
|
entries.append(bc_url)
|
2015-11-13 19:22:12 -05:00
|
|
|
|
2015-11-13 18:51:05 -05:00
|
|
|
return entries
|
2015-09-10 23:46:21 -04:00
|
|
|
|
2018-02-19 10:28:27 -05:00
|
|
|
def _parse_brightcove_metadata(self, json_data, video_id, headers={}):
|
2016-04-02 13:56:01 -04:00
|
|
|
title = json_data['name'].strip()
|
2015-09-10 23:46:21 -04:00
|
|
|
|
|
|
|
formats = []
|
2015-11-13 18:09:50 -05:00
|
|
|
for source in json_data.get('sources', []):
|
2016-03-15 05:06:53 -04:00
|
|
|
container = source.get('container')
|
2016-07-14 09:13:57 -04:00
|
|
|
ext = mimetype2ext(source.get('type'))
|
2015-11-13 18:09:50 -05:00
|
|
|
src = source.get('src')
|
2018-06-24 07:02:16 -04:00
|
|
|
# https://support.brightcove.com/playback-api-video-fields-reference#key_systems_object
|
|
|
|
if ext == 'ism' or container == 'WVM' or source.get('key_systems'):
|
2016-07-14 09:13:57 -04:00
|
|
|
continue
|
|
|
|
elif ext == 'm3u8' or container == 'M2TS':
|
2015-11-13 18:09:50 -05:00
|
|
|
if not src:
|
|
|
|
continue
|
2015-12-28 13:58:24 -05:00
|
|
|
formats.extend(self._extract_m3u8_formats(
|
2016-05-13 03:35:38 -04:00
|
|
|
src, video_id, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False))
|
2016-07-14 09:13:57 -04:00
|
|
|
elif ext == 'mpd':
|
2016-03-15 13:48:21 -04:00
|
|
|
if not src:
|
|
|
|
continue
|
|
|
|
formats.extend(self._extract_mpd_formats(src, video_id, 'dash', fatal=False))
|
2015-09-10 23:46:21 -04:00
|
|
|
else:
|
2015-11-13 18:09:50 -05:00
|
|
|
streaming_src = source.get('streaming_src')
|
|
|
|
stream_name, app_name = source.get('stream_name'), source.get('app_name')
|
|
|
|
if not src and not streaming_src and (not stream_name or not app_name):
|
|
|
|
continue
|
|
|
|
tbr = float_or_none(source.get('avg_bitrate'), 1000)
|
|
|
|
height = int_or_none(source.get('height'))
|
2016-03-15 13:48:21 -04:00
|
|
|
width = int_or_none(source.get('width'))
|
2015-11-13 18:09:50 -05:00
|
|
|
f = {
|
|
|
|
'tbr': tbr,
|
|
|
|
'filesize': int_or_none(source.get('size')),
|
2016-03-15 05:06:53 -04:00
|
|
|
'container': container,
|
2016-07-14 09:13:57 -04:00
|
|
|
'ext': ext or container.lower(),
|
2015-11-13 18:09:50 -05:00
|
|
|
}
|
2016-03-15 13:48:21 -04:00
|
|
|
if width == 0 and height == 0:
|
|
|
|
f.update({
|
|
|
|
'vcodec': 'none',
|
|
|
|
})
|
|
|
|
else:
|
|
|
|
f.update({
|
|
|
|
'width': width,
|
|
|
|
'height': height,
|
|
|
|
'vcodec': source.get('codec'),
|
|
|
|
})
|
2015-09-10 23:46:21 -04:00
|
|
|
|
2015-11-13 18:09:50 -05:00
|
|
|
def build_format_id(kind):
|
|
|
|
format_id = kind
|
|
|
|
if tbr:
|
|
|
|
format_id += '-%dk' % int(tbr)
|
|
|
|
if height:
|
|
|
|
format_id += '-%dp' % height
|
|
|
|
return format_id
|
|
|
|
|
|
|
|
if src or streaming_src:
|
|
|
|
f.update({
|
|
|
|
'url': src or streaming_src,
|
|
|
|
'format_id': build_format_id('http' if src else 'http-streaming'),
|
2016-04-02 05:57:57 -04:00
|
|
|
'source_preference': 0 if src else -1,
|
2015-11-13 18:09:50 -05:00
|
|
|
})
|
|
|
|
else:
|
|
|
|
f.update({
|
|
|
|
'url': app_name,
|
|
|
|
'play_path': stream_name,
|
|
|
|
'format_id': build_format_id('rtmp'),
|
|
|
|
})
|
|
|
|
formats.append(f)
|
2018-06-24 07:02:16 -04:00
|
|
|
if not formats:
|
|
|
|
# for sonyliv.com DRM protected videos
|
|
|
|
s3_source_url = json_data.get('custom_fields', {}).get('s3sourceurl')
|
|
|
|
if s3_source_url:
|
|
|
|
formats.append({
|
|
|
|
'url': s3_source_url,
|
|
|
|
'format_id': 'source',
|
|
|
|
})
|
2016-07-03 11:33:50 -04:00
|
|
|
|
2017-12-23 07:21:33 -05:00
|
|
|
errors = json_data.get('errors')
|
2016-07-03 11:33:50 -04:00
|
|
|
if not formats and errors:
|
|
|
|
error = errors[0]
|
|
|
|
raise ExtractorError(
|
|
|
|
error.get('message') or error.get('error_subcode') or error['error_code'], expected=True)
|
|
|
|
|
2015-09-10 23:46:21 -04:00
|
|
|
self._sort_formats(formats)
|
|
|
|
|
2018-02-19 10:28:27 -05:00
|
|
|
for f in formats:
|
|
|
|
f.setdefault('http_headers', {}).update(headers)
|
|
|
|
|
2016-04-02 13:56:01 -04:00
|
|
|
subtitles = {}
|
|
|
|
for text_track in json_data.get('text_tracks', []):
|
2020-08-26 10:52:32 -04:00
|
|
|
if text_track.get('src'):
|
|
|
|
subtitles.setdefault(text_track.get('srclang'), []).append({
|
|
|
|
'url': text_track['src'],
|
|
|
|
})
|
2015-11-13 18:09:50 -05:00
|
|
|
|
2016-09-24 10:39:06 -04:00
|
|
|
is_live = False
|
|
|
|
duration = float_or_none(json_data.get('duration'), 1000)
|
2017-05-08 19:47:37 -04:00
|
|
|
if duration is not None and duration <= 0:
|
2016-09-24 10:39:06 -04:00
|
|
|
is_live = True
|
|
|
|
|
2015-09-10 23:46:21 -04:00
|
|
|
return {
|
|
|
|
'id': video_id,
|
2016-09-24 10:39:06 -04:00
|
|
|
'title': self._live_title(title) if is_live else title,
|
2016-07-11 14:06:50 -04:00
|
|
|
'description': clean_html(json_data.get('description')),
|
2016-04-02 13:56:01 -04:00
|
|
|
'thumbnail': json_data.get('thumbnail') or json_data.get('poster'),
|
2016-09-24 10:39:06 -04:00
|
|
|
'duration': duration,
|
2016-04-02 13:56:01 -04:00
|
|
|
'timestamp': parse_iso8601(json_data.get('published_at')),
|
2017-12-23 07:21:33 -05:00
|
|
|
'uploader_id': json_data.get('account_id'),
|
2015-11-13 18:09:50 -05:00
|
|
|
'formats': formats,
|
2016-04-02 13:56:01 -04:00
|
|
|
'subtitles': subtitles,
|
|
|
|
'tags': json_data.get('tags', []),
|
2016-09-24 10:39:06 -04:00
|
|
|
'is_live': is_live,
|
2015-09-10 23:46:21 -04:00
|
|
|
}
|
2017-12-23 07:21:33 -05:00
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
url, smuggled_data = unsmuggle_url(url, {})
|
2018-05-01 20:18:01 -04:00
|
|
|
self._initialize_geo_bypass({
|
|
|
|
'countries': smuggled_data.get('geo_countries'),
|
|
|
|
'ip_blocks': smuggled_data.get('geo_ip_blocks'),
|
|
|
|
})
|
2017-12-23 07:21:33 -05:00
|
|
|
|
2019-06-23 06:04:05 -04:00
|
|
|
account_id, player_id, embed, content_type, video_id = re.match(self._VALID_URL, url).groups()
|
2017-12-23 07:21:33 -05:00
|
|
|
|
2020-08-26 10:52:32 -04:00
|
|
|
webpage = self._download_webpage(
|
|
|
|
'http://players.brightcove.net/%s/%s_%s/index.min.js'
|
|
|
|
% (account_id, player_id, embed), video_id)
|
2017-12-23 07:21:33 -05:00
|
|
|
|
2020-08-26 10:52:32 -04:00
|
|
|
policy_key = None
|
2017-12-23 07:21:33 -05:00
|
|
|
|
2020-08-26 10:52:32 -04:00
|
|
|
catalog = self._search_regex(
|
|
|
|
r'catalog\(({.+?})\);', webpage, 'catalog', default=None)
|
|
|
|
if catalog:
|
|
|
|
catalog = self._parse_json(
|
|
|
|
js_to_json(catalog), video_id, fatal=False)
|
2017-12-23 07:21:33 -05:00
|
|
|
if catalog:
|
2020-08-26 10:52:32 -04:00
|
|
|
policy_key = catalog.get('policyKey')
|
2017-12-23 07:21:33 -05:00
|
|
|
|
2020-08-26 10:52:32 -04:00
|
|
|
if not policy_key:
|
|
|
|
policy_key = self._search_regex(
|
|
|
|
r'policyKey\s*:\s*(["\'])(?P<pk>.+?)\1',
|
|
|
|
webpage, 'policy key', group='pk')
|
2017-12-23 07:21:33 -05:00
|
|
|
|
2019-06-23 06:04:05 -04:00
|
|
|
api_url = 'https://edge.api.brightcove.com/playback/v1/accounts/%s/%ss/%s' % (account_id, content_type, video_id)
|
2020-08-26 10:52:32 -04:00
|
|
|
headers = {
|
|
|
|
'Accept': 'application/json;pk=%s' % policy_key,
|
|
|
|
}
|
2018-02-03 19:52:50 -05:00
|
|
|
referrer = smuggled_data.get('referrer')
|
|
|
|
if referrer:
|
|
|
|
headers.update({
|
|
|
|
'Referer': referrer,
|
|
|
|
'Origin': re.search(r'https?://[^/]+', referrer).group(0),
|
2017-12-23 07:21:33 -05:00
|
|
|
})
|
2020-08-26 10:52:32 -04:00
|
|
|
try:
|
|
|
|
json_data = self._download_json(api_url, video_id, headers=headers)
|
|
|
|
except ExtractorError as e:
|
|
|
|
if isinstance(e.cause, compat_HTTPError) and e.cause.code == 403:
|
|
|
|
json_data = self._parse_json(e.cause.read().decode(), video_id)[0]
|
|
|
|
message = json_data.get('message') or json_data['error_code']
|
|
|
|
if json_data.get('error_subcode') == 'CLIENT_GEO':
|
|
|
|
self.raise_geo_restricted(msg=message)
|
|
|
|
raise ExtractorError(message, expected=True)
|
|
|
|
raise
|
2017-12-23 07:21:33 -05:00
|
|
|
|
|
|
|
errors = json_data.get('errors')
|
|
|
|
if errors and errors[0].get('error_subcode') == 'TVE_AUTH':
|
|
|
|
custom_fields = json_data['custom_fields']
|
|
|
|
tve_token = self._extract_mvpd_auth(
|
|
|
|
smuggled_data['source_url'], video_id,
|
|
|
|
custom_fields['bcadobepassrequestorid'],
|
|
|
|
custom_fields['bcadobepassresourceid'])
|
|
|
|
json_data = self._download_json(
|
|
|
|
api_url, video_id, headers={
|
|
|
|
'Accept': 'application/json;pk=%s' % policy_key
|
|
|
|
}, query={
|
|
|
|
'tveToken': tve_token,
|
|
|
|
})
|
|
|
|
|
2019-06-23 06:04:05 -04:00
|
|
|
if content_type == 'playlist':
|
|
|
|
return self.playlist_result(
|
|
|
|
[self._parse_brightcove_metadata(vid, vid.get('id'), headers)
|
|
|
|
for vid in json_data.get('videos', []) if vid.get('id')],
|
|
|
|
json_data.get('id'), json_data.get('name'),
|
|
|
|
json_data.get('description'))
|
|
|
|
|
2018-02-19 10:28:27 -05:00
|
|
|
return self._parse_brightcove_metadata(
|
|
|
|
json_data, video_id, headers=headers)
|