小白do问题
Do.cn
这个作者很懒,什么都没留下…
展开
-
【小白do问题】爬虫练习,断点调试,老是无法在要调试的地方显示
练习一个爬虫入门,断点调试的时候老是无法在第一个断点显示: from urllib import request class Spider(): url = 'https://live.bilibili.com/all?visit_id=2xogwy0pz3s0' def __fetch_content(self): r = request.urlopen(Sp...原创 2020-04-30 13:25:23 · 182 阅读 · 0 评论 -
【小白do问题】python正则 re.findall()把 \n 打印出来了,不能换行
python正则, 用 re.findall()提取两个字符间的字符,打印出来时候 \n 不是换行而是直接打印了。代码如下: test8 = 'When I do count the clock that tells the time,\ \n And see the brave day sunk in hideous night;\ \n When I behold the vi...原创 2020-04-25 22:29:29 · 1360 阅读 · 6 评论 -
【小白do问题】Python 正则练习,想找出字符串中的 \n,但是打不出来
#找出所有g 和 \n, 想要 [‘g, G, \n’],代码如下 import re test6 = ‘hafbnmA\nEGIENB\ng’ t6 = re.findall(‘g.{1}’, test6, re.I | re.S ) print(t6) #求问为什么打印出来的结果是 [‘GI’] ...原创 2020-04-24 14:26:04 · 305 阅读 · 1 评论