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/lbry] Extract uploader_id #8244

Merged
merged 6 commits into from Oct 6, 2023
Merged

Conversation

drzraf
Copy link
Contributor

@drzraf drzraf commented Sep 30, 2023

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Adds %(channel)s and %(upload_id)s for lbry

Fixes #123

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 b0c3420

Summary

🛠️🔄🧑‍🎤

Fix channel and uploader extraction in lbry.py. Make the fields consistent with the YouTube extractor.

LBRY metadata
channel and uploader fixed
like YouTube in fall

Walkthrough

  • Extract and set the channel_id, channel_url, uploader, and uploader_url fields from the claim and signing_channel keys in the stream metadata (link)
  • Use the channel_name field as the uploader if the signing_channel key is missing or invalid (link)
  • Add tests for the cases where the channel name and URL are missing or incorrect (link)

…ader.

These make good fit for %(channel)s or, for the normalized form,
%(uploader_id)s as a human-readable counterpart of %(channel_id)s

NB: For backward compatibility, signing_channel.value.title it's unsure
 when does this field exist.
Copy link
Member

@bashonly bashonly left a comment

Choose a reason for hiding this comment

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

After code review suggestions have been resolved then update tests please

yt_dlp/extractor/lbry.py Outdated Show resolved Hide resolved
yt_dlp/extractor/lbry.py Outdated Show resolved Hide resolved
@bashonly bashonly added pending-fixes PR has had changes requested site-enhancement Feature request for some website labels Sep 30, 2023
@bashonly bashonly changed the title [ie/lbry] channel name and uploader_id [ie/lbry] Extract uploader_id Sep 30, 2023
drzraf and others added 2 commits October 1, 2023 00:16
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
@bashonly
Copy link
Member

bashonly commented Oct 2, 2023

update tests please

@drzraf
Copy link
Contributor Author

drzraf commented Oct 6, 2023

Done, but please note that one test is broken (not fetch the 3 formats and not download the expected file), but this also affect master and is independent from this PR.

@bashonly bashonly self-requested a review October 6, 2023 03:02
@bashonly bashonly added pending-review PR needs a review and removed pending-fixes PR has had changes requested labels Oct 6, 2023
@Grub4K Grub4K removed the pending-review PR needs a review label Oct 6, 2023
@bashonly bashonly merged commit 0e722f2 into yt-dlp:master Oct 6, 2023
16 checks passed
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-enhancement Feature request for some website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[lbry] uploader, uploader_id not populated for lbry
3 participants