kopia lustrzana https://github.com/yt-dlp/yt-dlp
Porównaj commity
6 Commity
fceca5202f
...
bc1fe1f089
Autor | SHA1 | Data |
---|---|---|
Eric Lam | bc1fe1f089 | |
bashonly | 89f535e265 | |
Eric Lam | 634a0ac756 | |
voidful | 06ba180cda | |
Eric Lam | e7b87d9742 | |
Eric Lam | 1fbc472587 |
|
@ -53,7 +53,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install test requirements
|
- 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
|
- name: Run tests
|
||||||
continue-on-error: False
|
continue-on-error: False
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -54,7 +54,7 @@ class EuropaIE(InfoExtractor):
|
||||||
return items[p]
|
return items[p]
|
||||||
|
|
||||||
query = parse_qs(url)
|
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'))
|
preferred_langs = orderedSet((preferred_lang, 'en', 'int'))
|
||||||
|
|
||||||
|
@ -93,10 +93,12 @@ class EuropaIE(InfoExtractor):
|
||||||
|
|
||||||
|
|
||||||
class EuroParlWebstreamIE(InfoExtractor):
|
class EuroParlWebstreamIE(InfoExtractor):
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)https?://multimedia\.europarl\.europa\.eu/
|
||||||
https?://multimedia\.europarl\.europa\.eu/[^/#?]+/
|
(?:(?:[^/#?]+/)*[\w-]+/)?
|
||||||
(?:(?!video)[^/#?]+/[\w-]+_)(?P<id>[\w-]+)
|
(?:(?!video)[^/#?]+/)?
|
||||||
'''
|
(?:[\w-]+_)?
|
||||||
|
(?P<id>[\w-]+)
|
||||||
|
'''
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://multimedia.europarl.europa.eu/pl/webstreaming/plenary-session_20220914-0900-PLENARY',
|
'url': 'https://multimedia.europarl.europa.eu/pl/webstreaming/plenary-session_20220914-0900-PLENARY',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
|
@ -142,7 +144,16 @@ class EuroParlWebstreamIE(InfoExtractor):
|
||||||
'live_status': 'is_live',
|
'live_status': 'is_live',
|
||||||
},
|
},
|
||||||
'skip': 'Not live anymore'
|
'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):
|
def _real_extract(self, url):
|
||||||
display_id = self._match_id(url)
|
display_id = self._match_id(url)
|
||||||
|
@ -166,7 +177,7 @@ class EuroParlWebstreamIE(InfoExtractor):
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': json_info['id'],
|
'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,
|
'formats': formats,
|
||||||
'subtitles': subtitles,
|
'subtitles': subtitles,
|
||||||
'release_timestamp': parse_iso8601(json_info.get('startDateTime')),
|
'release_timestamp': parse_iso8601(json_info.get('startDateTime')),
|
||||||
|
|
Ładowanie…
Reference in New Issue