mardi 2 février 2016

Passing an argument into an unknown URL in Python

make = raw_input("Enter car make: ")
model = raw_input("Enter car model: ")

htmlText = urllib.urlopen("http://ift.tt/1SBJDFj make + "/" + model).read()(easy)

Is it possible to pass these variables to a URL that is not known.

for example.

url = ("Enter URL: )
htmlText = urllib.urlopen(url + make + model).read() (Obviously wouldn't work)

Thanks.




Aucun commentaire:

Enregistrer un commentaire