Код: Выделить всё
import json
import requests
csvfile = 'BhavCopy_NSE_CM_0_0_0_20240712_F_0000.csv.zip'
try:
print(f'Downloading {csvfile} from NSE')
url = 'https://nsearchives.nseindia.com/content/cm/BhavCopy_NSE_CM_0_0_0_20240712_F_0000.csv.zip'
response = requests.get(url, stream=True)
for chunk in response.iter_content(chunk_size=8192):
print(chunk)
except Exception as e:
print(f'Could not download {csvfile} from NSE')
Подробнее здесь: https://stackoverflow.com/questions/787 ... ing-python
Мобильная версия