随笔分类 -  爬虫

摘要:fidder是会占用 jupyter 端口的,在fidder里边最上边找到tools 》options 》connections里边的8888改成别的重启jupyter就好了 阅读全文
posted @ 2019-08-16 14:16 来年若相见 阅读(168) 评论(0) 推荐(0)
摘要:~~~python import requests from bs4 import BeautifulSoup url_list = [] kv = {'User Agent':'Mozilla/5.0'} r = requests.get('https://www.jianshu.com/p/42 阅读全文
posted @ 2019-08-09 11:06 来年若相见 阅读(226) 评论(0) 推荐(0)
摘要:from lxml import html text= //测试的html文本 etree = html.etree htmlDiv = etree.HTML(text) title = htmlDiv.xpath("//meta[1]/@content") print(title) 来源:CSDN 阅读全文
posted @ 2019-08-05 14:38 来年若相见 阅读(1061) 评论(0) 推荐(0)
摘要:import requests import re 进入网址 for i in range(1,5): page_url = requests.get(f"http://duanziwang.com/page/{i}/") page_content = page_url.text print(pag 阅读全文
posted @ 2019-07-28 13:39 来年若相见 阅读(194) 评论(0) 推荐(0)