a collection of learned incantations
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
937 B

  1. import requests
  2. #import json
  3. user = "anish+feedbin@lakhwara.com"
  4. secrets = open("/home/anish/usr/dev/secrets/feedbin", "r")
  5. password = secrets.readline()[:-1] # don't want the new line character
  6. hostStarred = "https://api.feedbin.com/v2/starred_entries.json"
  7. hostTest = "https://api.feedbin.com/v2/authentication.json"
  8. hostEntries = "https://api.feedbin.com/v2/entries.json"
  9. r = requests.get(hostStarred, auth=(user, password))
  10. starred = list(r.json())
  11. params = dict({'ids': ','.join(str(e) for e in starred[0:10])})
  12. starred_entries = requests.get(hostEntries, auth=(user, password), params=params)
  13. #print(json.dumps(starred_entries.json(), indent=4))
  14. for link in starred_entries.json():
  15. linkStr = "[" + link['title'] + "](" + link['url'] + ")"
  16. print(linkStr)
  17. if link['title'] != "You Think You Want Media Literacy… Do You?":
  18. if link['url'].find("colossal") == -1:
  19. print(link['content'])
  20. print()