fixed a huge bug

This commit is contained in:
Lynne 2018-10-26 00:33:57 +10:00
parent 19899cafee
commit 63fa34b6c7

View file

@ -114,13 +114,17 @@ for f in following:
print("Harvesting toots for user @{}, starting from {}".format(f.acct, last_toot))
#find the user's activitypub outbox
print("WebFingering...")
#print("WebFingering...")
instance = re.search(r"^.*@(.+)", f.acct)
if instance == None:
instance = re.search(r"https?:\/\/(.*)", cfg['site']).group(1)
else:
instance = instance.group(1)
if instance == "bofa.lol":
print("rest in piece bofa, skipping")
continue
# print("{} is on {}".format(f.acct, instance))
try:
r = requests.get("https://{}/.well-known/host-meta".format(instance))