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

[extractor/douyutv] fix broken DouyuTV and DouyuShow #7652

Merged
merged 29 commits into from Sep 21, 2023

Conversation

c-basalt
Copy link
Contributor

@c-basalt c-basalt commented Jul 21, 2023

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Use PhantomJS to enable the use of new APIs to fix DouyuTV (live stream) and DouyuShow (videos).

Fixes #2494
Fixes #7295

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

Copilot Summary

🤖 Generated by Copilot at 0bd9507

Summary

🛠️📺🐛

Refactor and improve douyutv.py extractors. Create a new base class DouyuBaseIE and use it for DouyuTVIE and DouyuShowIE. Fix format and metadata extraction for Douyu livestreams and VODs.

DouyuBaseIE is the master of the stream
It spawns the subclasses with common genes
They rip the formats and metadata from the site
Refactoring the code with power and might

Walkthrough

  • Introduce a new base class DouyuBaseIE for common logic of Douyu extractors (link)
  • Update and fix the extraction of livestream formats and metadata in DouyuTVIE (link, link, link)
  • Fix a typo in the DouyuTVIE class that used the wrong variable for room id (link)
  • Add and update the extraction of VOD formats and metadata in DouyuShowIE (link, link)

@c-basalt c-basalt marked this pull request as ready for review July 23, 2023 04:39
yt_dlp/extractor/douyutv.py Fixed Show fixed Hide fixed
yt_dlp/extractor/douyutv.py Fixed Show fixed Hide fixed
yt_dlp/extractor/douyutv.py Fixed Show fixed Hide fixed
@bashonly bashonly self-requested a review September 17, 2023 13:31
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
yt_dlp/extractor/douyutv.py Show resolved Hide resolved
@bashonly bashonly added pending-fixes PR has had changes requested site-bug Issue with a specific website labels Sep 18, 2023
c-basalt and others added 3 commits September 19, 2023 09:54
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
c-basalt and others added 2 commits September 19, 2023 17:02
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
@bashonly bashonly removed the pending-fixes PR has had changes requested label Sep 19, 2023
@bashonly bashonly added the pending-review PR needs a review label Sep 19, 2023
yt_dlp/extractor/douyutv.py Outdated Show resolved Hide resolved
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
@bashonly bashonly removed the pending-review PR needs a review label Sep 21, 2023
@bashonly bashonly merged commit 21f40e7 into yt-dlp:master Sep 21, 2023
16 checks passed
@c-basalt c-basalt deleted the douyu branch September 21, 2023 19:14
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DouyuTV live - HTTP error 403 Forbidden Unable to download videos from Douyu
4 participants