|
|
@ -3,12 +3,26 @@ from pprint import pprint
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|
import datetime
|
|
|
|
import datetime
|
|
|
|
|
|
|
|
|
|
|
|
with open('token.txt','r') as token:
|
|
|
|
#toots id and instances position refer to same post
|
|
|
|
print(token.read())
|
|
|
|
#FOR EXAMPLE
|
|
|
|
mastodon = Mastodon(access_token=token.read(),api_base_url="https://todon.nl")
|
|
|
|
#toot_id[0] goes with instances[0]
|
|
|
|
|
|
|
|
toot_id = [101767654564328802, 101767613341391125]
|
|
|
|
|
|
|
|
instances = ["https://todon.nl/", "https://meow.social/"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#toots token order is also the same
|
|
|
|
|
|
|
|
#FOR EXAMPLE
|
|
|
|
|
|
|
|
#toot_id[0] goes with instances[0] and now goes with line nr1 from txt file
|
|
|
|
|
|
|
|
with open('token.txt', 'r') as token:
|
|
|
|
|
|
|
|
for token_line in token.readlines():
|
|
|
|
|
|
|
|
print(token_line)
|
|
|
|
|
|
|
|
for base_url in instances:
|
|
|
|
|
|
|
|
print(str(base_url))
|
|
|
|
|
|
|
|
mastodon = Mastodon(access_token=token.read(),api_base_url=(str(base_url)))
|
|
|
|
|
|
|
|
|
|
|
|
descendants = mastodon.status_context(id=101767654564328802)["descendants"]
|
|
|
|
for id in toot_id:
|
|
|
|
|
|
|
|
descendants = mastodon.status_context(id=(toot_id))["descendants"]
|
|
|
|
|
|
|
|
print(toot_id)
|
|
|
|
|
|
|
|
time.sleep(1)
|
|
|
|
|
|
|
|
|
|
|
|
for answer in descendants:
|
|
|
|
for answer in descendants:
|
|
|
|
pprint(answer["id"])
|
|
|
|
pprint(answer["id"])
|
|
|
@ -17,8 +31,10 @@ for answer in descendants:
|
|
|
|
name = mastodon.status(answer["id"])['account']['display_name']
|
|
|
|
name = mastodon.status(answer["id"])['account']['display_name']
|
|
|
|
bot = mastodon.status(answer["id"])['account']['bot']
|
|
|
|
bot = mastodon.status(answer["id"])['account']['bot']
|
|
|
|
content = mastodon.status(answer["id"])['content']
|
|
|
|
content = mastodon.status(answer["id"])['content']
|
|
|
|
|
|
|
|
|
|
|
|
pprint("Avatar:" + "\n" + str(avatar) + "\n" + "\n")
|
|
|
|
pprint("Avatar:" + "\n" + str(avatar) + "\n" + "\n")
|
|
|
|
pprint("Name:" + "\n" + str(name) + "\n" + "\n")
|
|
|
|
pprint("Name:" + "\n" + str(name) + "\n" + "\n")
|
|
|
|
pprint("Bot:" + "\n" + str(bot) + "\n" + "\n")
|
|
|
|
pprint("Bot:" + "\n" + str(bot) + "\n" + "\n")
|
|
|
|
pprint("Content:" + "\n" + str(content) + "\n" + "\n")
|
|
|
|
pprint("Content:" + "\n" + str(content) + "\n" + "\n")
|
|
|
|
time.sleep(3)
|
|
|
|
|
|
|
|
|
|
|
|
time.sleep(2)
|
|
|
|