Python Forum
Can not make this image downloader work
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can not make this image downloader work
#6
WoW, works great. I did not have to install tqdm, so it must have been installed.
I downloaded the Doc for os.(os.path.basename) Return the base name of pathname path. This is the second element of the pair returned by passing path to the function split(). what does that mean?
*****************************************
img = requests.get(link.get('href'))
this is a get request for all links with 'href'
****************************************************
with open(img_name, 'wb') as f_out:
I think this open a file that you can put Img_name in.
**************************************************************
f_out.write(img.content)
This writ the img to the file.

If I am wrong on any of the line let me know. I see how you name the file to be download. that was one of the big problem I had, I was think each file needed a new name.

Thank you so much, I do a lot of metal detecting and I been making small program to help me get stuff off the net.

snippsat, I just downloaded your tut on scraping. Will read it tonight.
Thanks
Reply


Messages In This Thread
RE: Can not make this image downloader work - by Blue Dog - Jun-23-2020, 07:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  m3u8 using build-in browser downloader? kucingkembar 3 420 Mar-29-2024, 01:47 AM
Last Post: kucingkembar
  RFC downloader not working sidsr003 2 2,790 Dec-19-2018, 09:31 PM
Last Post: snippsat
  How to make my code work with asyncio? DevinGP 0 2,742 Jan-09-2018, 06:21 PM
Last Post: DevinGP
  Multiple File Downloader Josh_Python890 1 2,521 Sep-16-2017, 11:19 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020