diff options
Diffstat (limited to 'crawl_posts.py')
-rw-r--r-- | crawl_posts.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/crawl_posts.py b/crawl_posts.py new file mode 100644 index 0000000..fe53a1c --- /dev/null +++ b/crawl_posts.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +import requests +import re + + +gs = requests.session() + + + +def authenticate(session): + rp = session.post('https://recolor.me/login?json', data = { + 'action':'login', + 'account_name':'testingaccount2', + 'account_password':'1234', + 'account_cookie':'1'}) + + if not rp.json()['account_id']: + print("wrong login info!") + return(1) + return(0) + +def main(): + if not authenticate(session): + print("Error logging in.") + exit(1) + print(rp.get("https://recolor.me/topic/401586/664/Shadowed_Domain").text()) + + + + +if __name__ == "__main__": + main() + + + |