=?gbk?B?ytjW6rT9zcM=?= wrote: > it can run ,but there is still a problem ,nothing in my file. > please run the code in xp+python32 > import urllib.request, urllib.parse, urllib.error > exchange=['NASDAQ','NYSE','AMEX'] > for down in exchange: > url='http://www.nasdaq.com/screening/companies-by- industry.aspx?exchange='+down+'&render=download' > file=urllib.request.urlopen(url).read() > print (file) > what you get is: > >>>> > b'' > b'' > b'' >>>> > > how to fix it?
I get the expected output, but I'm on Linux. Are you using the latest bugfix release (Python 3.2.2)? Can you download the data with your browser? -- http://mail.python.org/mailman/listinfo/python-list