摘要:
# 正则表达式# 字符组 :[字符]# 元字符: # \w \d \s # \W \D \S # . 除了换行符以外的任意字符 # \n \t # \b # ^ $ 匹配字符串的开始和结束 # () 分组 是对多个字符组整体量词约束的时候用的 # re模块 : 分组优先的 # findall # s 阅读全文
摘要:
import re from urllib.request import urlopen def getPage(url): response = urlopen(url) return response.read().decode('utf-8') def parsePage(s): ret = 阅读全文