Skip to content

Commit

Permalink
add delay to webmention sending
Browse files Browse the repository at this point in the history
Since I got the 429 from webmentions.io before.
  • Loading branch information
sarajaksa committed Dec 25, 2023
1 parent acbaf1b commit 5654206
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webmentions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import requests
import bs4
import json
import time

def send_webmentions(article_url):
page = requests.get(article_url)
Expand All @@ -9,6 +10,7 @@ def send_webmentions(article_url):
all_links_with_webmentions = []
for link in links_to_check:
print(link)
time.sleep(2)
try:
data = requests.get(link)
except:
Expand Down

0 comments on commit 5654206

Please sign in to comment.