Compare commits

...

60 Commits

Author SHA1 Message Date
Bart Broere
979bfa00e9
Merge 0a6117341a5fb293ebce82a069d8721c2d37d723 into 4e714f9df1ed2cccd51df60d45ff5504abe827b7 2025-03-27 15:52:15 -04:00
dirkf
4e714f9df1 [Misc] Correct [_]IE_DESC/NAME in a few IEs
* thx seproDev, yt-dlp/yt-dlp/pull/12694/commits/ae69e3c
* also add documenting comment in `InfoExtractor`
2025-03-26 12:47:19 +00:00
dirkf
c1ea7f5a24 [ITV] Mark ITVX not working
* update old shim
* correct [_]IE_DESC
2025-03-26 12:17:49 +00:00
Bart Broere
0a6117341a Merge remote-tracking branch 'ytdl-org/master' into fix-npo-support 2025-03-22 09:39:57 +01:00
Bart Broere
4f8b323d1b Merge remote-tracking branch 'ytdl-org/master' into fix-npo-support 2025-03-15 17:17:27 +01:00
Bart Broere
1fe43de848 Merge remote-tracking branch 'ytdl-org/master' into fix-npo-support 2025-02-10 15:05:35 +01:00
Bart Broere
91e279fec1 Fix name of key 2025-01-31 16:15:03 +01:00
Bart Broere
4aa57d666c Merge remote-tracking branch 'ytdl-org/master' into fix-npo-support 2025-01-31 12:30:53 +01:00
Bart Broere
224e0a7486
Merge branch 'ytdl-org:master' into fix-npo-support 2025-01-04 14:44:46 +01:00
Bart Broere
6f271423e8 Update tests 2024-10-20 14:38:03 +02:00
Bart Broere
75266ce4ed Fix old metadata reference 2024-10-20 13:41:53 +02:00
Bart Broere
817e2e5938 Fix some missing imports 2024-10-20 12:37:48 +02:00
Bart Broere
0e1a0cfa03 Apply some more PR feedback 2024-10-20 12:28:10 +02:00
Bart Broere
7f1c09bea1 Use _sort_formats util 2024-10-20 12:11:30 +02:00
Bart Broere
c3026dd70c Apply suggestion from PR 2024-10-20 12:08:50 +02:00
Bart Broere
41157b2b49 Move GraphQL query into separate variable 2024-10-20 12:00:44 +02:00
Bart Broere
c748eca829 Automatically obtain NextJS buildId and change item to video-item 2024-10-20 11:49:09 +02:00
Bart Broere
6de650f51f Use traverse_obj in another place as well 2024-09-21 20:08:53 +00:00
Bart Broere
bf91db4846 Use suggested util 2024-09-21 20:04:50 +00:00
Bart Broere
ad6ee6fdd2
Commit two suggestions from the PR
Co-authored-by: dirkf <fieldhouse@gmx.net>
2024-09-21 21:58:53 +02:00
Bart Broere
179c8b06b6
Merge branch 'ytdl-org:master' into fix-npo-support 2024-09-11 19:17:00 +02:00
Bart Broere
a60972e253 Fix indent from suggestion 2024-03-15 13:02:56 +01:00
Bart Broere
007bbeacd7
Remove afspelen and trailing slashes with one regex
Co-authored-by: dirkf <fieldhouse@gmx.net>
2024-03-14 13:41:01 +01:00
Bart Broere
4c90b2f587
Adhere to code style
Co-authored-by: dirkf <fieldhouse@gmx.net>
2024-03-14 13:39:59 +01:00
Bart Broere
bc86c5f73b
Make regex more specific and remove redundant .* 2024-03-14 13:37:41 +01:00
Bart Broere
ad64f3751e
Improve regex
Co-authored-by: Roy <git@rvsit.nl>
2024-03-14 13:34:33 +01:00
Bart Broere
d4250c8703
Merge branch 'ytdl-org:master' into fix-npo-support 2024-03-12 20:46:16 +01:00
Bart Broere
58d7a00e3f Resolve some of the pull request feedback 2024-03-11 14:14:38 +01:00
Bart Broere
4398f6832f Fix zapp extractor 2024-03-11 13:40:23 +01:00
Bart Broere
1ca4e686a3 Add an MD5 2024-03-10 17:04:00 +01:00
Bart Broere
28624cfe09 Work work 2024-03-10 16:57:31 +01:00
Bart Broere
c08f29f45b Update unit tests 2024-03-10 16:27:40 +01:00
Bart Broere
0ab79c37ae Reusable code for two NTR sites 2024-03-07 16:23:09 +01:00
Bart Broere
0cbcd1aec6 Make diff better 2024-03-06 12:55:51 +01:00
Bart Broere
159f825edd Add scaffolding for last few extractors and change order so the PR diff looks nice 2024-03-06 12:53:37 +01:00
Bart Broere
681b39032a Fix flake8 and better error reporting 2024-03-06 12:32:34 +01:00
Bart Broere
4b24e5f00d Re-add SchoolTV 2024-03-06 12:22:27 +01:00
Bart Broere
3b3d73cbe6 Use program-detail endpoint and remove a test 2024-03-06 11:52:08 +01:00
Bart Broere
d426a92a60 Encoding suggestion from PR 2024-03-05 14:11:49 +01:00
Bart Broere
d36d50fe5c Re-add Zapp 2024-03-05 14:04:03 +01:00
Bart Broere
eb6e396bfb First version of a VPRO regex 2024-03-05 13:55:59 +01:00
Bart Broere
28ba01f1cc Add Ongehoord Nederland and test URL for BNNVARA 2024-03-05 13:43:56 +01:00
Bart Broere
4fc423845e Fix lint 2024-03-05 12:49:22 +01:00
Bart Broere
34b5b20107 Refactor into reusable method 2024-03-03 17:47:15 +01:00
Bart Broere
8b1a7d9a7c Use provided util 2024-03-01 16:23:19 +01:00
Bart Broere
f9e59b0c49 Add the possibility to add 'hls' later 2024-03-01 15:28:14 +01:00
Bart Broere
fb7b7179ff Speculate about other ways of getting productId 2024-03-01 15:08:10 +01:00
Bart Broere
0dc7d954cb Comply with coding conventions a bit more 2024-03-01 15:05:30 +01:00
Bart Broere
21eb4513e0 Convert the description into code 2024-03-01 14:12:51 +01:00
Bart Broere
29724e7b07 Delete all broken extractors
Re-implementing these is quicker for the cases where that's even still possible
2024-03-01 13:24:48 +01:00
Bart Broere
577368116b Fix token URL 2024-03-01 13:15:52 +01:00
Bart Broere
da3d1f4321 Add notes on new npo.nl site 2024-03-01 10:36:03 +01:00
Bart Broere
f76d58c71f Skip a test 2024-02-26 13:18:36 +01:00
Bart Broere
c409a8c54b
Merge branch 'ytdl-org:master' into fix-npo-support 2024-02-25 09:42:26 +01:00
dirkf
0c7261db90
Update npo.py
* simplify comment
* force CI
2023-04-06 01:51:02 +01:00
Bart Broere
632897860b
Accept suggestions on PR; comply with conventions
Co-authored-by: dirkf <fieldhouse@gmx.net>
2023-04-03 09:50:21 +02:00
Bart Broere
9e1acb2527 Fix flake8 2023-03-31 12:56:18 +02:00
Bart Broere
fb2b4e2894 Add line comment 2023-03-31 12:46:05 +02:00
Bart Broere
b4776f2e36 Import from compat 2023-03-31 12:39:11 +02:00
Bart Broere
3b31478dfd Fix support for NPO downloads 2023-03-31 12:30:22 +02:00
7 changed files with 332 additions and 718 deletions

