#!/usr/bin/env python #coding=utf-8 import os import urllib.request #url=input("url ") #up=urllib.urlopen(url) s='''34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/1385248/197775142/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d301.paixin.com/thumbs/1175884/86545356/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d302.paixin.com/thumbs/2853475/182850496/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d302.paixin.com/thumbs/15296102/193203484/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/17338964/198469114/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/1385248/228123628/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/1385248/226342890/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/4233795/205912092/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/4233795/208670804/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/4233795/204149078/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/4233795/207269502/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/4233795/207267822/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/4233795/220113672/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/4233795/227927624/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/4233795/230788154/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/8117860/226515070/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d302.paixin.com/thumbs/3494217/177537438/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/1013513/227296944/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/6462898/200629006/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/6462898/215246988/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/6462898/201557904/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/6462898/214763952/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/6462898/211388642/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/6462898/207620668/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/1175884/219952560/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d302.paixin.com/thumbs/8640900/190509304/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/16405760/201402394/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/15296102/198385096/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d302.paixin.com/thumbs/15296102/193202872/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/1385248/224624116/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/1175884/219951586/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/12985848/216164378/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/12985848/216163866/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://images.gaga.me/photos2/2017/1228/c21af3dbfaec286b56afe6dd7ad23322.jpg?imageView2/2/w/600/h/600'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://images.gaga.me/photos2/2018/1003/5bb4544b3fe3a.jpeg?imageView2/2/w/600/h/600'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://images.gaga.me/photos2/2018/0921/5ba4b64bdeef9.jpeg?imageView2/2/w/600/h/600'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://images.gaga.me/photos2/2018/0921/5ba4b6494be9e.jpeg?imageView2/2/w/600/h/600'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d302.paixin.com/thumbs/3591429/150266028/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/1385248/211513342/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/1385248/202428740/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/6462898/199162174/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/6462898/209157436/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/17007214/212116222/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d301.paixin.com/thumbs/1034986/85990974/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://dp.gaga.me/depositphotos/1024/2018/0614/0bd356741ac3d4b9f774df0f3fb94a5c.jpg?imageView2/2/w/400/h/400&e=1552402542&token=oVzGH3GXS72ah4todWOUas5zZ2ZoLSXxJa2civF0:KE5xOw5XcK-SpUvZ0TpH9iirZ7s='. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://dp.gaga.me/depositphotos/1024/2018/0611/f916a35021d2c440c5dc9511934730dc.jpg?imageView2/2/w/400/h/400&e=1552402542&token=oVzGH3GXS72ah4todWOUas5zZ2ZoLSXxJa2civF0:CqxqU5CL_7Tj9xZtLC8GwBYmPzw='. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d303.paixin.com/thumbs/9880800/210447646/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://d302.paixin.com/thumbs/2853475/182849820/staff_1024.jpg?imageView2/2/w/400/h/400'. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://dp.gaga.me/depositphotos/1024/2018/1206/bdb19b987939f0d4fee90607b1d74841.jpg?imageView2/2/w/400/h/400&e=1552402542&token=oVzGH3GXS72ah4todWOUas5zZ2ZoLSXxJa2civF0:s7FPriVMkt3p5PwB6AmsqO2F0mw='. This content should also be served over HTTPS. 34:1 Mixed Content: The page at 'https://v.paixin.com/mediapack/34' was loaded over HTTPS, but requested an insecure image 'http://dp.gaga.me/depositphotos/1024/2018/0514/1a470e8b28e1815e1e4adeef67b0e5b5.jpg?imageView2/2/w/400/h/400&e=1552402542&token=oVzGH3GXS72ah4todWOUas5zZ2ZoLSXxJa2civF0:uYmrKruHpACPFDJ4aL-h1yGHsTE='. This content should also be served over HTTPS.''' #up=urllib.request.urlopen(url) #s=up.read() h="http://d" c=".jpg" posh=-len(h) posc=-len(c) i=0 while i<s.count(h): posh=s.find(h,posc+len(h)) posc=s.find(c,posh+len(c)) t=s[posh:posc+len(c)] http=t.find("http") url=t[http:] #print(t[http:]) if i!=2: urllib.request.urlretrieve(url,str(i)+'.jpg') #print (t[http:]) i+=1
python ---图片爬虫
最新推荐文章于 2022-11-04 10:45:00 发布