摘要: 已经爬取到的斗破苍穹文本以TXT形式存储 代码 结果 阅读全文
posted @ 2018-05-02 14:33 蓝勃斐重新开始 阅读(374) 评论(0) 推荐(0) 编辑
摘要: from selenium import webdriver url='https://www.jianshu.com/p/a64529b4ccf3' def get_info(url): include_title=[] driver=webdriver.PhantomJS() driver.get(url) driver.implicitl... 阅读全文
posted @ 2018-04-23 10:34 蓝勃斐重新开始 阅读(3054) 评论(0) 推荐(0) 编辑
摘要: 调试中,未成功。 阅读全文
posted @ 2018-04-20 17:21 蓝勃斐重新开始 阅读(990) 评论(0) 推荐(0) 编辑
摘要: import requests from lxml import etree import re import pymysql import time conn= pymysql.connect(host='localhost',user='root',passwd='root',db='mydb' 阅读全文
posted @ 2018-04-19 18:20 蓝勃斐重新开始 阅读(677) 评论(0) 推荐(0) 编辑
摘要: 字数的信息(word)没有得到缺失 阅读全文
posted @ 2018-04-18 17:03 蓝勃斐重新开始 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 爬取正文(contents)时,需要转码。 结果: 姓名:niangaoni… 等级:23性别:男 刚才看了一篇叫《抖音,快手正在毁掉我们的下一代!!》的文章,我才知道现在的00后,10后后那么逆天!我一个95后经常被他们喊着大叔的人,真的是经常被他们一些行为和语言所震惊!我从来不反感任何一个app 阅读全文
posted @ 2018-04-17 18:01 蓝勃斐重新开始 阅读(326) 评论(0) 推荐(0) 编辑
摘要: import requests from bs4 import BeautifulSoup import time headers={ #'User-Agent':'Nokia6600/1.0 (3.42.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0' 'User-Agent... 阅读全文
posted @ 2018-04-16 15:24 蓝勃斐重新开始 阅读(144) 评论(0) 推荐(0) 编辑
摘要: import requests from bs4 import BeautifulSoup import time headers={ #'User-Agent':'Nokia6600/1.0 (3.42.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0' 'User-Agent... 阅读全文
posted @ 2018-04-16 11:05 蓝勃斐重新开始 阅读(145) 评论(0) 推荐(0) 编辑
摘要: from lxml import etree import requests import csv fp=open('C://Users/Administrator/Desktop/lianxi/doubanbook.csv','w+',newline='',encoding='utf-8') writer=csv.writer(fp) writer.writerow(('name','url'... 阅读全文
posted @ 2018-04-13 14:48 蓝勃斐重新开始 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 对贴吧也可以进行同样操作 阅读全文
posted @ 2018-04-09 10:11 蓝勃斐重新开始 阅读(201) 评论(0) 推荐(0) 编辑