Compare commits

...

3 Commits

Author SHA1 Message Date
Maciej Krüger
021ab2a6e9
Merge 9c8236e0c4b72c260e947040550fbdc19dd0f8db into 3eb8d22ddb8982ca4fb56bb7a8d6517538bf14c6 2025-04-01 09:53:47 +02:00
dirkf
3eb8d22ddb
[JSInterp] Temporary fix for #33102 2025-03-31 04:21:09 +01:00
Maciej Krüger
9c8236e0c4
[vidlox] Add new extractor 2021-07-22 13:37:24 +02:00
3 changed files with 49 additions and 0 deletions

View File

@ -1477,6 +1477,7 @@ from .videomore import (
from .videopress import VideoPressIE from .videopress import VideoPressIE
from .vidio import VidioIE from .vidio import VidioIE
from .vidlii import VidLiiIE from .vidlii import VidLiiIE
from .vidlox import VIDLOXIE
from .vidme import ( from .vidme import (
VidmeIE, VidmeIE,
VidmeUserIE, VidmeUserIE,

View File

@ -0,0 +1,46 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class VIDLOXIE(InfoExtractor):
IE_NAME = 'vidlox'
IE_DESC = 'vidlox'
_VALID_URL = r'https?://vidlox\.me/(embed-)?(?P<id>[a-z0-9]+).html'
_TEST = {
'url': 'https://vidlox.me/6wq8gciafziz.html',
'info_dict': {
'id': '6wq8gciafziz',
'title': 'md5:74c82229b059846a82628e60dcc661b5',
'ext': 'm3u8',
},
}
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(
'https://vidlox.me/%s.html' % video_id, video_id)
m3u8 = self._search_regex(
r'(https.+m3u8)',
webpage, 'm3u8')
title = self._search_regex(
r'<title>Watch (?P<title>.+)<\/title>',
webpage, 'title', group='title')
thumbnail = self._search_regex(
r'spriteSheetUrl = "(?P<thumbnail>https.+)"',
webpage, 'thumbnail', group='thumbnail')
formats = self._extract_m3u8_formats(m3u8, video_id)
self._sort_formats(formats)
return {
'id': video_id,
'title': title,
'formats': formats,
'thumbnail': thumbnail,
}

View File

@ -686,6 +686,8 @@ class JSInterpreter(object):
raise self.Exception('Cannot get index {idx!r:.100}'.format(**locals()), expr=repr(obj), cause=e) raise self.Exception('Cannot get index {idx!r:.100}'.format(**locals()), expr=repr(obj), cause=e)
def _dump(self, obj, namespace): def _dump(self, obj, namespace):
if obj is JS_Undefined:
return 'undefined'
try: try:
return json.dumps(obj) return json.dumps(obj)
except TypeError: except TypeError: