print (buf)
i = 0
for url in buf:
f = open(str(i)+'.jpg','wb')
rep = request.urlopen(url)
bul = rep.read()
f.write(bul)
i = i+1
i = 0
for url in buf:
f = open(str(i)+'.jpg','wb')
rep = request.urlopen(url)
bul = rep.read()
f.write(bul)
i = i+1
2017-01-12
#*-coding:utf-8-*-
from urllib import request
import re
req = request.Request('http://baozoumanhua.com/')
req.add_header('User-Agent','Chrome/55.0.2883.75 Safari/537.36')
hum = request.urlopen(req)
list = hum.read().decode('utf-8')
list1= re.sub(r'=','\n',list)
buf = re.findall(r"http.+\.jpg",list1)
from urllib import request
import re
req = request.Request('http://baozoumanhua.com/')
req.add_header('User-Agent','Chrome/55.0.2883.75 Safari/537.36')
hum = request.urlopen(req)
list = hum.read().decode('utf-8')
list1= re.sub(r'=','\n',list)
buf = re.findall(r"http.+\.jpg",list1)
2017-01-12
ma = re.match(r'<(?P<ht>[\w]+>)<(?P<h>[\w]+>)<(?P<s>[\w]+>).+</(?P=s)</(?P=h)</(?P=ht)',"<html><head><script>javascript:alect('hello world')</script></head></html>")
print ma.group()
print ma.groups()
闲的蛋疼写了一大堆。愿意看的看看吧
print ma.group()
print ma.groups()
闲的蛋疼写了一大堆。愿意看的看看吧
2017-01-05
python 基础, python进阶 ,python装饰器,python面向对象,python文件处理,python错误异常,python正则,希望大家这么学习,慢慢来吧,心急吃不了热豆腐。
2017-01-05
请问你是来学英语的还是来学python的,喷子都喷到这来了,真是厉害了,在下佩服!!!!真是傻bi年年有,今年特别多
2017-01-01