How to download image using Python request module?

4/14/2019 3:54:27 AM

Programmer Raja

7 Answers

New Answer


https://code.sololearn.com/cLF2DLBK2a8D/?ref=app Try this in system where you have requests module installed


Well bro you can't do it from sololearn but u can do it from the PC the code is same like YUGABDH PASHTE had given u


Check that tutorial from thenewboston: https://youtu.be/GQiLweAoxgQ


You can refer to a video that corey made about the requests module. You can find it on youtube, his channel name is corey schafer(something like that?).


Oh lol I just found that I have written tey instead of try




#modules From sys import * İmport requests #varaibles target = requests.get(argv[1]) command = argv[2] #command controls if command == "source": print (target.text) elif command == "file": name = input("file name:") file = open(name, "w") file.write(target.text) file.close() else: exit()