mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 01:31:25 +01:00
Compare commits
8 Commits
1f2abb71d4
...
6dae50d1a7
Author | SHA1 | Date | |
---|---|---|---|
|
6dae50d1a7 | ||
|
b83ca24eb7 | ||
|
240a7d43c8 | ||
|
f13df591d4 | ||
|
4054886a73 | ||
|
323297eed3 | ||
|
b20719b7c6 | ||
|
97b8f7f8cc |
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()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ from ..utils import (
|
||||||
int_or_none,
|
int_or_none,
|
||||||
parse_age_limit,
|
parse_age_limit,
|
||||||
smuggle_url,
|
smuggle_url,
|
||||||
|
str_to_int,
|
||||||
traverse_obj,
|
traverse_obj,
|
||||||
unsmuggle_url,
|
unsmuggle_url,
|
||||||
url_or_none,
|
url_or_none,
|
||||||
|
@ -38,7 +39,11 @@ class CineverseIE(CineverseBaseIE):
|
||||||
'cast': ['Xun Zhou', 'Xiaoming Huang', 'Yi-Lin Sie', 'Sonia Sui', 'Quniciren'],
|
'cast': ['Xun Zhou', 'Xiaoming Huang', 'Yi-Lin Sie', 'Sonia Sui', 'Quniciren'],
|
||||||
'duration': 5811.597,
|
'duration': 5811.597,
|
||||||
'description': 'md5:892fd62a05611d394141e8394ace0bc6',
|
'description': 'md5:892fd62a05611d394141e8394ace0bc6',
|
||||||
'age_limit': 13,
|
'age_limit': 14,
|
||||||
|
'release_year': 2014,
|
||||||
|
'creators': ['Ho-Cheung Pang'],
|
||||||
|
'categories': ['Comedy', 'Romance'],
|
||||||
|
'tags': ['Romantic Comedy', 'Comedy', 'Cute', 'Romance', 'Chinese'],
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://www.retrocrush.tv/watch/1000000023016/Archenemy! Crystal Bowie',
|
'url': 'https://www.retrocrush.tv/watch/1000000023016/Archenemy! Crystal Bowie',
|
||||||
|
@ -51,11 +56,34 @@ class CineverseIE(CineverseBaseIE):
|
||||||
'season_number': 1,
|
'season_number': 1,
|
||||||
'cast': ['Nachi Nozawa', 'Yoshiko Sakakibara', 'Toshiko Fujita'],
|
'cast': ['Nachi Nozawa', 'Yoshiko Sakakibara', 'Toshiko Fujita'],
|
||||||
'age_limit': 0,
|
'age_limit': 0,
|
||||||
'episode': 'Episode 3',
|
'episode': 'Archenemy! Crystal Bowie',
|
||||||
'season': 'Season 1',
|
'season': 'Season 1',
|
||||||
'duration': 1485.067,
|
'duration': 1485.067,
|
||||||
'description': 'Cobra meets a beautiful bounty hunter by the name of Jane Royal.',
|
'description': 'Cobra meets a beautiful bounty hunter by the name of Jane Royal.',
|
||||||
'series': 'Space Adventure COBRA (Original Japanese)',
|
'series': 'Space Adventure COBRA (Original Japanese)',
|
||||||
|
'creators': ['Osamu Dezaki', 'Yoshio Takeuch'],
|
||||||
|
'categories': ['Action & Adventure', 'Sci-Fi & Fantasy', 'Anime'],
|
||||||
|
'tags': ['Psyco-gun', 'Cobra', 'Lady'],
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
'url': 'https://www.retrocrush.tv/watch/DMR00009822/Wads-of-Bills-Blossom-in-the-Rio-Sunset',
|
||||||
|
'skip': 'geo-blocked',
|
||||||
|
'info_dict': {
|
||||||
|
'title': 'Wads of Bills Blossom in the Rio Sunset',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'id': 'DMR00009822',
|
||||||
|
'episode_number': 2,
|
||||||
|
'season_number': 1,
|
||||||
|
'cast': ['Yasuo Yamada', 'Kiyoshi Kobayashi', 'Gorô Naya', 'Makio Inoue', 'Eiko Masuyama'],
|
||||||
|
'age_limit': 14,
|
||||||
|
'episode': 'Wads of Bills Blossom in the Rio Sunset',
|
||||||
|
'season': 'Season 1',
|
||||||
|
'duration': 1481.451,
|
||||||
|
'description': 'md5:6bdb2e470de0effea481f9a526e44bb3',
|
||||||
|
'series': 'Lupin the 3rd Part II (Original Japanese)',
|
||||||
|
'creators': ['Kyôsuke Mikuriya', 'Hayao Miyazaki', 'Noboru Ishiguro', 'Yasumi Mikamoto'],
|
||||||
|
'categories': ['Anime', 'Action & Adventure', 'Crime'],
|
||||||
|
'tags': ['Anime', 'monkey punch', 'lupin the third', 'lupin', 'lupin the 3rd', 'lupin iii', 'retro anime', 'hayao miyazaki'],
|
||||||
},
|
},
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
@ -77,11 +105,27 @@ class CineverseIE(CineverseBaseIE):
|
||||||
'You may be able to bypass it by using the /details/ page instead of the /watch/ page',
|
'You may be able to bypass it by using the /details/ page instead of the /watch/ page',
|
||||||
countries=smuggled_data.get('geo_countries'))
|
countries=smuggled_data.get('geo_countries'))
|
||||||
|
|
||||||
|
# there can be multiple age limits (e.g. PG-13 AND TV-14), so take highest
|
||||||
|
age_limit = traverse_obj(idetails, ('details', 'rating_code', {lambda x: x.split(', ')}, ..., {parse_age_limit}, all, {max}))
|
||||||
|
|
||||||
|
# get type-dependent metadata
|
||||||
|
if traverse_obj(idetails, ('details', 'type')) == 'episode':
|
||||||
|
# episode of a series - use title as episode name and get tags from series metadata
|
||||||
|
episode = traverse_obj(idetails, ('details', 'title'))
|
||||||
|
tags = traverse_obj(idetails, ('details', 'series_details', 'keyword', {lambda x: x.split(', ')}))
|
||||||
|
else:
|
||||||
|
# other - get tags directly
|
||||||
|
episode = None
|
||||||
|
tags = traverse_obj(idetails, ('details', 'keyword', {lambda x: x.split(', ')}))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'subtitles': filter_dict({
|
'subtitles': filter_dict({
|
||||||
'en': traverse_obj(idetails, (('cc_url_vtt', 'subtitle_url'), {'url': {url_or_none}})) or None,
|
'en': traverse_obj(idetails, (('cc_url_vtt', 'subtitle_url'), {'url': {url_or_none}})) or None,
|
||||||
}),
|
}),
|
||||||
'formats': self._extract_m3u8_formats(idetails['url'], video_id),
|
'formats': self._extract_m3u8_formats(idetails['url'], video_id),
|
||||||
|
'age_limit': age_limit,
|
||||||
|
'episode': episode,
|
||||||
|
'tags': tags,
|
||||||
**traverse_obj(idetails, {
|
**traverse_obj(idetails, {
|
||||||
'title': 'title',
|
'title': 'title',
|
||||||
'id': ('details', 'item_id'),
|
'id': ('details', 'item_id'),
|
||||||
|
@ -91,8 +135,11 @@ class CineverseIE(CineverseBaseIE):
|
||||||
'modified_timestamp': ('details', 'updated_by', 0, 'update_time', 'time', {int_or_none}),
|
'modified_timestamp': ('details', 'updated_by', 0, 'update_time', 'time', {int_or_none}),
|
||||||
'season_number': ('details', 'season', {int_or_none}),
|
'season_number': ('details', 'season', {int_or_none}),
|
||||||
'episode_number': ('details', 'episode', {int_or_none}),
|
'episode_number': ('details', 'episode', {int_or_none}),
|
||||||
'age_limit': ('details', 'rating_code', {parse_age_limit}),
|
|
||||||
'series': ('details', 'series_details', 'title'),
|
'series': ('details', 'series_details', 'title'),
|
||||||
|
'creators': ('details', 'directors', {lambda x: x.split(', ')}),
|
||||||
|
'release_year': ('details', 'pub_year', {str_to_int}),
|
||||||
|
'categories': ('details', 'genres', {lambda x: x.split(', ')}),
|
||||||
|
'tags': ('details', 'keyword', {lambda x: x.split(', ')}),
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,6 +163,13 @@ class CineverseDetailsIE(CineverseBaseIE):
|
||||||
'cast': ['Jeong-myeong Cheon', 'Eun Won-jae', 'Shim Eun-gyeong', 'Ji-hee Jin', 'Hee-soon Park', 'Lydia Park', 'Kyeong-ik Kim'],
|
'cast': ['Jeong-myeong Cheon', 'Eun Won-jae', 'Shim Eun-gyeong', 'Ji-hee Jin', 'Hee-soon Park', 'Lydia Park', 'Kyeong-ik Kim'],
|
||||||
'duration': 7030.732,
|
'duration': 7030.732,
|
||||||
},
|
},
|
||||||
|
}, {
|
||||||
|
'url': 'https://www.retrocrush.tv/details/DMR00009819/Lupin-the-3rd-Part-II-(Original-Japanese)',
|
||||||
|
'playlist_mincount': 155,
|
||||||
|
'info_dict': {
|
||||||
|
'title': 'Lupin the 3rd Part II (Original Japanese)',
|
||||||
|
'id': 'DMR00009819',
|
||||||
|
},
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user