Skip to content

🐛 Bug Report: tl query param broken #397

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

Open
1 task done
mattfbacon opened this issue Mar 20, 2025 · 0 comments
Open
1 task done

🐛 Bug Report: tl query param broken #397

mattfbacon opened this issue Mar 20, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mattfbacon
Copy link

Describe the bug

Some search engines add the tl query parameter indicating a translated post into the given language. This somehow changes the returned JSON which causes a parse failure in redlib.

Steps to reproduce the bug

  1. Go to https://reddit.com/r/cats/comments/1jfi4vm/after_a_long_long_day?tl=de (the exact post doesn't matter) with a redlib instance.

What's the expected behavior?

I think the tl parameter should be removed entirely, i.e., reply with a redirect to remove the parameter if it is present. I hate these machine translations. Alternatively we could investigate why the JSON is different and handle it.

Additional context / screenshot

Error message:

Failed to parse page JSON data: expected value at line 2 column 5 | /r/cats/comments/1jfi4vm/after_a_long_long_day.json?tl=de&sort=confidence&raw_json=1
  • I checked that the instance that this was reported on is running the latest git commit, or I can reproduce it locally on the latest git commit
@mattfbacon mattfbacon added the bug Something isn't working label Mar 20, 2025
@sigaloid sigaloid self-assigned this Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants