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/weverse] Fix username check for invalid accounts #8458

Merged
merged 2 commits into from Oct 28, 2023

Conversation

seproDev
Copy link
Collaborator

@seproDev seproDev commented Oct 28, 2023

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

The username check currently fails if the username is invalid due to the API now returning a status code of 400 or 404 instead of 200 for invalid and unregistered accounts respectively.

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 c9cb638

Summary

🛠️📥🚦

Fix login issue for some users in weverse.py by handling different API status codes. Add expected_status parameter to _download_json function.

_perform_login changed
API status codes vary
Autumn of errors

Walkthrough

  • Allow different HTTP status codes for username check in _perform_login (link)
  • Add expected_status parameter to _download_json call in _perform_login (link)
  • Fix login issue for some users with valid usernames (link)

yt_dlp/extractor/weverse.py Outdated Show resolved Hide resolved
@bashonly bashonly added site-bug Issue with a specific website pending-fixes PR has had changes requested labels Oct 28, 2023
@bashonly bashonly removed the pending-fixes PR has had changes requested label Oct 28, 2023
@bashonly bashonly self-assigned this Oct 28, 2023
@bashonly bashonly merged commit 4a601c9 into yt-dlp:master Oct 28, 2023
16 checks passed
@seproDev seproDev deleted the weverse-username branch October 28, 2023 16:59
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.

None yet

2 participants