Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[unauthorizedtv] Add new extractor #21319

Closed
wants to merge 335 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
335 commits
Select commit Hold shift + click to select a range
d1fcf25
[safari] Fix authentication (closes #22161) (#22184)
phan-ctrl Aug 27, 2019
494d664
[youtube] Add support for invidious.nixnet.xyz and yt.elukerio.org (#…
Aug 27, 2019
b72305f
[bbccouk] Extend _VALID_URL (closes #19200)
jaysttw Aug 26, 2019
acc86c9
[bbc] Fix some tests
jaysttw Aug 26, 2019
b500955
[openload] Add support for oload.vip (closes #22205)
dstftw Aug 27, 2019
9d058b3
[dailymotion] Add support for lequipe.fr (closes #21328, closes #22152)
dstftw Aug 29, 2019
3f46a25
[verystream] add support for woof.tube (closes #22217)
remitamine Aug 31, 2019
71f4761
[downloader/external] Respect mtime option for aria2c (#22242)
telephono Aug 31, 2019
cc73d5a
[openload] Fix domains regex
dstftw Aug 31, 2019
d78657f
[extractor/generic] Add support for squarespace embeds (closes #21294)
galgeek Jul 22, 2019
7cb51b5
[extractor/generic] Improve squarespace detection and fix test (close…
dstftw Aug 31, 2019
8945b10
[xhamster] Add support for more domains
dstftw Aug 31, 2019
df22835
[xhamster:user] Add extractor (closes #16330, closes #18454)
dstftw Aug 31, 2019
79dd888
[ChangeLog] Actualize
dstftw Aug 31, 2019
f620d0d
release 2019.09.01
dstftw Aug 31, 2019
d7da1e3
[nickjr] Add support for nickelodeonjunior.fr (#22246)
patrickdessalle Sep 1, 2019
66d04c7
[platzi:course] Add support for authentication
dstftw Sep 2, 2019
31dbd05
[platzi] Improve client data extraction (closes #22290)
dstftw Sep 2, 2019
bff90fc
[youtube] Add support for invidious tor instances (#22268)
Sep 2, 2019
bf1317d
[youtube] Quick extraction tempfix (closes #22367, closes #22163)
dstftw Sep 11, 2019
035c7a5
[ChangeLog] Actualize
dstftw Sep 11, 2019
bd10b22
release 2019.09.12
dstftw Sep 11, 2019
303d3e1
[ChangeLog] Actualize
dstftw Sep 11, 2019
4878759
[youtube] Remove quality and tbr for itag 43 (closes #22372)
dstftw Sep 11, 2019
2f851a7
[ChangeLog] Actualize
dstftw Sep 11, 2019
e1f692f
release 2019.09.12.1
dstftw Sep 11, 2019
20e11b7
[tv4] Fix extraction and extract series metadata (closes #22443)
dstftw Sep 18, 2019
9cf26b6
[zdf] Bypass geo restriction
dstftw Sep 18, 2019
6fd26a7
[9now] Fix extraction (closes #22361)
dstftw Sep 18, 2019
1cb812d
[hotstar] Extract more formats (closes #22323)
dstftw Sep 18, 2019
d9d3098
[hotstar] Use native HLS downloader by default
dstftw Sep 18, 2019
f455a93
[brightcove] delegate all supported BrightcoveLegacyIE URLs to Bright…
remitamine Sep 19, 2019
6cf6b35
[mixcloud] allow uppercase letters in format urls(closes #19280)
remitamine Sep 20, 2019
edb2820
[instagram] add support for tv URLs
remitamine Sep 21, 2019
4bc15a6
[bilibili] add support audio albums and songs(closes #21094)
remitamine Sep 22, 2019
4e3f1f0
[youtube:playlist] Unescape playlist uploader (closes #22483)
dstftw Sep 22, 2019
7d327fe
[jwplatfom] do not match video URLs(#20596) (#22148)
ipaha Sep 23, 2019
666d808
[youtube] Add support for invidious.drycat.fr (#22451)
Sep 24, 2019
8e9fdcb
[openload] Add support for oload.online (#22304)
smed79 Sep 24, 2019
d06daf2
[YoutubeDL] Honour all --get-* options with --flat-playlist (closes #…
dstftw Sep 24, 2019
df63caf
[byutv] Fix extraction (refs #22070)
dstftw Sep 24, 2019
a373bef
[nhk] fix video extraction(closes #22249)(closes #22353)
remitamine Sep 24, 2019
21d3c21
[nhk] Add support for clips
dstftw Sep 24, 2019
33c1c7d
[youtube] Add support for owxfohz4kjyv25fvlqilyxast7inivgiktls3th44jh…
Sep 24, 2019
2a88a0c
[ted] check for resources validity and extract subtitled downloads(cl…
remitamine Sep 26, 2019
cb3e4a2
[heise] Fix kaltura embeds extraction (closes #22514)
dstftw Sep 26, 2019
8130ac4
[openload] PEP 8
dstftw Sep 26, 2019
6483fbd
[vk] Fix extraction (closes #22522)
dstftw Sep 27, 2019
412f44f
[ChangeLog] Actualize
dstftw Sep 27, 2019
f4b865c
release 2019.09.28
dstftw Sep 27, 2019
72fd4d0
[nonktube] Fix extraction (closes #22544)
dstftw Sep 29, 2019
326ae4f
[viewlift] Improve extraction (closes #22545)
dstftw Sep 29, 2019
2906631
[viewlift] Fix URL matching
dstftw Oct 1, 2019
74bc299
[teachable] Skip login when already logged in (closes #22572)
dstftw Oct 1, 2019
25e911a
[extractor/common] Make _is_valid_url more relaxed
dstftw Oct 2, 2019
aaf9d90
[orf:tvthek] Make manifest requests non fatal (refs #22578)
dstftw Oct 2, 2019
894b382
[youtube] Add support for yt.lelux.fi (#22597)
Oct 4, 2019
ca20b13
[nrktv:seriebase] Fix extraction (#22596)
mpolden Oct 4, 2019
9679a62
[openload] Add support for oload.monster (#22592)
kr4ssi Oct 4, 2019
76e510b
[youtube] Remove support for invidious.enkirton.net (#22543)
Oct 4, 2019
4e72d02
[xvideos] Extend _VALID_URL (#22471)
Stephan972 Oct 4, 2019
c2915de
[telequebec] Add support for coucou.telequebec.tv (#22482)
waptaff Oct 4, 2019
b64045c
[peertube] Update instances (#22414)
anoadragon453 Oct 4, 2019
fd4db1e
[chaturbate] Extend _VALID_URL (#22309)
axelerometer Oct 4, 2019
0b87bee
[gfycat] Extend _VALID_URL (#22225)
AnhNhan Oct 4, 2019
3a37f2c
[wimp] Remove extractor (closes #22088) (#22091)
bitraid Oct 4, 2019
05446d4
[telequebec:squat] Add support for squat.telequebec.tv (closes #18503)
dstftw Oct 4, 2019
4bf568d
[pornhub:uservideos:upload] Fix extraction (closes #22619)
dstftw Oct 5, 2019
560d3b7
[redtube] Improve metadata extraction (closes #22492, closes #22615)
dstftw Oct 5, 2019
d4bb825
[globo] fix format extraction(closes #20319)
remitamine Oct 9, 2019
1907f06
[kaltura] Fix embed info strip (refs #22658)
dstftw Oct 9, 2019
07b50f6
[kaltura] Fix service URL extraction (closes #22658)
dstftw Oct 9, 2019
2765c47
[promptfile] Remove extractor (closes #6239)
dstftw Oct 9, 2019
c317b61
[vessel] remove extractor
remitamine Oct 9, 2019
311ee45
[nbc] switch to graphql api(closes #18581)(closes #22693)(closes #22701)
remitamine Oct 14, 2019
a1ee23e
[vimeo] fix VHX embed extraction
remitamine Oct 14, 2019
7e05df7
[nexx] handle result list(closes #22666)
remitamine Oct 14, 2019
2af01c0
[bokecc] improve player params extraction(closes #22638)
remitamine Oct 15, 2019
30eb05c
[globo] extract subtitles(closes #22713)
remitamine Oct 15, 2019
974311b
[vimeo] improve album videos id extraction(closes #22599)
remitamine Oct 15, 2019
173190f
[ChangeLog] Actualize
dstftw Oct 15, 2019
7815d6b
release 2019.10.16
dstftw Oct 15, 2019
6d394a6
[atresplayer] fix extraction(closes #16277)(closes #16716)
remitamine Oct 16, 2019
e29e96a
[dumpert] fix extraction(closes #22428)(closes #22564)
remitamine Oct 16, 2019
2b115b9
[servingsys] Remove extractor(closes #22639)
remitamine Oct 16, 2019
d07866f
[mit] Remove support for video.mit.edu(closes #22403)
remitamine Oct 16, 2019
bc48773
[twitch] update VOD URL matching (closes #22395) (#22727)
mobidots Oct 16, 2019
0001157
[atresplayer] Add coding cookie
remitamine Oct 16, 2019
86f6363
[audioboom] improve metadata extraction
remitamine Oct 17, 2019
755541a
[mangomolo] fix video format extraction and add support for player URLs
remitamine Oct 17, 2019
59296ba
[xfileshare] clean extractor
remitamine Oct 17, 2019
34e3885
[viewster->contv] remove viewster extractor and add support for contv…
remitamine Oct 17, 2019
824fa51
[utils] Improve subtitles_filename (closes #22753)
dstftw Oct 17, 2019
2297c0d
[facebook] Bypass download rate limits (closes #21018)
dstftw Oct 19, 2019
b4818e3
[ChangeLog] Actualize
dstftw Oct 21, 2019
820215f
release 2019.10.22
dstftw Oct 21, 2019
0c2d10d
[globo] handle alternative hash signing method
remitamine Oct 22, 2019
07154c7
[facebook] extract subtitles(closes #22777)
remitamine Oct 22, 2019
162bcc6
[puhutv] improve extraction
remitamine Oct 24, 2019
416c3ca
[odnoklassniki] add support for Schemeless embed extraction
remitamine Oct 25, 2019
3c98981
[vk] improve extraction
remitamine Oct 25, 2019
42cd082
[vk] remove assert statement
remitamine Oct 25, 2019
235dbb4
[discoverynetworks] add support for dplay.co.uk
remitamine Oct 26, 2019
0b98f3a
[dplay] improve extraction
remitamine Oct 26, 2019
548c395
[soundcloud] improve extraction
remitamine Oct 27, 2019
dd90451
[tenplay] Add new extractor(closes #21446)
remitamine Oct 27, 2019
71fa0b0
[makertv] remove extractor
remitamine Oct 28, 2019
80c2126
[thesun] fix extraction(closes #16966)
remitamine Oct 28, 2019
0f9d535
[la7] update Kaltura service URL(closes #22358)
remitamine Oct 28, 2019
3e252cc
[macgamestore] remove extractor
remitamine Oct 28, 2019
831b732
[learnr] remove extractor
remitamine Oct 28, 2019
b3c2fa6
[tutv] remove extractor
remitamine Oct 28, 2019
702984e
[hark] remove extractor
remitamine Oct 28, 2019
895e5c0
[nbcnews] fix extraction
remitamine Oct 28, 2019
83e4925
[internetvideoarchive] fix extraction
remitamine Oct 28, 2019
0086726
[videodetective] fix extraction
remitamine Oct 28, 2019
cfabc50
[mtv] fix extraction for mtv.de (closes #22113)
remitamine Oct 28, 2019
3cdcebf
[mtv] add support for mtvjapan.com
remitamine Oct 28, 2019
01358b9
[extractors] add import for MTVJapanIE
remitamine Oct 28, 2019
dd90a21
[go] Add support for abc.com and freeform.com (closes #22823, closes …
dstftw Oct 28, 2019
aef9f87
[go] Improve and beautify _VALID_URL
dstftw Oct 28, 2019
0d7392e
[ChangeLog] Actualize
dstftw Oct 28, 2019
53896ca
[utils] Actualize major IPv4 address blocks per country
dstftw Oct 28, 2019
cae0bbc
[ChangeLog] Actualize
dstftw Oct 28, 2019
c4bd9cb
release 2019.10.29
dstftw Oct 28, 2019
7455832
[fox9] fix extraction
remitamine Oct 29, 2019
8989349
[onet] improve extraction
remitamine Oct 29, 2019
c56b2ac
[tv2dk] Add extractor
dstftw Oct 29, 2019
9a621dd
[tv2] Fix and improve extraction (closes #22787)
dstftw Oct 29, 2019
45f4a43
[yahoo] improve extraction
remitamine Oct 30, 2019
8040a0d
[yahoo] fix typo
remitamine Oct 30, 2019
237513e
[yahoo] restore support for cbs suffixed URLs
remitamine Oct 31, 2019
3cf70bf
[yahoo] make cbs URL suffix part of the media alias
remitamine Oct 31, 2019
e993f1a
[mixcloud] fix cloudcast data extraction(closes #22821)
remitamine Oct 31, 2019
274bf5e
[kakao] improve extraction
remitamine Nov 1, 2019
d439989
[daum] fix VOD and Clip extracton(closes #15015)
remitamine Nov 1, 2019
e987ce4
[kakao] remove raw request and extract format total bitrate
remitamine Nov 1, 2019
20cc7c0
[go90] remove extractor
remitamine Nov 1, 2019
152f229
[wistia] reduce embed extraction false positives and support inline e…
remitamine Nov 1, 2019
4c95fcf
[bambuser] remove extractor
remitamine Nov 1, 2019
836bfcb
[flipagram] remove extractor
remitamine Nov 2, 2019
79b35e7
[gameone] Remove extractor (#21778)
geditorit Nov 2, 2019
9249c50
[keek] remove extractor
remitamine Nov 2, 2019
5e36b63
[iconosquare] remove extractor
remitamine Nov 2, 2019
e54924c
[stv] fix extraction(closes #22928)
remitamine Nov 2, 2019
726e8ee
[bellmedia] add support for marilyn.ca videos(#22193)
remitamine Nov 2, 2019
564275e
[telegraaf] fix extraction
remitamine Nov 3, 2019
a6e6673
[README.md] Also read permission to the binary in how to update secti…
lmanul Nov 3, 2019
ef38240
[mediaset] extract unprotected M3U and MPD manifests(closes #17204)
remitamine Nov 4, 2019
bf45295
[mediaset] relax URL guid matching(closes #18352)
remitamine Nov 4, 2019
e452345
[jamendo] improve extraction
remitamine Nov 4, 2019
2349255
[jamendo] restore track url modification
remitamine Nov 4, 2019
3e49083
[myspass] fix video URL extraction and improve metadata extraction(cl…
remitamine Nov 4, 2019
c69e717
[msn] add support for Vidible and AOL embeds(closes #22195)(closes #2…
remitamine Nov 4, 2019
2021804
[scte] Add extractor (closes #22975)
dstftw Nov 4, 2019
1a4e4b0
[ChangeLog] Actualize
dstftw Nov 4, 2019
ea07412
release 2019.11.05
dstftw Nov 4, 2019
e9b9516
[roosterteeth] fix login request(closes #16094)(closes #22689)
remitamine Nov 5, 2019
b77c394
[patreon] minimize reponse size and extract uploader_id and filesize
remitamine Nov 5, 2019
2318629
[dplay] minimize response size
remitamine Nov 5, 2019
b6139cb
[common] pass headers to _extract_(m3u8|mpd)_formats methods
remitamine Nov 5, 2019
d7def23
[hotstar] pass Referer header to format requests(closes #22836)
remitamine Nov 5, 2019
57033e3
[common] fix typo
remitamine Nov 5, 2019
3ec8661
[common] initialize headers param with empty dict
remitamine Nov 6, 2019
d64ec12
[onionstudios] fix extraction
remitamine Nov 6, 2019
55adb63
[kinja] add support for Kinja embeds
remitamine Nov 6, 2019
5d92b40
[mixcloud] improve extraction
remitamine Nov 6, 2019
d4f53af
[lnkgo] fix extraction(closes #16834)
remitamine Nov 6, 2019
0b16b3c
[twitch] add support for Clip embed URLs
remitamine Nov 9, 2019
18ca61c
[twitter] improve extraction
remitamine Nov 9, 2019
ce112a8
[twitch] fix video comments URL(#18593)(closes #15828)
remitamine Nov 9, 2019
f81dd65
[extractor/common] clean jwplayer description HTML tags
remitamine Nov 9, 2019
8fbf5d2
[seeker] remove Revision3 extractors and fix extraction
remitamine Nov 9, 2019
20baa17
[daisuki] remove extractor
remitamine Nov 9, 2019
88b87b0
[minhateca] remove extractor
remitamine Nov 9, 2019
9e46d1f
[addanime] remove extractor
remitamine Nov 9, 2019
433e071
[facebook] fix posts video data extraction(closes #22473)
remitamine Nov 10, 2019
2e9ad59
[soundcloud] check if the soundtrack has downloads left(closes #23045)
remitamine Nov 11, 2019
48970d5
[teamcoco] add support for new videos(closes #23054)
remitamine Nov 12, 2019
eb22d1b
[nexx] Add support for Multi Player JS Setup(closes #23052)
remitamine Nov 13, 2019
5709d66
[drtv] Add support for new URL schema (closes #23059)
dstftw Nov 13, 2019
8b1a30c
[comcarcoff] remove extractor
remitamine Nov 14, 2019
656c200
[ivi] fix format extraction(closes #21991)
remitamine Nov 15, 2019
1bba88e
[ivi] sign content request only when pycryptodome is available
remitamine Nov 15, 2019
7360c06
[extractor/common] Add data, headers and query to all major extract m…
dstftw Nov 15, 2019
6c79785
[travis] Add python 3.8 build
dstftw Nov 16, 2019
9e4e864
[ivi] improve error detection
remitamine Nov 16, 2019
7e70620
[vk] fix wall audio thumbnails extraction(closes #23135)
remitamine Nov 18, 2019
f9c4a45
[ntvru] add support for non relative file URLs(closes #23140)
remitamine Nov 18, 2019
76d9eca
[ivi] fallback to old extraction method for unknown error codes
remitamine Nov 19, 2019
f0f6a7e
[chaturbate] Fix extraction (closes #23010, closes #23012)
dstftw Nov 21, 2019
25d3f77
[ivi] Ask for pycryptodomex instead of pycryptodome
dstftw Nov 21, 2019
f8015c1
[ivi] Fix python 3.4 support
dstftw Nov 21, 2019
80a51fc
[ivi] Skip s353 for bundled exe
dstftw Nov 21, 2019
fb8dfc5
[ChangeLog] Actualize
dstftw Nov 21, 2019
0de9fd2
release 2019.11.22
dstftw Nov 21, 2019
cf3c9ea
[soundcloud] Update client id (closes #23214)
dstftw Nov 26, 2019
9d30c21
[utils] Handle rd-suffixed day parts in unified_strdate (#23199)
InfernalUnderling Nov 26, 2019
6ddd4bf
[bitchute] Extract upload date (closes #22990) (#23193)
InfernalUnderling Nov 26, 2019
1ced222
[utils] Add generic caesar cipher and rot47
dstftw Nov 26, 2019
edc2a1f
[vivo] Fix extraction (closes #22328, closes #22279)
dstftw Nov 26, 2019
df65a4a
[corus] improve extraction
remitamine Nov 26, 2019
5ef62fc
[dailymotion] improve extraction
remitamine Nov 26, 2019
6471d0d
[openload] remove OpenLoad related extractors(closes #11999)(closes #…
remitamine Nov 26, 2019
681ac7c
[vimeo] improve extraction
remitamine Nov 27, 2019
e3f00f1
[ChangeLog] Actualize
dstftw Nov 28, 2019
b568561
release 2019.11.28
dstftw Nov 28, 2019
348c6bf
[utils] handle int values passed to str_to_int
remitamine Nov 29, 2019
7f641d2
[adobetv] improve extaction
remitamine Nov 29, 2019
a15adbe
[channel9] reduce response size and update tests
remitamine Nov 29, 2019
88a7a90
[abcotvs] relax _VALID_URL regex and improve metadata extraction(clos…
remitamine Nov 29, 2019
c0b1e01
[msn] improve extraction
remitamine Nov 29, 2019
8d3a3a9
[tv2] add support for mtv.fi and fix tv2.no article extraction(closes…
remitamine Nov 30, 2019
0b25af9
[tv2] detect DRM protection
remitamine Nov 30, 2019
66b4872
[youtube] add support youtubekids.com(closes #23272)
remitamine Nov 30, 2019
1ed2c4b
[ooyala] add better fallback values for domain and streams variables
remitamine Nov 30, 2019
ddfe501
[nintendo] fix extraction and partially add support for Nintendo Dire…
remitamine Nov 30, 2019
3765284
[teachingchannel] fix extraction
remitamine Nov 30, 2019
12cc891
[nrl] fix extraction
remitamine Nov 30, 2019
6797de7
[vzaar] add support for AES HLS manifests(closes #17521)(closes #23299)
remitamine Dec 3, 2019
c712b16
[vzaar] override AES decryption key URL(closes #17521)
remitamine Dec 3, 2019
63fe44e
[vzaar] update test
remitamine Dec 3, 2019
22974a3
[yahoo] correct gyao brightcove player id(closes #23303)
remitamine Dec 3, 2019
3ae8786
[ufctv] fix extraction and add support for UFC Arabia(closes #23312)
remitamine Dec 4, 2019
7d53fa4
[imggaming] add support for playlists and extract subtitles
remitamine Dec 4, 2019
4067a23
[ufctv] add support for more domains and remove compatibility code(cl…
remitamine Dec 6, 2019
1d31b7c
[twitch] extract m3u8 formats frame rate(closes #23333)
remitamine Dec 6, 2019
6633103
[ufctv] add support for ufcfightpass.imgdge.com and ufcfightpass.imgg…
remitamine Dec 7, 2019
ce709fc
[musicplayon] remove extractor(closes #9225)
remitamine Dec 7, 2019
9d4424a
[videopremium] remove extractor
remitamine Dec 8, 2019
d686cab
[kontrtube] remove extractor
remitamine Dec 8, 2019
0e6ec3c
[vk] improve extraction
remitamine Dec 9, 2019
cf80ff1
[soundcloud] add support for token protected embeds(#18954)
remitamine Dec 9, 2019
232ed8e
[twitch] fix clip extraction(closes #23375)
remitamine Dec 13, 2019
b33a05d
[slideslive] fix extraction(closes #23413)
remitamine Dec 14, 2019
73d8f3a
[slideslive] add support for url and vimeo service names(closes #23414)
remitamine Dec 14, 2019
42db58e
[utils] Improve str_to_int
dstftw Dec 15, 2019
fab0108
[tv2dk:bornholm:play] Add extractor (closes #23291)
dstftw Dec 15, 2019
2dbc096
[ChangeLog] Actualize
dstftw Dec 15, 2019
429c564
[unauthorizedtv] Add new extractor
kevgrig Jun 6, 2019
bb17ebb
[unauthorizedtv] Add new extractor
kevgrig Jun 6, 2019
06603fa
[unauthorizedtv] Remove verbose debug
kevgrig Jun 9, 2019
b83975f
[unauthorizedtv] Collapse lines to single line
kevgrig Jun 9, 2019
8a05ffa
[unauthorizedtv] Use compat_str
kevgrig Jun 9, 2019
efc7389
[unauthorizedtv] Require cid in URL
kevgrig Jun 9, 2019
bf09740
[unauthorizedtv] Update id in test
kevgrig Jun 9, 2019
31043fc
[unauthorizedtv] Fix flake8 warnings
kevgrig Jun 9, 2019
40505e8
[unauthorizedtv] Require csrf-token
kevgrig Jun 9, 2019
2190c8a
Merge branch 'unauthorizedtv' of github.com:kevgrig/youtube-dl into u…
kevgrig Dec 22, 2019
f1bcfe6
[unauthorizedtv] Support login
kevgrig Dec 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions youtube_dl/extractor/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,7 @@
from .uktvplay import UKTVPlayIE
from .digiteka import DigitekaIE
from .umg import UMGDeIE
from .unauthorizedtv import UnauthorizedTvIE
from .unistra import UnistraIE
from .unity import UnityIE
from .uol import UOLIE
Expand Down
80 changes: 80 additions & 0 deletions youtube_dl/extractor/unauthorizedtv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# coding: utf-8
from __future__ import unicode_literals

from .common import InfoExtractor


class UnauthorizedTvIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?unauthorized\.tv/programs/(?P<id>.+)'
_TEST = {
'url': 'https://www.unauthorized.tv/programs/owens-shorts?cid=231148',
'md5': 'dd9a5b81b9704c68942c2584086dd73f',
'info_dict': {
'id': 'owens-shorts?cid=231148',
'ext': 'mp4',
'title': 'Millennials',
}
}

def _real_extract(self, url):
video_id = self._match_id(url)
cid = None

if "?cid=" in video_id:
cid = int(video_id[video_id.find('=') + 1:])
kevgrig marked this conversation as resolved.
Show resolved Hide resolved

if self._downloader.params.get('verbose', False):
print(video_id)
kevgrig marked this conversation as resolved.
Show resolved Hide resolved

html = self._download_webpage(url, video_id)

csrf_token = self._html_search_meta(
'csrf-token',
html,
'csrf token',
default=None
kevgrig marked this conversation as resolved.
Show resolved Hide resolved
)

headers = {
'Referer': url,
'X-Requested-With': 'XMLHttpRequest',
'X-CSRF-Token': csrf_token,
kevgrig marked this conversation as resolved.
Show resolved Hide resolved
}

chaptersJson = self._download_json(
'https://www.unauthorized.tv/api/contents/%s' % video_id,
video_id,
headers=headers
)

if self._downloader.params.get('verbose', False):
print(chaptersJson)
kevgrig marked this conversation as resolved.
Show resolved Hide resolved

chapters = '&ids[]='.join([str(x) for x in chaptersJson['chapters']])
kevgrig marked this conversation as resolved.
Show resolved Hide resolved

metadata = self._download_json(
'https://www.unauthorized.tv/api/chapters?ids[]=%s' % chapters,
video_id,
headers=headers
)

if cid is None:
video_title = metadata[0]['title']
video_url = metadata[0]['subject']['versions']['hls']
else:
for item in metadata:
if item["id"] == cid:
video_title = item['title']
video_url = item['subject']['versions']['hls']

if self._downloader.params.get('verbose', False):
print(metadata)
print(video_title)
print(video_url)
kevgrig marked this conversation as resolved.
Show resolved Hide resolved

return {
'id': video_id,
'title': video_title,
kevgrig marked this conversation as resolved.
Show resolved Hide resolved
'url': video_url,
kevgrig marked this conversation as resolved.
Show resolved Hide resolved
'ext': 'mp4',
}