1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 08:38:59 +00:00

basic posting support

This commit is contained in:
Lynne Megido 2019-09-07 19:58:42 +10:00
parent e5064d14ce
commit b5e1d880e7

View file

@ -82,10 +82,17 @@ def scrape_posts(account):
db.commit() db.commit()
c.close() c.close()
print("Finished {}".format(handle))
def make_post(bot): def make_post(bot):
pass print("Generating post for {}".format(bot[0]))
client = Mastodon(
client_id = bot[1],
client_secret = bot[2],
access_token = bot[3],
api_base_url = "https://{}".format(bot[0].split("@")[2])
)
client.status_post("fedibooks posting test")
print("Establishing DB connection") print("Establishing DB connection")
db = MySQLdb.connect( db = MySQLdb.connect(