随笔分类 - python爬虫
摘要:点击核减删除用的代码 from selenium import webdriver from selenium.webdriver import ActionChains from selenium.webdriver.common.by import By import time import d
阅读全文
摘要:import json import multiprocessing import time import requests from requests.exceptions import RequestException import re def get_one_page(url): try:
阅读全文
摘要:服务器程序 import flask import os app = flask.Flask(__name__) # 访问"http://127.0.0.1:5000/",可以返回get和post传过来的数据 @app.route('/') # 默认只接收get请求,@app.route('/',m
阅读全文
摘要:# 爬取拉勾网信息,用selenium模块 from selenium.webdriver import Chrome from selenium.webdriver.common.keys import Keys import time web = Chrome() # 创建浏览器,打开拉勾网 w
阅读全文
摘要:# 爬取优美图库美女写真页面,共149页,每个页面30个图片,点击每个图片进入子页面 # 每个子页面又有不等的翻页页面(6-25个),每个子页面有图片的超清图片 # 本程序只爬取美女写真的第一页30个图片对应的子链接里面的6-25个超清图片 # 本程序所有页面都为静态页面 import reques
阅读全文
摘要:urllib库 urllib库四大模块: urllib.request 请求模块 urllib.error 异常处理模块 urllib.parse url解析模块 urllib.robotparser robots.txt解析模块 urlopen 和响应 import urllib.request
阅读全文