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/tiktok] Extract all web formats #9960

Merged
merged 5 commits into from
May 20, 2024

Conversation

bashonly
Copy link
Member

@bashonly bashonly commented May 18, 2024

Extract all formats during webpage extraction, bringing web formats almost on par with the mobile API formats -- enough to close the linked issue, at least.

Notably, this patch changes the format_id of the previously-known sometimes-unwatermarked web format from 0 to play -- and play is usually removed as a duplicate of one of the h264_res_bitrate formats.

Closes #9506

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

What is the purpose of your pull request?

  • Fix or improvement to an extractor (Make sure to add/update tests)

@bashonly bashonly added the site-enhancement Feature request for some website label May 18, 2024
yt_dlp/extractor/tiktok.py Outdated Show resolved Hide resolved
yt_dlp/extractor/tiktok.py Outdated Show resolved Hide resolved
yt_dlp/extractor/tiktok.py Outdated Show resolved Hide resolved
Authored by: bashonly
@bashonly bashonly changed the title [ie/tiktok] Improve web formats extraction [ie/tiktok] Extract all web formats May 20, 2024
Authored by: bashonly
return {}, None
return {
'format_id': format_id,
'vcodec': 'h265' if codec == 'bytevc1' else codec,
Copy link
Contributor

Choose a reason for hiding this comment

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

h265 isn't VVC but HEVC, is it? (also I think mapping the value here will make line 436 meaningless)

Authored by: bashonly
@bashonly bashonly merged commit 4ccd73f into yt-dlp:master May 20, 2024
5 of 6 checks passed
@bashonly bashonly deleted the fix/tiktok-web-formats branch May 22, 2024 20:56
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.

[TikTok] Failed to parse JSON/ No video formats found
3 participants