自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 处理JS分页加载的网页_recv

# # shark-pager-next # # h3 class:ellipsis # # span class:dy-num fr # # shark-pager-disable-next from selenium import webdriver from bs4 import BeautifulSoup as bs import unittest class douyu(unittes

2017-10-28 11:11:47 372

原创 糗事百科案例(使用 xpath模块)

通过一个案列先了解下json与python之间的转换关系 #json解析库,对应到lxml import json #json的解析语法,对应到xpath import jsonpath import urllib2 url="http://www.lagou.com/lbs/getAllCitySearchLabels.json" headers={"User-Agent":"Mozilla

2017-10-25 15:21:07 707

原创 爬知乎了解BeautifulSoup用法

import requests from bs4 import BeautifulSoup import time def captcha(captcha_data): with open("captcha.jpg","wb") as f: f.write(captcha_data) text=raw_input(("请输入验证码:").encode("gb18030")) retur

2017-10-24 11:43:55 1034

原创 lxml库和贴吧图片下载案例

# -*- encoding: UTF-8 -*- import sys reload(sys) sys.setdefaultencoding('utf-8') import urllib import urllib2 from lxml import etree #找出所有帖子的链接 def loadPage(url): """ 作用:根据url发送请求,获取服务器响应文件 url:需要

2017-10-20 21:32:15 382

原创 爬虫 内涵段子

import urllib2 import urllib import re class spilder: def __init__(self): self.page=1#初始页是1 self.switch=True#如果是True就开始爬 def loadpage(self): """下载页面""" print u"正在下载页面...." url="http://ww

2017-10-20 10:46:15 430

原创 爬虫-有道翻译

# !/usr/bin/python # -*- encoding: UTF-8 -*- import urllib import urllib2 headers={"X-Requested-With":"XMLHttpRequest", "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTM

2017-10-14 11:52:06 943

原创 模仿两个 人之间的转账

#!/usr/bin/python # -*- coding: UTF-8 -*- import pymssql import sys reload(sys) sys.setdefaultencoding('utf8') import urllib2 class TransferMoney(object): def __init__(self,conn): self.conn=conn

2017-10-09 21:27:14 457

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除