Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DoodStream] Add extractor #32979

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

mp3butcher
Copy link

@mp3butcher mp3butcher commented Nov 23, 2024

update of outdated extractors:
Closes #28903.
Closes #28008.
Closes #31003

@mp3butcher mp3butcher force-pushed the d00dstream branch 3 times, most recently from de01b5d to 6456200 Compare November 23, 2024 19:54
@mp3butcher mp3butcher changed the title [DoodStream] Add extractor from yt-dlp back-port [DoodStream] Add extractor Nov 23, 2024
@mp3butcher mp3butcher force-pushed the d00dstream branch 3 times, most recently from 31d3220 to dde081c Compare November 23, 2024 22:47
Copy link
Contributor

@dirkf dirkf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update and decoding the pass_md5/token stuff.

I've made some comments for information, but I'll apply the changes to the old PR with attribution. The question to be settled is whether the '/d/' page ever embeds a link other than the matching '/e/' page.

youtube_dl/extractor/doodstream.py Outdated Show resolved Hide resolved
youtube_dl/extractor/doodstream.py Outdated Show resolved Hide resolved
youtube_dl/extractor/doodstream.py Outdated Show resolved Hide resolved
youtube_dl/extractor/doodstream.py Show resolved Hide resolved
youtube_dl/extractor/doodstream.py Outdated Show resolved Hide resolved
youtube_dl/extractor/doodstream.py Outdated Show resolved Hide resolved
youtube_dl/extractor/doodstream.py Outdated Show resolved Hide resolved
youtube_dl/extractor/doodstream.py Outdated Show resolved Hide resolved
youtube_dl/extractor/doodstream.py Outdated Show resolved Hide resolved
youtube_dl/extractor/doodstream.py Outdated Show resolved Hide resolved
@syntaxsurge
Copy link

Thanks for the update and decoding the pass_md5/token stuff.

I've made some comments for information, but I'll apply the changes to the old PR with attribution. The question to be settled is whether the '/d/' page ever embeds a link other than the matching '/e/' page.

update of outdated extractors: Closes #28903. Closes #28008. Closes #31003

I tried it, but i get this error:
yt_dlp.utils.DownloadError: ERROR: [generic] Got HTTP Error 403 caused by Cloudflare anti-bot challenge; try again with --extractor-args "generic:impersonate"

My code:

from yt_dlp import YoutubeDL

# Define the video URL
video_url = "https://dood.sh/e/fayk8qbo63zm"

# Options for yt-dlp
ydl_opts = {
    'format': 'best',  # Download the best quality
    'outtmpl': '%(title)s.%(ext)s',  # Save with video title as filename
    'extractor_args': {
        'generic': {
            'impersonate': 'chrome',  # Impersonate Chrome browser
        }
    },
}

# Create a downloader instance
with YoutubeDL(ydl_opts) as ydl:
    ydl.download([video_url])

Thanks

@dirkf
Copy link
Contributor

dirkf commented Nov 29, 2024

I tried it, but i get this error: yt_dlp.utils.DownloadError: ERROR: [generic] Got HTTP Error 403 caused by Cloudflare anti-bot challenge; try again with --extractor-args "generic:impersonate"

#30839 "... if you were actually running yt-dlp ..."

If this code should happen to run correctly within yt-dlp, you'd have to add its import to extractor/_extractors.py to have it do so, rather than hitting the Generic extractor as apparently happened. Or re-work it as a plugin extractor.

FWIW your URL works with the new #31003 code for me. Your IP may be flagged at CF (eg, running the code in a clown^H^Hud VM). The suggestion in your error message wouldn't be relevant; even using --impersonate ... wouldn't help in that case.

dirkf added a commit to dirkf/youtube-dl that referenced this pull request Nov 29, 2024
* update tests
* send `Referer` when fetching media link

Co-authored-by: mp3butcher <julienvalentin51@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants