fixed a huge bug

This commit is contained in:
Lynne 2018-10-26 00:33:57 +10:00
parent 19899cafee
commit 63fa34b6c7
1 changed files with 5 additions and 1 deletions

View File

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