Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mover] Add extractor #9799

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions yt_dlp/extractor/_extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,7 @@
MotherlessUploaderIE,
)
from .motorsport import MotorsportIE
from .mover import MoverIE
from .moviepilot import MoviepilotIE
from .moview import MoviewPlayIE
from .moviezine import MoviezineIE
Expand Down
47 changes: 47 additions & 0 deletions yt_dlp/extractor/mover.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
from .common import InfoExtractor


class MoverIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?mover\.uz/watch/(?P<id>[a-zA-Z0-9]+)'
_TESTS = [{
'url': 'https://mover.uz/watch/cMSqJpZm',
'md5': 'a0b50df896154eda275a37219c214fd4',
'info_dict': {
'id': 'cMSqJpZm',
'ext': 'mp4',
'title': '16.38 A Fool Moon Night 98.51% 4824x combo – osu! mania',
'thumbnail': 'https://i.mover.uz/cMSqJpZm_h2.jpg',
}
}, {
'url': 'https://mover.uz/watch/kLB0KQKe',
'md5': '3c7dc53488675ef003db803c2d0f124e',
'info_dict': {
'id': 'kLB0KQKe',
'ext': 'mp4',
'title': 'DEADPOOL & WOLVERINE Trailer (2024) Extended | 4K UHD',
'thumbnail': 'https://i.mover.uz/kLB0KQKe_h2.jpg',
}
}, {
'url': 'https://mover.uz/watch/yYfmpNRa',
'md5': 'a142825db45c9ef8f495635b6f227f3a',
'info_dict': {
'id': 'yYfmpNRa',
'ext': 'mp4',
'title': 'Новое поколение Mazda 6. Дождались',
'thumbnail': 'https://i.mover.uz/yYfmpNRa_h2.jpg',
}
}]

def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
title = self._html_search_meta(['og:title'], webpage, default=None)
thumbnail = self._html_search_meta(['og:image'], webpage, default=None)
mp4_url = 'https://v.mover.uz/' + video_id + "_h.mp4"

return {
'id': video_id,
'title': title,
'thumbnail': thumbnail,
'url': mp4_url,
}