Add vidmoly capabilities
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "filemoon-extractor"
|
name = "schrottis-extractors"
|
||||||
version = "1"
|
version = "2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pycryptodome",
|
"pycryptodome",
|
||||||
"yt-dlp"
|
"yt-dlp"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
Reference in New Issue
Block a user