Пример #1
0
def down_page_img(page):
    html_url = page
    html = Download.download_html(html_url)
    html = Htmls(html, 'html.parser')
    imgs = html.get_img_tag_values()

    for img in imgs:
        file_names = str(img).split('/')
        current_path = down_path + file_names[-2] + '/' + file_names[-1]

        if 'http' in img and 'jpg' in img:
            print("download pic: ", file_names[-1])
            Download.download(img, current_path)