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

invalid request path #83

Open
seiflotfy opened this issue Nov 12, 2020 · 1 comment
Open

invalid request path #83

seiflotfy opened this issue Nov 12, 2020 · 1 comment
Labels

Comments

@seiflotfy
Copy link

Here is a small piece of code that yields back

<nil> Get "https://reddit.com/r/investing.json?raw_json=1": invalid request :path "r/investing.json?raw_json=1"

every time I run it. Weird thing is that https://reddit.com/r/investing.json?raw_json=1 does exist. Any ideas


import (
	"fmt"
	"time"

	"github.com/turnage/graw/reddit"
)

func main() {
	userAgent := "graw:doc_demo_bot:0.3.1 by /u/datlolbot"
	script, _ := reddit.NewScript(userAgent, time.Second)
	fmt.Println(script.Thread("r/investing"))
}
@turnage
Copy link
Owner

turnage commented Dec 4, 2020

I reproduced locally. It looks like reddit has changed a policy and is denying access to that path based on the client.

It still appears to work for authenticated bots.

@turnage turnage added the bug label Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants