利用Python在堆糖爬取图片的Demo,从图片详细查看页进行操作
图片详细查看页:
完整code:
import requests
import os
import traceback
from selenium import webdriver
from selenium.webdriver.common.by import By
import time
def download(url, filename):
if os.path.exists(filename):
print('file exists!')
return
try:
r = requests.get(url, stream=True