IgnoredAmbience / yahoo-group-archiver

Scrapes and archives a Yahoo groups email archives, photo galleries and file contents using the non-public API
MIT License
93 stars 46 forks source link

Report which user is logged in on start #102

Open IgnoredAmbience opened 4 years ago

IgnoredAmbience commented 4 years ago

A number of recent bugs have been due to users incorrectly supplying cookies. Use the https://groups.yahoo.com/api/v1/user/emails endpoint to report currently logged in user.

ROCKETEER5215 commented 4 years ago

I've come across some browser extensions that could help simplify the process of getting cookies. Chrome Firefox By going to Yahoo Groups while signed in these extensions will let you export the cookies to a txt file that can be used with --cookie-file, but first you must add

LWP-Cookies-2.0

to the first line of your file or you will get something like this:

"Python\lib\http\cookiejar.py", line 1896, in _really_load raise LoadError(msg) http.cookiejar.LoadError: 'cookies.txt' does not look like a Set-Cookie3 (LWP) format file"

There is also an issue with def init_cookie_jar in yahoo.py it looks like the extensions export in the Netscape cookie format but they can still be loaded and work sometimes but since they are not in Perl::LWP format they can not be saved correctly so after using the cookie file once cookie_jar.save will just erase everything in your file except the first line which is #LWP-Cookies-2.0. image