diff options
author | luxagraf <sng@luxagraf.net> | 2015-08-21 14:05:21 +0000 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2015-08-21 14:05:21 +0000 |
commit | b98a093e737cc367bb8fbd714038e17882fe1ec5 (patch) | |
tree | 2bba4e6f40ff18aea9dffde2660b6ab36ed4acc6 /app/links/retriever.py | |
parent | 4556c9b6a6e0698491541060670a36404c764931 (diff) |
fixed link retriever
Diffstat (limited to 'app/links/retriever.py')
-rw-r--r-- | app/links/retriever.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/links/retriever.py b/app/links/retriever.py index f807820..9aec34d 100644 --- a/app/links/retriever.py +++ b/app/links/retriever.py @@ -13,10 +13,9 @@ import requests import json def sync_pinboard_links(): - PB_URL = "https://api.pinboard.in/v1/posts/all?results=150&format=json" + PB_URL = "https://api.pinboard.in/v1/posts/all?results=70&format=json" r = requests.get(PB_URL, auth=((settings.PIN_USER, settings.PIN_PASS))) links = json.loads(r.text) - print(links) for link in links: try: #check to see if link exists @@ -32,12 +31,11 @@ def sync_pinboard_links(): pub_date=datetime.datetime.strptime(link['time'], "%Y-%m-%dT%H:%M:%SZ"), status=0 ) - print(l.title) if created: print(l.title) - for t in link['tags']: + for t in link['tags'].split(" "): l.tags.add(t) - + email_link(l) """ def sync_pinboard_links_old(): |