View File

@ -32,7 +32,7 @@ class BokeCCBaseIE(InfoExtractor):
class BokeCCIE(BokeCCBaseIE):
_IE_DESC = 'CC视频'
IE_DESC = 'CC视频'
_VALID_URL = r'https?://union\.bokecc\.com/playvideo\.bo\?(?P<query>.*)'
_TESTS = [{

View File

@ -9,7 +9,7 @@ from ..utils import (
class CloudyIE(InfoExtractor):
_IE_DESC = 'cloudy.ec'
IE_DESC = 'cloudy.ec'
_VALID_URL = r'https?://(?:www\.)?cloudy\.ec/(?:v/|embed\.php\?.*?\bid=)(?P<id>[A-Za-z0-9]+)'
_TESTS = [{
'url': 'https://www.cloudy.ec/v/af511e2527aac',

View File

@ -422,6 +422,8 @@ class InfoExtractor(object):
_GEO_COUNTRIES = None
_GEO_IP_BLOCKS = None
_WORKING = True
# supply this in public subclasses: used in supported sites list, etc
# IE_DESC = 'short description of IE'
def __init__(self, downloader=None):
"""Constructor. Receives an optional downloader."""

View File

@ -848,14 +848,13 @@ from .nowness import (
from .noz import NozIE
from .npo import (
AndereTijdenIE,
BNNVaraIE,
NPOIE,
NPOLiveIE,
NPORadioIE,
NPORadioFragmentIE,
ONIE,
SchoolTVIE,
HetKlokhuisIE,
VPROIE,
WNLIE,
ZAPPIE,
)
from .npr import NprIE
from .nrk import (

View File

@ -35,15 +35,6 @@ from ..utils import (
class ITVBaseIE(InfoExtractor):
def _search_nextjs_data(self, webpage, video_id, **kw):
transform_source = kw.pop('transform_source', None)
fatal = kw.pop('fatal', True)
return self._parse_json(
self._search_regex(
r'''<script\b[^>]+\bid=('|")__NEXT_DATA__\1[^>]*>(?P<js>[^<]+)</script>''',
webpage, 'next.js data', group='js', fatal=fatal, **kw),
video_id, transform_source=transform_source, fatal=fatal)
def __handle_request_webpage_error(self, err, video_id=None, errnote=None, fatal=True):
if errnote is False:
return False
@ -109,7 +100,9 @@ class ITVBaseIE(InfoExtractor):
class ITVIE(ITVBaseIE):
_VALID_URL = r'https?://(?:www\.)?itv\.com/(?:(?P<w>watch)|hub)/[^/]+/(?(w)[\w-]+/)(?P<id>\w+)'
_IE_DESC = 'ITVX'
IE_DESC = 'ITVX'
_WORKING = False
_TESTS = [{
'note': 'Hub URLs redirect to ITVX',
'url': 'https://www.itv.com/hub/liar/2a4547a0012',
@ -270,7 +263,7 @@ class ITVIE(ITVBaseIE):
'ext': determine_ext(href, 'vtt'),
})
next_data = self._search_nextjs_data(webpage, video_id, fatal=False, default='{}')
next_data = self._search_nextjs_data(webpage, video_id, fatal=False, default={})
video_data.update(traverse_obj(next_data, ('props', 'pageProps', ('title', 'episode')), expected_type=dict)[0] or {})
title = traverse_obj(video_data, 'headerTitle', 'episodeTitle')
info = self._og_extract(webpage, require_title=not title)
@ -323,7 +316,7 @@ class ITVIE(ITVBaseIE):
class ITVBTCCIE(ITVBaseIE):
_VALID_URL = r'https?://(?:www\.)?itv\.com/(?!(?:watch|hub)/)(?:[^/]+/)+(?P<id>[^/?#&]+)'
_IE_DESC = 'ITV articles: News, British Touring Car Championship'
IE_DESC = 'ITV articles: News, British Touring Car Championship'
_TESTS = [{
'note': 'British Touring Car Championship',
'url': 'https://www.itv.com/btcc/articles/btcc-2018-all-the-action-from-brands-hatch',

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@ class SenateISVPIE(InfoExtractor):
['vetaff', '76462', 'http://vetaff-f.akamaihd.net'],
['arch', '', 'http://ussenate-f.akamaihd.net/']
]
_IE_NAME = 'senate.gov'
IE_NAME = 'senate.gov'
_VALID_URL = r'https?://(?:www\.)?senate\.gov/isvp/?\?(?P<qs>.+)'
_TESTS = [{
'url': 'http://www.senate.gov/isvp/?comm=judiciary&type=live&stt=&filename=judiciary031715&auto_play=false&wmode=transparent&poster=http%3A%2F%2Fwww.judiciary.senate.gov%2Fthemes%2Fjudiciary%2Fimages%2Fvideo-poster-flash-fit.png',