mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-14 22:37:59 +09:00
[doodstream] only fetch embedded page, remove from generic extractors
This commit is contained in:
parent
3f33a9e7dc
commit
7496a0401c
@ -4,9 +4,11 @@ from __future__ import unicode_literals
|
|||||||
import string
|
import string
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
import re
|
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
from ..utils import (
|
||||||
|
urljoin,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class DoodStreamIE(InfoExtractor):
|
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):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
|
|
||||||
if '/d/' in url:
|
url = urljoin(url, '/e/' + video_id)
|
||||||
url = "https://dood.to" + self._html_search_regex(
|
webpage = self._download_webpage(url, video_id)
|
||||||
r'<iframe src="(/e/[a-z0-9]+)"', webpage, 'embed')
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
|
|
||||||
title = self._html_search_meta(['og:title', 'twitter:title'],
|
title = self._html_search_meta(['og:title', 'twitter:title'],
|
||||||
webpage, default=None)
|
webpage, default=None)
|
||||||
|
@ -129,7 +129,6 @@ from .odnoklassniki import OdnoklassnikiIE
|
|||||||
from .kinja import KinjaEmbedIE
|
from .kinja import KinjaEmbedIE
|
||||||
from .arcpublishing import ArcPublishingIE
|
from .arcpublishing import ArcPublishingIE
|
||||||
from .medialaan import MedialaanIE
|
from .medialaan import MedialaanIE
|
||||||
from .doodstream import DoodStreamIE
|
|
||||||
|
|
||||||
|
|
||||||
class GenericIE(InfoExtractor):
|
class GenericIE(InfoExtractor):
|
||||||
@ -3300,11 +3299,6 @@ class GenericIE(InfoExtractor):
|
|||||||
return self.playlist_from_matches(
|
return self.playlist_from_matches(
|
||||||
foxnews_urls, video_id, video_title, ie=FoxNewsIE.ie_key())
|
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(
|
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',
|
r'<iframe[^>]+?\bsrc\s*=\s*(["\'])(?P<url>(?:https?:)?//embed\.share-videos\.se/auto/embed/\d+\?.*?\buid=\d+.*?)\1',
|
||||||
webpage)]
|
webpage)]
|
||||||
|
Loading…
Reference in New Issue
Block a user