I have the following link. how can save it to excel file in python
link="http://www.tsetmc.com/tsev2/excel/MarketWatchPlus.aspx?deven=0"
I tried to download:
import requests
dls = "http://www.tsetmc.com/tsev2/excel/MarketWatchPlus.aspx?deven=0"
resp = requests.get(dls)
output = open('test.xls', 'wb')
output.write(resp.content)
output.close()
but the saving test.xls has the following error:
Error! C:\Users\Relief International\test.xls is not UTF-8 encoded
Saving disabled.
See Console for more details.
how do I make python download the mentioned link as an excel file?