How to save web photos in batch

The method is very simple

I saw an excellent blog post today, all of which are ppt photos, I want to reprint one in my official account, but the WeChat official account does not support this way of directly pasting photos, and you must download all the pictures. It’s only possible to upload it. I found out that 90+ photos of my damn have to be copied one by one. Let's stop doing hard work. There must be a way. Proceed as follows:

1 First use the browser to open the webpage you need to download

 当前使用的是谷歌浏览器

2 Right click and save as

Right click and save as

After 3, the pictures of the entire page have been downloaded locally Insert picture description here

4 There will be a folder with the same name under the path selected when saving, and there will be related pictures in it.

Insert picture description here
Insert picture description here

5 Compare to see if it is consistent with the web page

Insert picture description here
The pictures are the same, but the pictures are not formatted. Do you have to modify them one by one? Too much, use python to get it

# coding=utf-8
import os
if __name__ == '__main__':
    for dir,folder,file in os.walk("."):
        print (dir)
        print (folder)
        #print (file)        
        for i in file:
            new = i + ".jpg"
            os.rename(i, new)

After the change is as follows, all the pictures can be previewed, and you can also modify to the format you need according to your needs.
Insert picture description here

to sum up

So generally a lot of repetitive work can be achieved with tools. Don't be silly and manual operation bit by bit. I recommend using python, which is very good, relatively simple and quick to get started.

Insert picture description here
Follow the WeChat public account [embedded C tribe], get more essential articles, massive programming materials, let us make progress and grow together.

Guess you like

Origin blog.csdn.net/weixin_35933684/article/details/103401929