-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathquickstart.py
52 lines (38 loc) · 1.59 KB
/
quickstart.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from metathreads import MetaThreads
from metathreads import config
def main():
#config.TIMEOUT = 5
#config.PROXY = {'http': 'proxy_here', 'https': 'proxy_here'}
threads = MetaThreads()
username = None
password = None
if not all([username, password]):
username = str(input("Enter Your Username or Email :"))
password = str(input("Enter Your Password :"))
threads.login(username, password)
# check logged in user
print(f"Logged In User {threads.me}")
# get thread details
print(threads.get_thread(3138977881796614961))
#threads.get_thread("thread_id or thread_url")
"""
Here is an example
thread_url > https://www.threads.net/t/CuP48CiS5sx
thread_id > 3138977881796614961
It works with both id and url.
thread.get_thread(3138977881796614961)
thread.get_thread(https://www.threads.net/t/CuP48CiS5sx)
YOU CAN ALSO THROW IN MULTIPLE INPUTS AT A SINGLE TIME (WORKS WITH EVERY METHOD i.e. liking, posting, deleting , extracting data - all functions), IT SUPPORTS ASYNC/AWAIT (CONCURRENT REQUESTS.)
Just make sure you don't hit the API rate limits.
So getting multiple threads is as easy as passing a list.
threads.get_thread([3138977881796614961,3140525365550562013])
"""
# # like a thread
# threads.like_thread(3138977881796614961)
# # repost a thread
# threads.repost_thread([3138977881796614961, 3140525365550562013])
# # post a thread
# threads.post_thread(thread_caption="My First Thread..")
# CHECK DOCUMENTATION FOR FULL FUNCTIONALITY.
if __name__ == "__main__":
main()