Merge pull request #2 from Code-Club-Crew/chrisbranch

challenge1 completed
This commit is contained in:
cvirostko 2018-10-12 13:33:28 -06:00 committed by GitHub
commit e90ba8b76c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,13 @@
import requests
import json
import swapi
ships = swapi.get_all("starships")
for ship in ships.iter():
if ship.pilots:
print(ship.name)
for pilots in ship.pilots:
jason = requests.get(pilots)
data = jason.json()
print(' '+data['name'].encode('utf-8'))