Compare commits

...

11 Commits

Author SHA1 Message Date
schnusch 49dbd54696
Merge 948c020489 into 7687389f08 2024-02-19 16:43:30 +01:00
schnusch 948c020489 [doodstream] only use metadata from the page 2021-08-13 13:29:07 +02:00
schnusch 3be8521c91 [doodstream] update valid TLDs 2021-08-13 12:42:02 +02:00
schnusch cc5a2e533e [doodstream] use try_get and add helper function try_doodExe 2021-05-31 18:45:33 +02:00
schnusch 671e6022be [doodstream] prefer single quotes 2021-05-31 18:30:19 +02:00
schnusch e77d6ab108 [doodstream] add .cx TLD 2021-05-31 18:24:57 +02:00
schnusch 7c6d532803 [doodstream] more robust auth_url 2021-04-30 19:38:22 +02:00
schnusch 847a6464a8 [doodstream] fix and add more metadata
* metadata
      * fetch and decrypt video title
          * implemented doodExe
      * add filesize and duration
      * removed description
      * use _og_search_thumbnail
  * remove User-Agent from HTTP headers because it is not needed
2021-04-30 19:38:18 +02:00
schnusch 7496a0401c [doodstream] only fetch embedded page, remove from generic extractors 2021-04-30 19:24:11 +02:00
schnusch 3f33a9e7dc [doodstream] add doodstream.com to valid urls and more generic video IDs 2021-04-30 19:24:11 +02:00
sxvghd 2b488a9179 [doodstream] add new extractor 2021-04-30 19:24:09 +02:00
2 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,59 @@
# coding: utf-8
from __future__ import unicode_literals
import string
import random
import time
from .common import InfoExtractor
from ..utils import (
js_to_json,
urljoin,
)
class DoodStreamIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?(?:doodstream\.com|dood\.(?:la|so|to|watch))/[de]/(?P<id>[^/?#]+)'
_TESTS = [{
'url': 'https://dood.to/d/wpyp2mgwi2kb',
'md5': '2aaf633bcd5fefb64b27344f55022bf9',
'info_dict': {
'id': 'wpyp2mgwi2kb',
'ext': 'mp4',
'title': 'Big Buck Bunny Trailer',
'thumbnail': r're:^https?://.*\.jpg$',
},
}]
def _real_extract(self, url):
video_id = self._match_id(url)
url = urljoin(url, '/e/' + video_id)
referer = {'Referer': url}
webpage = self._download_webpage(url, video_id)
title = self._html_search_regex(r'<title>(.+?)\s+-\s+DoodStream</title>',
webpage, 'title')
thumbnail = self._html_search_regex(r"('https?://img\.doodcdn\.com/splash/.+?')",
webpage, 'thumbnail')
thumbnail = self._parse_json(thumbnail, video_id,
transform_source=js_to_json)
token = self._html_search_regex(r"[?&]token=([a-z0-9]+)[&']", webpage, 'token')
auth_url = self._html_search_regex(r"('/pass_md5.*?')", webpage,
'pass_md5')
auth_url = self._parse_json(auth_url, video_id,
transform_source=js_to_json)
auth_url = urljoin(url, auth_url)
webpage = self._download_webpage(auth_url, video_id, headers=referer)
final_url = webpage + ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(10)) + '?token=' + token + '&expiry=' + str(int(time.time() * 1000))
return {
'id': video_id,
'title': title,
'url': final_url,
'http_headers': referer,
'ext': 'mp4',
'thumbnail': thumbnail,
}

View File

@ -333,6 +333,7 @@ from .discoverynetworks import DiscoveryNetworksDeIE
from .discoveryvr import DiscoveryVRIE
from .disney import DisneyIE
from .dispeak import DigitallySpeakingIE
from .doodstream import DoodStreamIE
from .dropbox import DropboxIE
from .dw import (
DWIE,