This forum is now read-only. Please use our new forums at discuss.codecademy.com.

How to use APIs with Python Forum

View Course

338 points
324a70164db4bb9a3adf465af8a131ac?s=140&d=retro
Submitted by
Yeshwanth Kumar
over 3 years ago

6/20 Cannot under the text attribute usage.

How to make this work? I dont understand,
import requests

     # Make a GET request here and assign the result to kittens:
     kittens = requests.get("https://placekitten.com")


      text ???
      print  kittens.text[559:1000]   

1 vote

permalink

this is the complete code

import requests

kittens = requests.get("http://placekitten.com/")
print kittens.text[559:1000]

389 points
53888fa280ff3325790030a1_138435731
Submitted by
hatcat
over 3 years ago