0
Why I can't use third models like requests
Why
4 Answers
+ 9
Modules need to be installed for them to work. Requests is probably not installed hence doesn't work.
Here's a code which has some like numpy & pandas installed and does work, and do stuff like sending network request. https://code.sololearn.com/cY423YLzAI4H/
0
Thanks, guys
0
A Student Can't remember why I did that may be a challenge ? :)
you already know how to install @ sololearn
Anyways posting for your ref:
https://code.sololearn.com/cW4M6dyBsHLh/?ref=app
Or
import http.client as clnt
conn = clnt.HTTPSConnection("www.python.org")
conn.request("GET","/")
resp = conn.getresponse()
# do something with data
data = resp.read().decode()
print(data[631:683]) # sel
conn.close()
outputs-The official home of the Python Programming Language-
edit:
https://code.sololearn.com/crDhxeA7fa1O/?ref=app