随笔分类 -  BeautifulSoup

摘要:# -*- coding:utf-8 -*- #python 2.7 #XiaoDeng #http://tieba.baidu.com/p/2460150866 #标签操作 from bs4 import BeautifulSoup import urllib.request import re #如果是网址,可以用这个办法来读取网页 #html_doc = "http://tieba... 阅读全文
posted @ 2016-11-13 22:11 Xiao|Deng 阅读(21630) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*- #python 2.7 #XiaoDeng #http://tieba.baidu.com/p/2460150866 #标签操作 from bs4 import BeautifulSoup import urllib.request import re #如果是网址,可以用这个办法来读取网页 #html_doc = "http://tieba... 阅读全文
posted @ 2016-11-13 22:03 Xiao|Deng 阅读(6034) 评论(0) 推荐(0)
摘要:result: .<a class="sister" href="http://example.com/elsie" id="xiaodeng"><!-- Elsie --></a><a class="sister" href="http://example.com/lacie" id="link2 阅读全文
posted @ 2016-11-13 22:00 Xiao|Deng 阅读(2743) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*- #python 2.7 #XiaoDeng #http://tieba.baidu.com/p/2460150866 #标签操作 from bs4 import BeautifulSoup import urllib.request import re #如果是网址,可以用这个办法来读取网页 #html_doc = "http://tieba... 阅读全文
posted @ 2016-11-13 21:49 Xiao|Deng 阅读(14593) 评论(1) 推荐(1)
摘要:# -*- coding:utf-8 -*- #python 2.7 #XiaoDeng #http://tieba.baidu.com/p/2460150866 #使用多个指定名字的参数可以同时过滤tag的多个属性 from bs4 import BeautifulSoup import urllib.request import re #如果是网址,可以用这个办法来读取网页 #htm... 阅读全文
posted @ 2016-11-13 21:31 Xiao|Deng 阅读(8967) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*- #python 2.7 #XiaoDeng #http://tieba.baidu.com/p/2460150866 from bs4 import BeautifulSoup import urllib.request html_doc = "http://tieba.baidu.com/p/2460150866" req = urllib... 阅读全文
posted @ 2016-11-13 21:08 Xiao|Deng 阅读(8924) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*- #python 2.7 #XiaoDeng #http://tieba.baidu.com/p/2460150866 #抓取图片地址 from bs4 import BeautifulSoup import urllib.request html_doc = "http://tieba.baidu.com/p/2460150866" req ... 阅读全文
posted @ 2016-11-13 20:48 Xiao|Deng 阅读(7570) 评论(0) 推荐(0)