1cookies = {'uid': '232323', 'pass': '31321231jh12j3hj213hj213hk',
2 '__cfduid': 'kj123kj21kj31k23jkl21j321j3kl213kl21j3'}
3
4try:
5 read = requests.get(torrent_url, cookies=cookies)
6 with open(save_as, 'wb') as w:
7 for chunk in read.iter_content(chunk_size=512):
8 if chunk:
9 w.write(chunk)
10 print(filename + ' downloaded successfully!!!')
11except request.URLError as e:
12 print("Error :%s" % e)
13