Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from urllib3 import disable_warnings
- from urllib3.exceptions import InsecureRequestWarning
- import requests
- disable_warnings(InsecureRequestWarning)
- url = input('Please input full URL:\n')
- size_of_parts = input('Please input size of file parts in MB:\n')
- with open(url.split('/')[-1], 'wb') as file:
- print('Start downloading...')
- response = requests.get(url, stream=True, verify=False)
- for chunk in response.iter_content(int(size_of_parts)*1048576):
- file.write(chunk)
- print('Done')
Add Comment
Please, Sign In to add comment