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

more robust regex extraction #21

Merged
merged 2 commits into from
Nov 14, 2021
Merged

Conversation

tleydxdy
Copy link
Contributor

the old regex is not always matching for some of the pages

the old regex is not always matching for some of the pages
@tleydxdy
Copy link
Contributor Author

Another problem is with the error for this case

Not a valid page, something wrong with your internet connection?

This is kinda misleading, and in the case where there isn't a live (so the page directs to the channel page) it would also trigger this error message

@sparanoid
Copy link
Owner

the old regex is not always matching for some of the pages

Thanks for the PR, can you please provide an example that only works with the new regex?

@tleydxdy
Copy link
Contributor Author

So far all the pages I tried fails, e.g. https://www.youtube.com/channel/UCLA_DiR1FfKNvjuUpBHmylQ the main issue seems to be the variable following it is not there anymore.

@tleydxdy
Copy link
Contributor Author

also it seems like there is this .videoDetails field in the json that has what we need, including .title .isLive and .isUpcoming (it seems like currently live ones only have .isLive where as upcoming ones only have .isUpcoming

@tleydxdy
Copy link
Contributor Author

oh, yeah, and all the grep needs the -a flag. In my logs it seems that sometimes things gets confused for binary.

@sparanoid sparanoid merged commit be04941 into sparanoid:master Nov 14, 2021
@tleydxdy tleydxdy deleted the patch-1 branch November 17, 2021 13:46
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.

2 participants