-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Conversation
yt_dlp/extractor/bilibili.py
Outdated
'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})) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
@seproDev any chance to merge? |
There was a problem hiding this 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
Co-authored-by: N/Ame <[email protected]>
Co-authored-by: bashonly <[email protected]>
Closes yt-dlp#11726 Authored by: finch71, grqz Co-authored-by: N/Ame <[email protected]>
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:
What is the purpose of your pull request?