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

"Replace YouTube links with Invidious" is applied to everything and not just URLs #109

Closed
TheFrenchGhosty opened this issue Jan 13, 2020 · 4 comments

Comments

@TheFrenchGhosty
Copy link
Contributor

Nitter is buggy regarding the "Replace YouTube links with Invidious" setting:

It sometime replace the word "youtube" in a tweet with the Invidious url, example:

On Nitter:

nitter

On Twitter:

twitter

(from this tweet: https://nitter.net/KSI_MakesMyDay/status/1128284789264588801)

But it's also inconsistent and do things correctly in some other tweet:

https://nitter.net/MalekBA91/status/1215913705625587713

@zedeus
Copy link
Owner

zedeus commented Jan 13, 2020

Damn, guess I generalized the regex a bit too much. Will fix tomorrow

@TheFrenchGhosty
Copy link
Contributor Author

TheFrenchGhosty commented Jan 13, 2020

I think I understand why it happens, it looks like it replaced "[youtube com]ment", I guess it's applied even when it's not an URL and that's why it's causing this problem.

I guess the same problem applies to "Replace Twitter links with Nitter"

@TheFrenchGhosty TheFrenchGhosty changed the title "Replace YouTube links with Invidious" is buggy and inconsistent "Replace YouTube links with Invidious" is applied to everything and not just URLs Jan 13, 2020
@Booteille
Copy link

If that's the case, that's probably bound to a missing backslash before a point. \. instead of ..
But I didn't look at the code where's the regex in question to check it.

@zedeus
Copy link
Owner

zedeus commented Jan 14, 2020

ytRegex = re"([A-z.]+\.)?youtu(be.com|.be)" - yep, my mistake

@zedeus zedeus closed this as completed in edb3751 Jan 19, 2020
setenforce0 pushed a commit to setenforce0/nitter that referenced this issue May 25, 2020
rustybird added a commit to rustybird/nitter that referenced this issue Nov 24, 2021
zedeus pushed a commit that referenced this issue Nov 26, 2021
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

No branches or pull requests

3 participants