luckylittle / blinkist-m4a-downloader

Grabs all of the audio files from all of the Blinkist books
MIT License
124 stars 22 forks source link

Forbidden / exit status 1 #17

Open bckncook opened 3 years ago

bckncook commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

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

Piwero commented 2 years ago

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 commented 1 year ago

same here on linux :(

2600box commented 1 year ago

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

Cal-M17 commented 1 year ago

@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