[doodstream] only fetch embedded page, remove from generic extractors

This commit is contained in:
schnusch 2021-04-24 21:55:18 +02:00
parent 3f33a9e7dc
commit 7496a0401c
2 changed files with 5 additions and 19 deletions

View File

@ -4,9 +4,11 @@ from __future__ import unicode_literals
import string
import random
import time
import re
from .common import InfoExtractor
from ..utils import (
urljoin,
)
class DoodStreamIE(InfoExtractor):
@ -22,21 +24,11 @@ class DoodStreamIE(InfoExtractor):
},
}]
@staticmethod
def _extract_urls(webpage):
return re.findall(
r'<iframe[^>]+?src=["\'](?P<url>(?:https?://)?dood\.(?:watch|to|so)/e/.+?)["\']',
webpage)
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
if '/d/' in url:
url = "https://dood.to" + self._html_search_regex(
r'<iframe src="(/e/[a-z0-9]+)"', webpage, 'embed')
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
url = urljoin(url, '/e/' + video_id)
webpage = self._download_webpage(url, video_id)
title = self._html_search_meta(['og:title', 'twitter:title'],
webpage, default=None)

View File

@ -129,7 +129,6 @@ from .odnoklassniki import OdnoklassnikiIE
from .kinja import KinjaEmbedIE
from .arcpublishing import ArcPublishingIE
from .medialaan import MedialaanIE
from .doodstream import DoodStreamIE
class GenericIE(InfoExtractor):
@ -3300,11 +3299,6 @@ class GenericIE(InfoExtractor):
return self.playlist_from_matches(
foxnews_urls, video_id, video_title, ie=FoxNewsIE.ie_key())
doodstream_urls = DoodStreamIE._extract_urls(webpage)
if doodstream_urls:
return self.playlist_from_matches(
doodstream_urls, video_id, video_title, ie=DoodStreamIE.ie_key())
sharevideos_urls = [sharevideos_mobj.group('url') for sharevideos_mobj in re.finditer(
r'<iframe[^>]+?\bsrc\s*=\s*(["\'])(?P<url>(?:https?:)?//embed\.share-videos\.se/auto/embed/\d+\?.*?\buid=\d+.*?)\1',
webpage)]