Skip to content

Instantly share code, notes, and snippets.

@nshores
Last active July 18, 2018 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nshores/3af693ead02f85220d9515d64c8b5dc3 to your computer and use it in GitHub Desktop.
Save nshores/3af693ead02f85220d9515d64c8b5dc3 to your computer and use it in GitHub Desktop.
pypotato.py
#Pyhton to couchpotato API
import requests
from pprint import pprint
import json
#Get the data
data = requests.get("http://slimleech:5001/api/556033fe3c9b4a1caf6fcbed6fd2f66a/media.list")
binary = data.content
output = json.loads(binary)
#create a list of movies
movies = output['movies']
#print all the movie titles
for t in movies:
print(t['title'])
#print(len(output))
#pprint(output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment