diff --git a/Handling-site-logins.md b/Handling-site-logins.md new file mode 100644 index 0000000..d3a691c --- /dev/null +++ b/Handling-site-logins.md @@ -0,0 +1,16 @@ +When writing a ripper you sometimes need to login in order to access certain content, below are some tips for how to do so + +### Don't use usernames and passwords if you can avoid it + +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 + + +### Don't hardcode login + +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 \ No newline at end of file