Add YouVideo Extractor for shiz and giggles
Some checks failed
Release (master) / release (push) Has been cancelled
Release (master) / publish_pypi (push) Has been cancelled
Download Tests / Quick Download Tests (push) Has been skipped
Download Tests / Full Download Tests (ubuntu-latest, 3.10) (push) Has been skipped
Download Tests / Full Download Tests (ubuntu-latest, 3.11) (push) Has been skipped
Download Tests / Full Download Tests (ubuntu-latest, 3.12) (push) Has been skipped
Download Tests / Full Download Tests (ubuntu-latest, 3.13) (push) Has been skipped
Download Tests / Full Download Tests (ubuntu-latest, 3.14-dev) (push) Has been skipped
Download Tests / Full Download Tests (ubuntu-latest, pypy-3.11) (push) Has been skipped
Quick Test / Core Test (push) Failing after 3m31s
Quick Test / Code check (push) Failing after 23s
Download Tests / Full Download Tests (windows-latest, 3.9) (push) Has been cancelled
Download Tests / Full Download Tests (windows-latest, pypy-3.11) (push) Has been cancelled
Keep cache warm / build (push) Has been skipped
CodeQL / Analyze (python) (push) Failing after 6m33s
Release (nightly) / check_nightly (push) Has been skipped
Release (nightly) / release (push) Has been skipped
Release (nightly) / publish_pypi (push) Has been skipped

This commit is contained in:
usernames122
2025-10-12 17:53:47 +02:00
parent 87be1bb96a
commit 57f96c4fff
2 changed files with 36 additions and 0 deletions

View File

@@ -2599,3 +2599,5 @@ from .zingmp3 import (
)
from .zoom import ZoomIE
from .zype import ZypeIE
from .youvideo import YouVideoIE

View File

@@ -0,0 +1,34 @@
from .common import InfoExtractor
from ..utils import (
int_or_none, unified_strdate
)
class YouVideoIE(InfoExtractor):
IE_NAME = 'YouVideo'
_VALID_URL = r'https?://youvideo\.nonamesoft\.xyz/youvideo/\?play=(?P<id>[0-9a-fA-F-]{36})'
_TESTS = [{
'url': 'https://youvideo.nonamesoft.xyz/youvideo/?play=8f9888f2-24d1-4220-8d50-e9236c929650',
'only_matching': True,
}]
def _real_extract(self, url):
video_id = self._match_id(url)
api_url = f'https://youvideo.nonamesoft.xyz/youvideo/video/{video_id}'
data = self._download_json(api_url, video_id, note='Downloading video metadata') # Direct! YouVideo is easy!
formats = [
{
'url': f'https://youvideo.nonamesoft.xyz/youvideo/api/videofile/with_extension/{video_id}{data.get("extension","wtf")}',
"ext": data.get("extension","mp4").lstrip('.'),
'format_id': 'source', # Youvideo has no transcodes, only source
}
]
metadata = data.get("metadata",{})
return {
'id': video_id,
'title': data.get("name","Failed to fetch title"),
'formats': formats,
'duration': int_or_none(metadata.get('duration')),
'description': data.get('description',"No description specified"),
}