from selenium import webdriver as web
from pyquery import PyQuery as pq
import requests
import time
zhi=web.Chrome();
zhi.get(
'http://image.so.com/i?src=360pic_strong&z=1&i=0&cmg=7a77ac2d417c0a69026da720de8152d5&q=%E8%B5%B5%E4%B8%BD%E9%A2%96%E5%9B%BE%E7%89%87')
for i in range(0, 500000):
thml = zhi.page_source
doc = pq(thml)
js="var q=document.documentElement.scrollTop={b}".format(b=1000000)
zhi.execute_script(js)
s = doc('.main_img').eq(i).attr('src')
r = requests.get(s,stream=True)
d='./{b}.jpg'.format(b=i)
with open(d, 'wb') as fd:
for chunk in r.iter_content():
fd.write(chunk)
# meinv = pq(thmld)
# time.sleep(1);
# d=meinv('.lb_mainimg')
from pyquery import PyQuery as pq
import requests
import time
zhi=web.Chrome();
zhi.get(
'http://image.so.com/i?src=360pic_strong&z=1&i=0&cmg=7a77ac2d417c0a69026da720de8152d5&q=%E8%B5%B5%E4%B8%BD%E9%A2%96%E5%9B%BE%E7%89%87')
for i in range(0, 500000):
thml = zhi.page_source
doc = pq(thml)
js="var q=document.documentElement.scrollTop={b}".format(b=1000000)
zhi.execute_script(js)
s = doc('.main_img').eq(i).attr('src')
r = requests.get(s,stream=True)
d='./{b}.jpg'.format(b=i)
with open(d, 'wb') as fd:
for chunk in r.iter_content():
fd.write(chunk)
# meinv = pq(thmld)
# time.sleep(1);
# d=meinv('.lb_mainimg')