Porównaj commity

...

6 Commity

Autor SHA1 Wiadomość Data
Eric Lam bc1fe1f089
Merge 634a0ac756 into 89f535e265 2024-04-23 09:07:00 +03:00
bashonly 89f535e265
[ci] Fix `curl-cffi` installation (Bugfix for 02483bea1c)
Authored by: bashonly
2024-04-22 20:36:01 +00:00
Eric Lam 634a0ac756
Merge branch 'yt-dlp:master' into master 2024-04-14 04:24:44 +08:00
voidful 06ba180cda fix(europa): update preferred language and URL parsing in EuroParlWebstreamIE class 2024-04-10 17:31:35 +08:00
Eric Lam e7b87d9742
Merge branch 'yt-dlp:master' into master 2024-04-10 16:41:19 +08:00
Eric Lam 1fbc472587
Update europa.py
update regex to support latest link
2024-04-08 21:40:06 +08:00
2 zmienionych plików z 19 dodań i 8 usunięć

Wyświetl plik

@ -53,7 +53,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install test requirements
run: python3 ./devscripts/install_deps.py --include dev --include curl_cffi
run: python3 ./devscripts/install_deps.py --include dev --include curl-cffi
- name: Run tests
continue-on-error: False
run: |

Wyświetl plik

@ -54,7 +54,7 @@ class EuropaIE(InfoExtractor):
return items[p]
query = parse_qs(url)
preferred_lang = query.get('sitelang', ('en', ))[0]
preferred_lang = query.get('sitelang', ('en',))[0]
preferred_langs = orderedSet((preferred_lang, 'en', 'int'))
@ -93,10 +93,12 @@ class EuropaIE(InfoExtractor):
class EuroParlWebstreamIE(InfoExtractor):
_VALID_URL = r'''(?x)
https?://multimedia\.europarl\.europa\.eu/[^/#?]+/
(?:(?!video)[^/#?]+/[\w-]+_)(?P<id>[\w-]+)
'''
_VALID_URL = r'''(?x)https?://multimedia\.europarl\.europa\.eu/
(?:(?:[^/#?]+/)*[\w-]+/)?
(?:(?!video)[^/#?]+/)?
(?:[\w-]+_)?
(?P<id>[\w-]+)
'''
_TESTS = [{
'url': 'https://multimedia.europarl.europa.eu/pl/webstreaming/plenary-session_20220914-0900-PLENARY',
'info_dict': {
@ -142,7 +144,16 @@ class EuroParlWebstreamIE(InfoExtractor):
'live_status': 'is_live',
},
'skip': 'Not live anymore'
}]
}, {
# live stream
'url': 'https://multimedia.europarl.europa.eu/en/webstreaming/20240320-1345-SPECIAL-PRESSER',
'info_dict': {
'id': '20240320-1345-SPECIAL-PRESSER',
'ext': 'mp4',
'release_date': '20240320',
}
}
]
def _real_extract(self, url):
display_id = self._match_id(url)
@ -166,7 +177,7 @@ class EuroParlWebstreamIE(InfoExtractor):
return {
'id': json_info['id'],
'title': traverse_obj(webpage_nextjs, (('mediaItem', 'title'), ('title', )), get_all=False),
'title': traverse_obj(webpage_nextjs, (('mediaItem', 'title'), ('title',)), get_all=False),
'formats': formats,
'subtitles': subtitles,
'release_timestamp': parse_iso8601(json_info.get('startDateTime')),