![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
weixin_39616739
这个作者很懒,什么都没留下…
展开
-
Python Spider - re
# 正则表达式import restr1 = 'www.kaikeba.com'result = re.match('www',str1)# 获取匹配的结果# print(result.group())# 获取匹配字符串的长度范围# print(result.span())# 不在起始位置匹配,返回None# print(re.match('kaikeba',st...原创 2019-08-17 13:07:09 · 82 阅读 · 0 评论 -
bs4/xpath/pyquery
from bs4 import BeautifulSouphtml = ''' <body><header id="header"> <h3 id="name">小强也可爱</h3> <title>标题</title> <div class="sns"> <a hre...原创 2019-08-17 13:58:13 · 342 阅读 · 0 评论