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

Forbidden / exit status 1 #17

Open
bckncook opened this issue Dec 15, 2020 · 7 comments
Open

Forbidden / exit status 1 #17

bckncook opened this issue Dec 15, 2020 · 7 comments

Comments

@bckncook
Copy link

Any ideas why this is returning Forbidden at the end? Thanks!!!


PS C:\Users\XXXX\Go\src\github.com\luckylittle\blinkist-m4a-downloader\blinkist> go mod init github.com/luckylittle/blinkist-m4a-downloader

go: creating new go.mod: module github.com/luckylittle/blinkist-m4a-downloader

PS C:\Users\XXXX\Go\src\github.com\luckylittle\blinkist-m4a-downloader\blinkist> go run main.go

go: finding module for package github.com/gocolly/colly
go: found github.com/gocolly/colly in github.com/gocolly/colly v1.2.0
go: finding module for package github.com/kennygrant/sanitize
go: finding module for package github.com/temoto/robotstxt
go: finding module for package github.com/antchfx/htmlquery
go: finding module for package github.com/gobwas/glob
go: finding module for package github.com/antchfx/xmlquery
go: finding module for package golang.org/x/net/html
go: finding module for package github.com/saintfish/chardet
go: finding module for package github.com/PuerkitoBio/goquery
go: finding module for package google.golang.org/appengine/urlfetch
go: finding module for package golang.org/x/net/html/charset
go: found github.com/PuerkitoBio/goquery in github.com/PuerkitoBio/goquery v1.6.0
go: found github.com/antchfx/htmlquery in github.com/antchfx/htmlquery v1.2.3
go: found github.com/antchfx/xmlquery in github.com/antchfx/xmlquery v1.3.3
go: found github.com/gobwas/glob in github.com/gobwas/glob v0.2.3
go: found github.com/kennygrant/sanitize in github.com/kennygrant/sanitize v1.2.4
go: found github.com/saintfish/chardet in github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca
go: found github.com/temoto/robotstxt in github.com/temoto/robotstxt v1.1.1
go: found golang.org/x/net/html in golang.org/x/net v0.0.0-20201209123823-ac852fbbde11
go: found golang.org/x/net/html/charset in golang.org/x/net v0.0.0-20201209123823-ac852fbbde11
go: found google.golang.org/appengine/urlfetch in google.golang.org/appengine v1.6.7
2020/12/15 16:08:08 Forbidden
exit status 1

PS C:\Users\XXXX\Go\src\github.com\luckylittle\blinkist-m4a-downloader\blinkist>

@bckncook
Copy link
Author

Interesting. Decided to start from scratch on a different computer and got the same message at a different point, a bit farther along. Note: I reset everything and ran it again and it stopped at the same point. If I run again without resetting anything, it goes straight to forbidden message.


PS C:\Users\XXXX\go\src\github.com\luckylittle\blinkist-m4a-downloader\blinkist> go mod init github.com/luckylittle/blinkist-m4a-downloader

go: creating new go.mod: module github.com/luckylittle/blinkist-m4a-downloader

PS C:\Users\XXXX\go\src\github.com\luckylittle\blinkist-m4a-downloader\blinkist> go run main.go

go: finding module for package github.com/gocolly/colly
go: downloading github.com/gocolly/colly v1.2.0
go: found github.com/gocolly/colly in github.com/gocolly/colly v1.2.0
go: finding module for package golang.org/x/net/html/charset
go: finding module for package github.com/PuerkitoBio/goquery
go: finding module for package google.golang.org/appengine/urlfetch
go: finding module for package github.com/antchfx/htmlquery
go: finding module for package golang.org/x/net/html
go: finding module for package github.com/antchfx/xmlquery
go: finding module for package github.com/temoto/robotstxt
go: downloading golang.org/x/net v0.0.0-20201209123823-ac852fbbde11
go: finding module for package github.com/gobwas/glob
go: finding module for package github.com/saintfish/chardet
go: downloading github.com/PuerkitoBio/goquery v1.6.0
go: downloading github.com/antchfx/htmlquery v1.2.3
go: downloading google.golang.org/appengine v1.6.7
go: downloading github.com/antchfx/xmlquery v1.3.3
go: downloading github.com/temoto/robotstxt v1.1.1
go: downloading github.com/gobwas/glob v0.2.3
go: downloading github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca
go: finding module for package github.com/kennygrant/sanitize
go: downloading github.com/kennygrant/sanitize v1.2.4
go: found github.com/PuerkitoBio/goquery in github.com/PuerkitoBio/goquery v1.6.0
go: found github.com/antchfx/htmlquery in github.com/antchfx/htmlquery v1.2.3
go: found github.com/antchfx/xmlquery in github.com/antchfx/xmlquery v1.3.3
go: found github.com/gobwas/glob in github.com/gobwas/glob v0.2.3
go: found github.com/kennygrant/sanitize in github.com/kennygrant/sanitize v1.2.4
go: found github.com/saintfish/chardet in github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca
go: found github.com/temoto/robotstxt in github.com/temoto/robotstxt v1.1.1
go: found golang.org/x/net/html in golang.org/x/net v0.0.0-20201209123823-ac852fbbde11
go: found golang.org/x/net/html/charset in golang.org/x/net v0.0.0-20201209123823-ac852fbbde11
go: found google.golang.org/appengine/urlfetch in google.golang.org/appengine v1.6.7
go: downloading golang.org/x/text v0.3.3
go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: downloading github.com/golang/protobuf v1.3.1
go: downloading github.com/antchfx/xpath v1.1.10
go: downloading github.com/andybalholm/cascadia v1.1.0
2020/12/15 17:03:20 Forbidden
exit status 1

PS C:\Users\XXXX\go\src\github.com\luckylittle\blinkist-m4a-downloader\blinkist>

@tim-peters
Copy link

The reason for this status code is an unsuccesfull login. It appears that the login process becam much more complex overtime (actually it's hard to believe it was ever simple enough for that simple POST login code to work).

If anyone looking into fixing this: A first step would be to update the POST names of username and password as well as building an implementation for the authenticity_token (a dynamix token that needs to be read out of the form and sent with the request).

@nickveliki
Copy link

I'm guessing the anti-csrf token they use is going to make this quite challenging

@Piwero
Copy link

Piwero commented Aug 1, 2022

Any update on this bug? is it working correctly for you? I just get this output

go run main.go
Forbidden
exit status 1

@Domi-cc
Copy link

Domi-cc commented Dec 29, 2022

same here on linux :(

@2600box
Copy link

2600box commented Jan 14, 2023

The first run grabbed 1771 titles, but exited with the error. Subsequent runs don't grab anything. Changing password did not help.

@Cal-M17
Copy link

Cal-M17 commented Aug 1, 2023

@luckylittle Any update on this bug? I just get this output:

go run main.go Forbidden exit status 1

On windows.

Trying to download based on the book urls already present pulls 0 responses

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

7 participants