From 8a08956ea91a66793a8e8242e4d0c9cffe71dc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20S=C3=A1=20Couto?= Date: Thu, 28 Mar 2019 19:27:31 +0100 Subject: [PATCH] added HTML tags --- .DS_Store | Bin 6148 -> 6148 bytes answers_mastodonapi.py | 24 ++++++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.DS_Store b/.DS_Store index 41085ebcc057a3dff9da8b09d685544566bb8c98..d0c132b56f3b1e6001ac4359ba199cfd7350d082 100644 GIT binary patch delta 32 ocmZoMXfc@J&&V_}VE1GL5thmPj6RzeGN!RjY;fDm&heKY0IgUGmjD0& delta 83 zcmZoMXfc@J&&WJ6U^gT4WFAI;b76)=hCGI1hH{2fh9V#x4" + str(base_url) + "" + "\n" + "\n") + text_file.write("

" + str(description) + "

" + "\n" + "\n") + status = mastodon.status_context(id=(toot_id_current)) descendants = mastodon.status_context(id=(toot_id_current))["descendants"] print(toot_id_current) @@ -42,16 +50,16 @@ with open('token.txt', 'r') as token: avatar = mastodon.status(answer["id"])['account']['avatar'] name = mastodon.status(answer["id"])['account']['display_name'] bot = mastodon.status(answer["id"])['account']['bot'] - content = mastodon.status(answer["id"])['content'] + toot = mastodon.status(answer["id"])['content'] + + text_file.write("" + "\n" + "\n") + text_file.write("

" + str(name) + "

" + "\n" + "\n") + text_file.write("

" + "Bot: " + str(bot) + "

" + "\n" + "\n") + text_file.write("

" + "\n" + str(toot) + "" + "\n" + "\n") pprint("Avatar:" + "\n" + str(avatar) + "\n" + "\n") pprint("Name:" + "\n" + str(name) + "\n" + "\n") pprint("Bot:" + "\n" + str(bot) + "\n" + "\n") - pprint("Content:" + "\n" + str(content) + "\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") + pprint("Content:" + "\n" + str(toot) + "\n" + "\n" + "\n") time.sleep(2)