Terence Eden 2023-11-12 09:16:33 +00:00
rodzic 576fd84439
commit 2fd688da74
5 zmienionych plików z 17 dodań i 3 usunięć

0
.domains 100644
Wyświetl plik

Plik binarny nie jest wyświetlany.

14
media.py 100755
Wyświetl plik

@ -0,0 +1,14 @@
#!/usr/bin/env python
from mastodon import Mastodon
import json
import requests
import config
# Set up access
mastodon = Mastodon( api_base_url=config.instance, access_token=config.write_access_token )
message = "media test"
media = mastodon.media_post("https://placekitten.com/200", description="Some alt text.")
mastodon.status_post(status = message)

Wyświetl plik

@ -35,7 +35,7 @@ while (year_counter >= year_joined ) :
# Call the API
statuses = mastodon.account_statuses(id = my_id, max_id=max_id, min_id=min_id, limit="40", exclude_reblogs=True)
# Fetch further statuses if there are any
all_statuses = mastodon.fetch_remaining(statuses)
all_statuses = statuses #mastodon.fetch_remaining(statuses)
# Print the date and URl
for status in all_statuses :
print( str(status["created_at"])[:16] + " " + BeautifulSoup(status["content"], features="html.parser").get_text() + " - " + status["uri"] )
print( str(status["created_at"])[:16] + " " + BeautifulSoup(status["content"], features="html.parser").get_text() + " - " + status["uri"] + "\n")

Wyświetl plik

@ -19,7 +19,7 @@ checkin = untappd_data["response"]["checkins"]["items"][0]
untappd_id = checkin["checkin_id"]
# Was this ID the last one we saw?
check_file = open("untappd_last", "r+")
check_file = open("untappd_last", "w+")
last_id = check_file.read()
if (last_id != str(untappd_id) ) :