Update some dumb grammar rules.

master
josiah 4 years ago
parent 4db9a4deef
commit 4a7dec3c97

@ -59,6 +59,7 @@ def add_pin_url(reddit_dict, base_url, auth_snippet):
return response
def update_pin_tag(old_tag, new_tag, base_url, auth_snippet):
rename_tags_snippet = "tags/rename"
# headers = {'Content-type': 'application/json'}
@ -73,7 +74,6 @@ def update_pin_tag(old_tag, new_tag, base_url, auth_snippet):
return response
def import_reddit_url_from_file(filename):
"""
imports a list of reddit URLs and meta data from a file.
@ -187,14 +187,13 @@ def main(*args, **kwargs):
# handle the pinboard side of things
"""
You have to sleep for 3 seconds between requests or Maciej will Get Unhappy
per https://pinboard.in/api
"""
reddit_data = import_reddit_url_from_file("data.json")
for entry in reddit_data:
post_response = add_pin_url(entry, pinboard_base_url, pinboard_auth_snippet)
add_pin_url(entry, pinboard_base_url, pinboard_auth_snippet)
time.sleep(3)

Loading…
Cancel
Save