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

Fix json.decoder.JSONDecodeError in extract.py #11

Merged
merged 1 commit into from
Nov 5, 2020
Merged

Fix json.decoder.JSONDecodeError in extract.py #11

merged 1 commit into from
Nov 5, 2020

Conversation

Cafeepy
Copy link
Contributor

@Cafeepy Cafeepy commented Aug 20, 2020

A while ago, I started getting json.decoder.JSONDecodeError, about some sort of unterminated string in pytubeX's internal JSON loading. As I'm no expert in JSON or anything web, I just made this small change that made sure get_ytplayer_config checks all the patterns in config_patterns for matches before raising an error. This seemed to fix the problem.

Edit: This may fix issue #12, not completely sure yet

Prevent json.decoder.JSONDecodeError from being raised when a match is not loaded correctly, quietly retry until all regex match possibilities are exhausted.
@H4KKR H4KKR merged commit 9a2b262 into H4KKR:master Nov 5, 2020
@Cafeepy Cafeepy deleted the patch-1 branch April 28, 2021 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants