Skip to content

Instantly share code, notes, and snippets.

@yefim
Last active August 29, 2018 20:24
Show Gist options
  • Select an option

  • Save yefim/b5ba5cd4534aead3a914 to your computer and use it in GitHub Desktop.

Select an option

Save yefim/b5ba5cd4534aead3a914 to your computer and use it in GitHub Desktop.
Hit venmo public feed API to see what the most liked venmo was
import requests
def hit_api():
page = "https://venmo.com/api/v5/public"
venmos = []
counter = 0
while (counter < 50):
r = requests.get(page)
page = r.json["paging"]["next"]
venmos += r.json["data"]
counter += 1
return venmos
if __name__ == "__main__":
venmos = hit_api()
print [v["likes"]["count"] for v in venmos if v["likes"]["count"] > 0]
print max(venmos, key=lambda v: v["likes"]["count"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment