Skip to content

Commit ab1d310

Browse files
author
thr3a
committed
fix:
1 parent 1094b2d commit ab1d310

File tree

3 files changed

+97
-6
lines changed

3 files changed

+97
-6
lines changed

yt-dlp/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12-slim
1+
FROM python:3.13-slim
22

33
ENV DEBIAN_FRONTEND=noninteractive
44
ENV TZ=Asia/Tokyo
@@ -14,10 +14,10 @@ RUN pip install https://github.com/ytdl-org/youtube-dl/archive/master.tar.gz
1414
RUN pip install https://github.com/soimort/you-get/archive/master.tar.gz
1515

1616
ADD yt-dlp.conf /etc/yt-dlp.conf
17-
# ADD yt-dlp.conf /etc/youtube-dl.conf
17+
ADD yt-dlp.conf /etc/youtube-dl.conf
1818

1919
# https://github.com/smalltownjj/yt-dlp-plugin-missav
20-
ADD missav.py /etc/yt-dlp-plugins/yt-dlp-plugin-missav/yt_dlp_plugins/extractor/missav.py
20+
# ADD doodstream.py /etc/yt-dlp-plugins/yt-dlp-plugin-missav/yt_dlp_plugins/extractor/doodstream.py
2121
WORKDIR /app
2222

2323
ENTRYPOINT ["yt-dlp"]

yt-dlp/doodstream.py

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
import string
2+
import random
3+
import time
4+
5+
from yt_dlp.extractor.common import InfoExtractor
6+
7+
8+
class DoodStreamIE(InfoExtractor):
9+
_VALID_URL = (
10+
r"https?://(?:www\.)?dood\.(?:to|watch|so|pm|wf|sh)/[ed]/(?P<id>[a-z0-9]+)"
11+
)
12+
_TESTS = [
13+
{
14+
"url": "http://dood.to/e/5s1wmbdacezb",
15+
"md5": "4568b83b31e13242b3f1ff96c55f0595",
16+
"info_dict": {
17+
"id": "5s1wmbdacezb",
18+
"ext": "mp4",
19+
"title": "Kat Wonders - Monthly May 2020",
20+
"description": "Kat Wonders - Monthly May 2020 | DoodStream.com",
21+
"thumbnail": "https://img.doodcdn.com/snaps/flyus84qgl2fsk4g.jpg",
22+
},
23+
},
24+
{
25+
"url": "http://dood.watch/d/5s1wmbdacezb",
26+
"md5": "4568b83b31e13242b3f1ff96c55f0595",
27+
"info_dict": {
28+
"id": "5s1wmbdacezb",
29+
"ext": "mp4",
30+
"title": "Kat Wonders - Monthly May 2020",
31+
"description": "Kat Wonders - Monthly May 2020 | DoodStream.com",
32+
"thumbnail": "https://img.doodcdn.com/snaps/flyus84qgl2fsk4g.jpg",
33+
},
34+
},
35+
{
36+
"url": "https://dood.to/d/jzrxn12t2s7n",
37+
"md5": "3207e199426eca7c2aa23c2872e6728a",
38+
"info_dict": {
39+
"id": "jzrxn12t2s7n",
40+
"ext": "mp4",
41+
"title": "Stacy Cruz Cute ALLWAYSWELL",
42+
"description": "Stacy Cruz Cute ALLWAYSWELL | DoodStream.com",
43+
"thumbnail": "https://img.doodcdn.com/snaps/8edqd5nppkac3x8u.jpg",
44+
},
45+
},
46+
{"url": "https://dood.so/d/jzrxn12t2s7n", "only_matching": True},
47+
]
48+
49+
def _real_extract(self, url):
50+
video_id = self._match_id(url)
51+
url = f"https://dood.to/e/{video_id}"
52+
webpage = self._download_webpage(url, video_id)
53+
54+
title = self._html_search_meta(
55+
("og:title", "twitter:title"), webpage, default=None
56+
) or self._html_extract_title(webpage)
57+
thumb = self._html_search_meta(
58+
["og:image", "twitter:image"], webpage, default=None
59+
)
60+
token = self._html_search_regex(r"[?&]token=([a-z0-9]+)[&\']", webpage, "token")
61+
description = self._html_search_meta(
62+
["og:description", "description", "twitter:description"],
63+
webpage,
64+
default=None,
65+
)
66+
67+
headers = {
68+
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/66.0",
69+
"referer": url,
70+
}
71+
72+
pass_md5 = self._html_search_regex(r"(/pass_md5.*?)\'", webpage, "pass_md5")
73+
final_url = "".join(
74+
(
75+
self._download_webpage(
76+
f"https://dood.to{pass_md5}", video_id, headers=headers
77+
),
78+
*(
79+
random.choice(string.ascii_letters + string.digits)
80+
for _ in range(10)
81+
),
82+
f"?token={token}&expiry={int(time.time() * 1000)}",
83+
)
84+
)
85+
86+
return {
87+
"id": video_id,
88+
"title": title,
89+
"url": final_url,
90+
"http_headers": headers,
91+
"ext": "mp4",
92+
"description": description,
93+
"thumbnail": thumb,
94+
}

yt-dlp/yt-dlp.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
# Do not copy the mtime
22
--no-mtime
3-
4-
--hls-prefer-ffmpeg
5-
63
--user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.2903.86'

0 commit comments

Comments
 (0)