summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Weiland <techcrazybsw@gmail.com>2020-11-27 10:10:46 -0600
committerBrett Weiland <techcrazybsw@gmail.com>2020-11-27 10:10:46 -0600
commit3cf8fced372d98c6914d7971ff6ed5e628c78b5c (patch)
tree2dd56cfb9adf8c6f35c06ae4b13341bb2463787a
new file: crawl_posts.pyHEADmaster
-rw-r--r--crawl_posts.py35
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()
+
+
+