-
Notifications
You must be signed in to change notification settings - Fork 630
Handling site logins
When writing a ripper you sometimes need to login in order to access certain content, below are some tips for how to do so
Sites often try to block automatic logins and sometimes changes their login pages, this means that rippers that login using a username and password will often break. It is much better to use cookies to login. To get these cookies you can login using a web browser and then view the sites cookies.
When doing this remember to check the remember me
box on the sites login page so that these cookies won't expire
It's best if users can use their own account when ripper so try to avoid hardcoding any usernames/passwords or cookies. An easy way to avoid this is to read these values from ripmes config file using Utils.getConfigString("$SITENAME.cookies", "SharedAccount cookies");. This will return either the data the user has entered or the shared account cookies if the user hasn't entered any data
To turn the cookie string into a usable hashmap use RipUtils.getCookiesFromString(CookieString)
Examples of this can be found in the FuraffinityRipper