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

Error with Reddit feeds #7

Closed
guyfedwards opened this issue Dec 28, 2022 · 3 comments · Fixed by #28
Closed

Error with Reddit feeds #7

guyfedwards opened this issue Dec 28, 2022 · 3 comments · Fixed by #28
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@guyfedwards
Copy link
Owner

    - url: https://www.reddit.com/r/golang/.rss
@guyfedwards guyfedwards added the bug Something isn't working label Dec 28, 2022
@guyfedwards
Copy link
Owner Author

This is due to reddits rate-limiting. Looking at ways to try and bypass it

@guyfedwards guyfedwards added the help wanted Extra attention is needed label Jan 2, 2023
@Nemoden
Copy link
Contributor

Nemoden commented Jan 19, 2023

This is due to reddits rate-limiting. Looking at ways to try and bypass it

I don't think it's because of rate-limiting, because once feed is ingested, we save it to local cache. We literally request it once.

This one is to do with http2 somehow.

I'm on the nom branch that I've created to tackle the #13 so I have --feed flag (which is quite handy to test too)

go run cmd/nom/main.go --feed="https://www.reddit.com/r/golang/.rss" -v
commands List: commands List: rss.Fetch: http error: 403 Forbidden

And I'm getting the "blocked" page.

If I disable http2, everything is fine:

GODEBUG=http2client=0 go run cmd/nom/main.go --feed="https://www.reddit.com/r/golang/.rss" -v

There IS rate-limiting, yes, but shouldn't get in a way at least on first fetch of the reddit feed.

So, in order for reddit feeds to work, http2 has to be disabled. The way to disable it is descried here pretty well grafana/k6#936

guyfedwards pushed a commit that referenced this issue Jan 19, 2023
Setting the env var explicitly is the cleanest way to have all child
packages respect the client and keep it in the code rather than a build
flag.

closes #7
guyfedwards added a commit that referenced this issue Jan 19, 2023
Setting the env var explicitly is the cleanest way to have all child
packages respect the client and keep it in the code rather than a build
flag.

closes ##7
@guyfedwards
Copy link
Owner Author

Great find, was weird we were getting a rate limit response for single requests so glad we now know.

I fixed and tested this quickly and created a branch here, is working for me but would be great if you could check and confirm.

guyfedwards added a commit that referenced this issue Jan 21, 2023
Setting the env var explicitly is the cleanest way to have all child
packages respect the client and keep it in the code rather than a build
flag.

closes ##7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants