Home urlopen error while updating url with variable
Reply: 0

urlopen error while updating url with variable

user460
1#
user460 Published in May 24, 2018, 4:00 pm

I am trying to update the url with keywords from another file and read the contents of the url but it is throwing error

f = open('myfile.txt')
for line in iter(f):
    id = line.strip('\n')
    url_sell = 'https://example.com/getmarketsummary?market='+str(id)
    df = pd.read_json(url_sell, orient='columns')

Below is the error

urllib2.URLError: <urlopen error no host given>
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.33658 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO