Add vidmoly capabilities

This commit is contained in:
2026-07-15 23:12:31 +02:00
parent 0000cf1587
commit 225c213d9d
2 changed files with 35 additions and 2 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
[project]
name = "filemoon-extractor"
version = "1"
name = "schrottis-extractors"
version = "2"
dependencies = [
"pycryptodome",
"yt-dlp"
+33
View File
@@ -0,0 +1,33 @@
import urllib.parse
import re
from datetime import datetime
from yt_dlp.extractor.common import InfoExtractor
class VidmolyIE(InfoExtractor):
_valid_domains = r'|'.join([r'vidmoly\.biz'])
_VALID_URL = r'https?://(?:' + _valid_domains + ')/embed-(?P<id>\w+)\.html$'
def _real_extract(self, url):
video_id = urllib.parse.unquote_plus(self._match_id(url))
html = self._download_html(url)
m3u8_url = re.findall("'(https\\:\\/\\/.*master\\.m3u.*)'", html.text)[0]
formats = self._extract_m3u8_formats(
m3u8_url, video_id, 'mp4',
'm3u8_native', m3u8_id='hls')
title = re.findall(r"<title>(.*)<\/title>", html.text)[0]
ret = {
'id': video_id,
'display_id': video_id,
'title': title,
'formats': formats,
}
return ret