|
|
@ -32,7 +32,15 @@ with open('token.txt', 'r') as token:
|
|
|
|
mastodon = Mastodon(access_token=token_line.replace('\n', ''),
|
|
|
|
mastodon = Mastodon(access_token=token_line.replace('\n', ''),
|
|
|
|
api_base_url=(str(base_url)))
|
|
|
|
api_base_url=(str(base_url)))
|
|
|
|
toot_id_current = toot_id[n]
|
|
|
|
toot_id_current = toot_id[n]
|
|
|
|
print(toot_id_current)
|
|
|
|
description = mastodon.instance()['description']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#print instance name and description
|
|
|
|
|
|
|
|
pprint("Instance:" + "\n" + str(base_url) + "\n" + "\n")
|
|
|
|
|
|
|
|
pprint("Description:" + "\n" + str(description) + "\n" + "\n")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
text_file.write("<h3 class='instance'>" + str(base_url) + "</h3>" + "\n" + "\n")
|
|
|
|
|
|
|
|
text_file.write("<h4 class='description'>" + str(description) + "</h4>" + "\n" + "\n")
|
|
|
|
|
|
|
|
|
|
|
|
status = mastodon.status_context(id=(toot_id_current))
|
|
|
|
status = mastodon.status_context(id=(toot_id_current))
|
|
|
|
descendants = mastodon.status_context(id=(toot_id_current))["descendants"]
|
|
|
|
descendants = mastodon.status_context(id=(toot_id_current))["descendants"]
|
|
|
|
print(toot_id_current)
|
|
|
|
print(toot_id_current)
|
|
|
@ -42,16 +50,16 @@ with open('token.txt', 'r') as token:
|
|
|
|
avatar = mastodon.status(answer["id"])['account']['avatar']
|
|
|
|
avatar = mastodon.status(answer["id"])['account']['avatar']
|
|
|
|
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']
|
|
|
|
toot = mastodon.status(answer["id"])['content']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
text_file.write("<img src='"+ str(avatar) + "' />" + "\n" + "\n")
|
|
|
|
|
|
|
|
text_file.write("<h3 class='name'>" + str(name) + "</h3>" + "\n" + "\n")
|
|
|
|
|
|
|
|
text_file.write("<h4 class='bot'>" + "Bot: " + str(bot) + "</h4>" + "\n" + "\n")
|
|
|
|
|
|
|
|
text_file.write("<p class='answer'>" + "\n" + str(toot) + "</hp>" + "\n" + "\n")
|
|
|
|
|
|
|
|
|
|
|
|
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(toot) + "\n" + "\n" + "\n")
|
|
|
|
|
|
|
|
|
|
|
|
text_file.write("Avatar:" + "\n" + str(avatar) + "\n" + "\n")
|
|
|
|
|
|
|
|
text_file.write("Name:" + "\n" + str(name) + "\n" + "\n")
|
|
|
|
|
|
|
|
text_file.write("Bot:" + "\n" + str(bot) + "\n" + "\n")
|
|
|
|
|
|
|
|
text_file.write("Content:" + "\n" + str(content) + "\n" + "\n" + "\n")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
time.sleep(2)
|
|
|
|
time.sleep(2)
|
|
|
|