mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-26 17:21:23 +01:00
Compare commits
13 Commits
a0db6601c0
...
25578137b1
Author | SHA1 | Date | |
---|---|---|---|
|
25578137b1 | ||
|
b83ca24eb7 | ||
|
240a7d43c8 | ||
|
f13df591d4 | ||
|
3e1c1f2e39 | ||
|
4ff30140d1 | ||
|
9483bb86df | ||
|
fe354fa548 | ||
|
35b614b598 | ||
|
974babf965 | ||
|
c6f0d05213 | ||
|
2f54918f30 | ||
|
424dd9e061 |
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
|
@ -504,7 +504,8 @@ jobs:
|
||||||
- windows32
|
- windows32
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: artifact
|
path: artifact
|
||||||
pattern: build-bin-*
|
pattern: build-bin-*
|
||||||
|
|
17
.github/workflows/release-master.yml
vendored
17
.github/workflows/release-master.yml
vendored
|
@ -28,3 +28,20 @@ jobs:
|
||||||
actions: write # For cleaning up cache
|
actions: write # For cleaning up cache
|
||||||
id-token: write # mandatory for trusted publishing
|
id-token: write # mandatory for trusted publishing
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
publish_pypi:
|
||||||
|
needs: [release]
|
||||||
|
if: vars.MASTER_PYPI_PROJECT != ''
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
id-token: write # mandatory for trusted publishing
|
||||||
|
steps:
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: dist
|
||||||
|
name: build-pypi
|
||||||
|
- name: Publish to PyPI
|
||||||
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
with:
|
||||||
|
verbose: true
|
||||||
|
|
17
.github/workflows/release-nightly.yml
vendored
17
.github/workflows/release-nightly.yml
vendored
|
@ -41,3 +41,20 @@ jobs:
|
||||||
actions: write # For cleaning up cache
|
actions: write # For cleaning up cache
|
||||||
id-token: write # mandatory for trusted publishing
|
id-token: write # mandatory for trusted publishing
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
publish_pypi:
|
||||||
|
needs: [release]
|
||||||
|
if: vars.NIGHTLY_PYPI_PROJECT != ''
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
id-token: write # mandatory for trusted publishing
|
||||||
|
steps:
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: dist
|
||||||
|
name: build-pypi
|
||||||
|
- name: Publish to PyPI
|
||||||
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
with:
|
||||||
|
verbose: true
|
||||||
|
|
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
|
@ -2,10 +2,6 @@ name: Release
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
prerelease:
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
source:
|
source:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
|
@ -18,6 +14,10 @@ on:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
type: string
|
type: string
|
||||||
|
prerelease:
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
source:
|
source:
|
||||||
|
@ -278,11 +278,20 @@ jobs:
|
||||||
make clean-cache
|
make clean-cache
|
||||||
python -m build --no-isolation .
|
python -m build --no-isolation .
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
if: github.event_name != 'workflow_dispatch'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: build-pypi
|
||||||
|
path: |
|
||||||
|
dist/*
|
||||||
|
compression-level: 0
|
||||||
|
|
||||||
- name: Publish to PyPI
|
- name: Publish to PyPI
|
||||||
|
if: github.event_name == 'workflow_dispatch'
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
verbose: true
|
verbose: true
|
||||||
attestations: false # Currently doesn't work w/ reusable workflows (breaks nightly)
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
needs: [prepare, build]
|
needs: [prepare, build]
|
||||||
|
|
|
@ -52,7 +52,7 @@ default = [
|
||||||
"pycryptodomex",
|
"pycryptodomex",
|
||||||
"requests>=2.32.2,<3",
|
"requests>=2.32.2,<3",
|
||||||
"urllib3>=1.26.17,<3",
|
"urllib3>=1.26.17,<3",
|
||||||
"websockets>=13.0",
|
"websockets>=13.0,<14",
|
||||||
]
|
]
|
||||||
curl-cffi = [
|
curl-cffi = [
|
||||||
"curl-cffi==0.5.10; os_name=='nt' and implementation_name=='cpython'",
|
"curl-cffi==0.5.10; os_name=='nt' and implementation_name=='cpython'",
|
||||||
|
|
|
@ -24,7 +24,7 @@ try:
|
||||||
from Crypto.Cipher import AES, PKCS1_OAEP, Blowfish, PKCS1_v1_5 # noqa: F401
|
from Crypto.Cipher import AES, PKCS1_OAEP, Blowfish, PKCS1_v1_5 # noqa: F401
|
||||||
from Crypto.Hash import CMAC, SHA1 # noqa: F401
|
from Crypto.Hash import CMAC, SHA1 # noqa: F401
|
||||||
from Crypto.PublicKey import RSA # noqa: F401
|
from Crypto.PublicKey import RSA # noqa: F401
|
||||||
except ImportError:
|
except (ImportError, OSError):
|
||||||
__version__ = f'broken {__version__}'.strip()
|
__version__ = f'broken {__version__}'.strip()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,37 +9,37 @@ from ..utils import (
|
||||||
)
|
)
|
||||||
|
|
||||||
_COMMITTEES = {
|
_COMMITTEES = {
|
||||||
'ag': ('76440', 'http://ag-f.akamaihd.net'),
|
'ag': ('76440', 'https://ag-f.akamaihd.net', '2036803', 'agriculture'),
|
||||||
'aging': ('76442', 'http://aging-f.akamaihd.net'),
|
'aging': ('76442', 'https://aging-f.akamaihd.net', '2036801', 'aging'),
|
||||||
'approps': ('76441', 'http://approps-f.akamaihd.net'),
|
'approps': ('76441', 'https://approps-f.akamaihd.net', '2036802', 'appropriations'),
|
||||||
'arch': ('', 'http://ussenate-f.akamaihd.net'),
|
'arch': ('', 'https://ussenate-f.akamaihd.net/', '', 'arch'),
|
||||||
'armed': ('76445', 'http://armed-f.akamaihd.net'),
|
'armed': ('76445', 'https://armed-f.akamaihd.net', '2036800', 'armedservices'),
|
||||||
'banking': ('76446', 'http://banking-f.akamaihd.net'),
|
'banking': ('76446', 'https://banking-f.akamaihd.net', '2036799', 'banking'),
|
||||||
'budget': ('76447', 'http://budget-f.akamaihd.net'),
|
'budget': ('76447', 'https://budget-f.akamaihd.net', '2036798', 'budget'),
|
||||||
'cecc': ('76486', 'http://srs-f.akamaihd.net'),
|
'cecc': ('76486', 'https://srs-f.akamaihd.net', '2036782', 'srs_cecc'),
|
||||||
'commerce': ('80177', 'http://commerce1-f.akamaihd.net'),
|
'commerce': ('80177', 'https://commerce1-f.akamaihd.net', '2036779', 'commerce'),
|
||||||
'csce': ('75229', 'http://srs-f.akamaihd.net'),
|
'csce': ('75229', 'https://srs-f.akamaihd.net', '2036777', 'srs_srs'),
|
||||||
'dpc': ('76590', 'http://dpc-f.akamaihd.net'),
|
'dpc': ('76590', 'https://dpc-f.akamaihd.net', '', 'dpc'),
|
||||||
'energy': ('76448', 'http://energy-f.akamaihd.net'),
|
'energy': ('76448', 'https://energy-f.akamaihd.net', '2036797', 'energy'),
|
||||||
'epw': ('76478', 'http://epw-f.akamaihd.net'),
|
'epw': ('76478', 'https://epw-f.akamaihd.net', '2036783', 'environment'),
|
||||||
'ethics': ('76449', 'http://ethics-f.akamaihd.net'),
|
'ethics': ('76449', 'https://ethics-f.akamaihd.net', '2036796', 'ethics'),
|
||||||
'finance': ('76450', 'http://finance-f.akamaihd.net'),
|
'finance': ('76450', 'https://finance-f.akamaihd.net', '2036795', 'finance_finance'),
|
||||||
'foreign': ('76451', 'http://foreign-f.akamaihd.net'),
|
'foreign': ('76451', 'https://foreign-f.akamaihd.net', '2036794', 'foreignrelations'),
|
||||||
'govtaff': ('76453', 'http://govtaff-f.akamaihd.net'),
|
'govtaff': ('76453', 'https://govtaff-f.akamaihd.net', '2036792', 'hsgac'),
|
||||||
'help': ('76452', 'http://help-f.akamaihd.net'),
|
'help': ('76452', 'https://help-f.akamaihd.net', '2036793', 'help'),
|
||||||
'indian': ('76455', 'http://indian-f.akamaihd.net'),
|
'indian': ('76455', 'https://indian-f.akamaihd.net', '2036791', 'indianaffairs'),
|
||||||
'intel': ('76456', 'http://intel-f.akamaihd.net'),
|
'intel': ('76456', 'https://intel-f.akamaihd.net', '2036790', 'intelligence'),
|
||||||
'intlnarc': ('76457', 'http://intlnarc-f.akamaihd.net'),
|
'intlnarc': ('76457', 'https://intlnarc-f.akamaihd.net', '', 'internationalnarcoticscaucus'),
|
||||||
'jccic': ('85180', 'http://jccic-f.akamaihd.net'),
|
'jccic': ('85180', 'https://jccic-f.akamaihd.net', '2036778', 'jccic'),
|
||||||
'jec': ('76458', 'http://jec-f.akamaihd.net'),
|
'jec': ('76458', 'https://jec-f.akamaihd.net', '2036789', 'jointeconomic'),
|
||||||
'judiciary': ('76459', 'http://judiciary-f.akamaihd.net'),
|
'judiciary': ('76459', 'https://judiciary-f.akamaihd.net', '2036788', 'judiciary'),
|
||||||
'rpc': ('76591', 'http://rpc-f.akamaihd.net'),
|
'rpc': ('76591', 'https://rpc-f.akamaihd.net', '', 'rpc'),
|
||||||
'rules': ('76460', 'http://rules-f.akamaihd.net'),
|
'rules': ('76460', 'https://rules-f.akamaihd.net', '2036787', 'rules'),
|
||||||
'saa': ('76489', 'http://srs-f.akamaihd.net'),
|
'saa': ('76489', 'https://srs-f.akamaihd.net', '2036780', 'srs_saa'),
|
||||||
'smbiz': ('76461', 'http://smbiz-f.akamaihd.net'),
|
'smbiz': ('76461', 'https://smbiz-f.akamaihd.net', '2036786', 'smallbusiness'),
|
||||||
'srs': ('75229', 'http://srs-f.akamaihd.net'),
|
'srs': ('75229', 'https://srs-f.akamaihd.net', '2031966', 'srs_srs'),
|
||||||
'uscc': ('76487', 'http://srs-f.akamaihd.net'),
|
'uscc': ('76487', 'https://srs-f.akamaihd.net', '2036781', 'srs_uscc'),
|
||||||
'vetaff': ('76462', 'http://vetaff-f.akamaihd.net'),
|
'vetaff': ('76462', 'https://vetaff-f.akamaihd.net', '2036785', 'veteransaffairs'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,15 +173,23 @@ class SenateGovIE(InfoExtractor):
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
display_id = self._generic_id(url)
|
display_id = self._generic_id(url)
|
||||||
webpage = self._download_webpage(url, display_id)
|
webpage = self._download_webpage(url, display_id)
|
||||||
parse_info = parse_qs(self._search_regex(
|
iframe_src = self._search_regex(
|
||||||
r'<iframe class="[^>"]*streaminghearing[^>"]*"\s[^>]*\bsrc="([^">]*)', webpage, 'hearing URL'))
|
(r'<iframe class="[^>"]*streaminghearing[^>"]*"\s[^>]*\bsrc="([^">]*)',
|
||||||
|
r'<iframe title="[^>"]*[^>"]*"\s[^>]*\bsrc="([^">]*)'),
|
||||||
stream_num, stream_domain = _COMMITTEES[parse_info['comm'][-1]]
|
webpage, 'hearing URL').replace('&', '&')
|
||||||
|
parse_info = parse_qs(iframe_src)
|
||||||
|
comm = parse_info['comm'][-1]
|
||||||
|
stream_num, stream_domain, stream_id, msl3 = _COMMITTEES[comm]
|
||||||
filename = parse_info['filename'][-1]
|
filename = parse_info['filename'][-1]
|
||||||
|
|
||||||
formats = self._extract_m3u8_formats(
|
urls_alternatives = [f'https://www-senate-gov-media-srs.akamaized.net/hls/live/{stream_id}/{comm}/{filename}/master.m3u8',
|
||||||
f'{stream_domain}/i/{filename}_1@{stream_num}/master.m3u8',
|
f'https://www-senate-gov-msl3archive.akamaized.net/{msl3}/{filename}_1/master.m3u8',
|
||||||
display_id, ext='mp4')
|
f'{stream_domain}/i/{filename}_1@{stream_num}/master.m3u8',
|
||||||
|
f'{stream_domain}/i/{filename}.mp4/master.m3u8']
|
||||||
|
for video_url in urls_alternatives:
|
||||||
|
formats = self._extract_m3u8_formats(video_url, display_id, ext='mp4', fatal=False)
|
||||||
|
if formats:
|
||||||
|
break
|
||||||
|
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
(*self._og_regexes('title'), r'(?s)<title>([^<]*?)</title>'), webpage, 'video title')
|
(*self._og_regexes('title'), r'(?s)<title>([^<]*?)</title>'), webpage, 'video title')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user