上一节我们介绍了正则表达式,它的内容其实还是蛮多的,如果一个正则匹配稍有差池,那可能程序就处在永久的循环之中,而且有的小伙伴们也对写正则表达式的写法用得不熟练,没关系,我们还有一个更强大的工具,叫Beautiful Soup,有了它我们可以很方便地提取出HTML或XML标签中的内容,实在是方便,这一 ...
分类:
编程语言 时间:
2017-06-29 00:52:17
阅读次数:
210
今天下午刚起来眼睛就比較涨,,并且还有点恶心,唉。结果一直不在状态。并且这个题太坑了。。。。 点击此处即可传送 Hit 2255 Maybe ACMers of HIT are always fond of fibonacci numbers, because it is so beautiful. ...
分类:
其他好文 时间:
2017-06-27 11:00:55
阅读次数:
151
Beautiful Soup简单实用,功能也算比较全,之前下载都是自己使用xpath去获取信息,以后简单的解析可以用这个,方便省事。 Beautiful Soup 是用 Python 写的一个 HTML/XML 的解析器,它可以很好的处理不规范标记并生成剖析树。通常用来分析爬虫抓取的web文档。对于 ...
分类:
其他好文 时间:
2017-06-25 22:34:18
阅读次数:
218
A beautiful Jenkins dashboard : https://jenkins.io/blog/2016/01/10/beautiful-jenkins-dashboard/ ...
分类:
其他好文 时间:
2017-06-23 11:38:44
阅读次数:
127
python社区不乏幽默。先来看“python之道”这首诗。 导入this包: import this 输出是一首诗,这首诗总结了Python的风格,能够指导Python程序猿的编程。以下是译文: The Zen of Python, by Tim Peters Python之道 Beautiful ...
分类:
编程语言 时间:
2017-06-21 23:07:14
阅读次数:
180
Beautiful Soup parses anything you give it, and does the tree traversal stuff for you. BeautifulSoup库是解析、遍历、维护 “标签树” 的功能库(遍历,是指沿着某条搜索路线,依次对树中每个结点均做一次且 ...
分类:
编程语言 时间:
2017-06-21 16:01:18
阅读次数:
154
>>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Compl... ...
分类:
编程语言 时间:
2017-06-20 22:26:48
阅读次数:
172
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4782 Problem Description Coach Pang has a lot of hobbies. One of them is playing with “tag soup” with t ...
分类:
其他好文 时间:
2017-06-18 11:58:33
阅读次数:
137
# -*- coding: utf-8 -*-from bs4 import BeautifulSoupdef file2soup(ffile): with open(ffile,'r+b') as f: f.encoding='utf-8' soup=BeautifulSoup(f,'lxml') ...
分类:
其他好文 时间:
2017-06-17 14:22:57
阅读次数:
137
Best Reward Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)http://acm.hdu.edu.cn/showproblem.php?pid=3613 Problem Des ...
分类:
其他好文 时间:
2017-06-17 10:04:00
阅读次数:
93