Created
March 20, 2018 18:31
-
-
Save shravankumar147/3f7f8482e06fd15a5b7922374f076075 to your computer and use it in GitHub Desktop.
File download using different methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
cmd = "wget -c --progress=bar https://docs.microsoft.com/en-us/azure/cognitive-services/face/images/landmarks.1.jpg" | |
os.system(cmd) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from parallel_sync import wget | |
url1 = 'https://www.songsmp3.co/assets/images/3/96997-Collaboration%20(2017)%20-%20DJ%20Harsh%20Bhutani.jpg' | |
url2 = "https://github.com/kouroshparsa/parallel_sync/archive/master.zip" | |
url3 = ["http://songspkdload.com/Bollywood/Tubelight-Songspksongspke.com/Naach%20Meri%20Jaan-Songspksongspkt.com.mp3"] | |
wget.download("/tmp", urls=url3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tqdm import tqdm | |
import requests | |
url = raw_input("Please provide link to download: ") | |
response = requests.get(url, stream=True) | |
fname = raw_input("file name to be saveas: ") | |
with open(fname, "wb") as handle: | |
for data in tqdm(response.iter_content()): | |
handle.write(data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wget | |
url = ['http://www.futurecrew.com/skaven/song_files/mp3/razorback.mp3', https://www.songsmp3.co/assets/images/3/96997-Collaboration%20(2017)%20-%20DJ%20Harsh%20Bhutani.jpg] | |
filename = wget.download(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment