上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 72 下一页

2020年5月17日

实例3:百度360搜索关键词提交

摘要: 百度搜索 import requests keyword = 'Python' try: kv = {'wd':keyword} r = requests.get('http://www.baidu.com/s',params=kv) print(r.request.url) r.raise_for 阅读全文

posted @ 2020-05-17 16:34 cltt 阅读(1281) 评论(0) 推荐(0)

爬虫实战2 亚马逊

摘要: import requests r= requests.get('https://www.amazon.cn/dp/B01MYH8A99') print(r.status_code) r.encoding = r.apparent_encoding print(r.text) print(r.req 阅读全文

posted @ 2020-05-17 11:58 cltt 阅读(446) 评论(0) 推荐(0)

爬虫实战1 京东

摘要: url="https://item.jd.com/100012881854.html" kv = {'user-agent':'Mozilla/5.0'} r = requests.get(url,headers = kv) print(r.status_code) print(r.encoding 阅读全文

posted @ 2020-05-17 11:51 cltt 阅读(503) 评论(0) 推荐(1)

爬虫带来的问题

摘要: 爬虫的限制 来源审查发布公告 Robots协议 实例 Robots协议基本语法 robots协议都在根目录下 Robots协议的遵守方式 使用 网络爬虫: 自动或人工识别robots.txt,再进行内容爬取。 约束性 如何遵守 阅读全文

posted @ 2020-05-17 11:38 cltt 阅读(198) 评论(0) 推荐(0)

requests 简介

摘要: import requests r = requests.get('http://www.baidu.com') print(r.status_code) r.encoding = 'utf-8'#不然会乱码 print(r.text) 200<!DOCTYPE html><!--STATUS OK 阅读全文

posted @ 2020-05-17 09:05 cltt 阅读(281) 评论(0) 推荐(0)

2020年5月16日

python 判断灰度图像

摘要: from PIL import Image import matplotlib.pyplot as plt # 黑白照片(灰度图)识别 def isGrayMap(img, threshold = 15): """ 入参: img:PIL读入的图像 threshold:判断阈值,图片3个通道间差的方 阅读全文

posted @ 2020-05-16 15:00 cltt 阅读(2510) 评论(0) 推荐(0)

2020年5月14日

Windows10 许可证即将过期

摘要: 这里提出一种KMS的方式 通过kms命令激活win10 微软官方正版win10 VL批量激活密钥汇总(永久有效) Win10 KMS客户端安装序列号,支持1511-1809-1903-1909等全系列win10版本: Windows 10 Professional(专业版):W269N-WFGWX- 阅读全文

posted @ 2020-05-14 09:29 cltt 阅读(877) 评论(0) 推荐(0)

2020年5月7日

Flask 列表操作

摘要: filter.html 在templates 文件夹下 <!-- 列表操作 --> {{ [1,2,3,4,5,6] | first }} <br> {{ [1,2,3,4,5,6] | last }} <br> {{ [1,2,3,4,5,6] | length }} <br> {{ [1,2,3 阅读全文

posted @ 2020-05-07 10:41 cltt 阅读(706) 评论(0) 推荐(0)

2020年5月6日

Flask 字符串操作

摘要: from flask import Flask,request, jsonify, redirect, url_for,abort,make_response,session,render_template app = Flask(__name__) @app.route('/') def inde 阅读全文

posted @ 2020-05-06 15:58 cltt 阅读(838) 评论(0) 推荐(0)

2020年5月5日

Flask Cookie , Session

摘要: ''' 用户登录状态保持 Cookie :指某些网站为了辨别用户身份,进行会话跟踪而存储用户在本地的数据 存储在浏览器当中的一段纯文本,不同域名 Cookie 是不能互相访问的 session:请求上下文对象,用于处理http请求中的一些数据内容 # 在服务器保持session # Session 阅读全文

posted @ 2020-05-05 13:15 cltt 阅读(137) 评论(0) 推荐(0)

上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 72 下一页

导航