Allow a page to be excluded from feeds, + some minor tweaks

This commit is contained in:
2022-08-13 16:20:26 +02:00
parent b5fe32a2a0
commit 37e6da8f4f
5 changed files with 7 additions and 6 deletions

View File

@ -51,7 +51,6 @@ def MastodonGetAllLinkPosts(Session, Domain=None):
Posts += [Post]
return Posts
# TODO: Set a limit/cooldown on how many new posts at a time can be posted, or ignore posts older than date X.. otherwise if someone starts using this after having written 100 blog posts, bad things will happen
def MastodonShare(InstanceURL, Token, TypeFilter, CategoryFilter, HoursLimit, Pages, SiteDomain, SiteLang, Locale):
SaidPosting = False
Session = MastodonGetSession(InstanceURL, Token)
@ -81,7 +80,7 @@ def MastodonShare(InstanceURL, Token, TypeFilter, CategoryFilter, HoursLimit, Pa
if not SaidPosting:
print("[I] Posting to Mastodon")
SaidPosting = True
time.sleep(5)
time.sleep(5) # Prevent flooding
Post = MastodonGetLinkFromPost(
Post=MastodonDoPost(
Session,