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

[ie/BiliBiliDynamic] Add extractor #11838

Merged
merged 9 commits into from
Jan 20, 2025
Merged

[ie/BiliBiliDynamic] Add extractor #11838

merged 9 commits into from
Jan 20, 2025

Conversation

ghost
Copy link

@ghost ghost commented Dec 17, 2024

Description of your pull request and other information

Fixes #11726

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?

'id': t_id,
}, headers={
'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',
}), ('data', 'item', ((), 'orig'), 'modules', 'module_dynamic', (('major', 'archive'), ('additional', 'reserve')), 'jump_url', any, {sanitize_url}))
Copy link
Contributor

Choose a reason for hiding this comment

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

Support traversal of bangumi ones as well?
https://t.bilibili.com/1010093853244391443
https://t.bilibili.com/1007774564482023446
and example of link within the rich text content
https://t.bilibili.com/1005193024981958661

Copy link
Contributor

Choose a reason for hiding this comment

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

will look into it when i have time. not sure if the links inside the rich text content should be extracted. do similar extractors like twitter's handle links in text like this?
i think we can put the rich text content into the playlist description instead. not sure if users can use --parse-metadata alongside additional_urls then

Copy link
Contributor

Choose a reason for hiding this comment

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

bangumi patch:

diff --git a/yt_dlp/extractor/bilibili.py b/yt_dlp/extractor/bilibili.py
index daf89b20d..7204d3644 100644
--- a/yt_dlp/extractor/bilibili.py
+++ b/yt_dlp/extractor/bilibili.py
@@ -1892,7 +1892,9 @@ def _real_extract(self, url):
                 'id': t_id,
             }, headers={
                 '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',
-            }), ('data', 'item', ((), 'orig'), 'modules', 'module_dynamic', (('major', 'archive'), ('additional', 'reserve')), 'jump_url', any, {sanitize_url}))
+            }), ('data', 'item', ((), 'orig'), 'modules', 'module_dynamic',
+                 (('major', ('archive', 'pgc')), ('additional', ('reserve', 'common'))),
+                 'jump_url', any, {sanitize_url}))
         if not video_url:
             self.raise_no_formats('No video found!', expected=True, video_id=t_id)
         return self.url_result(video_url)

Copy link
Author

Choose a reason for hiding this comment

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

updated.

@ghost ghost mentioned this pull request Jan 6, 2025
@seproDev seproDev added the site-enhancement Feature request for some website label Jan 11, 2025
@ghost
Copy link
Author

ghost commented Jan 13, 2025

@seproDev any chance to merge?

@seproDev seproDev self-assigned this Jan 19, 2025
@seproDev seproDev changed the title [ie/BiliBili] BiliBiliDynamicIE [ie/BiliBiliDynamic] Add extractor Jan 19, 2025
Copy link
Member

@seproDev seproDev left a comment

Choose a reason for hiding this comment

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

I've cleaned up the code a tiny bit

yt_dlp/extractor/bilibili.py Outdated Show resolved Hide resolved
@bashonly bashonly added the pending-fixes PR has had changes requested label Jan 20, 2025
yt_dlp/extractor/bilibili.py Outdated Show resolved Hide resolved
yt_dlp/extractor/bilibili.py Outdated Show resolved Hide resolved
@seproDev seproDev removed the pending-fixes PR has had changes requested label Jan 20, 2025
yt_dlp/extractor/bilibili.py Outdated Show resolved Hide resolved
@seproDev seproDev merged commit 9676b05 into yt-dlp:master Jan 20, 2025
6 checks passed
vladisslav2011 pushed a commit to vladisslav2011/yt-dlp that referenced this pull request Jan 30, 2025
Closes yt-dlp#11726
Authored by: finch71, grqz

Co-authored-by: N/Ame <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-enhancement Feature request for some website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

t.bilibili.com
4 participants