上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: 1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 4 import urllib2 5 import json 6 from lxml import etree 7 8 url = "http://www.qiushibaike.com/8hr/page/2/" 9 headers = {"User-Agent" : "M... 阅读全文
posted @ 2017-11-21 16:55 不可叽叽歪歪 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-11-21 15:36 不可叽叽歪歪 阅读(78) 评论(0) 推荐(0) 编辑
摘要: # -*- coding:utf-8 -*- from bs4 import BeautifulSoup import requests import time def captcha(captcha_data): with open("captcha.jpg", "wb") as f: f.write(captcha_data) text = raw_inp... 阅读全文
posted @ 2017-11-21 14:52 不可叽叽歪歪 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 4 import urllib 5 import urllib2 6 7 def loadPage(url, filename): 8 """ 9 作用:根据url发送请求,获取服务器响应文件 10 url: 需要爬取的url地址 1... 阅读全文
posted @ 2017-11-21 09:00 不可叽叽歪歪 阅读(383) 评论(0) 推荐(0) 编辑
摘要: 1 import re 2 import requests 3 4 class Spider(): 5 def __init__(self): 6 self.page=self.page 7 #self.switch=True 8 9 10 def loadpage(self,page): 11 url='h... 阅读全文
posted @ 2017-11-21 08:58 不可叽叽歪歪 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1 import requests 2 from lxml import etree 3 4 def loadpage(url): 5 headers={"User-Agent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.1... 阅读全文
posted @ 2017-11-21 08:57 不可叽叽歪歪 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 来源:http://www.cnblogs.com/wangbg/p/7282543.html 阅读全文
posted @ 2017-11-19 11:51 不可叽叽歪歪 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 基本程序(第一次实战),简单写写,有时间进行修改扩展。(requests ;urllib.parse;BeautifulSoup) 阅读全文
posted @ 2017-11-19 10:51 不可叽叽歪歪 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1 import requests 2 from requests.exceptions import RequestException 3 import re 4 import json 5 from multiprocessing import Pool 6 7 def get_one_page(url): 8 try: 9 headers={'u... 阅读全文
posted @ 2017-11-18 18:58 不可叽叽歪歪 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 文档网址 http://python-selenium-zh.readthedocs.io/zh_CN/latest 阅读全文
posted @ 2017-11-18 12:07 不可叽叽歪歪 阅读(69) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页