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

2020年5月17日

实例4:网络图片的爬取和存储

摘要: 网络图片链接的格式:http://www.example.com/picture.jpg 图片爬取代码 import requests import os #url = 'https://image.baidu.com/search/detail?ct=503316480&z=&tn=baiduim 阅读全文

posted @ 2020-05-17 17:18 cltt 阅读(365) 评论(0) 推荐(0) 编辑

实例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 阅读(1076) 评论(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 阅读(390) 评论(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 阅读(459) 评论(0) 推荐(1) 编辑

爬虫带来的问题

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

posted @ 2020-05-17 11:38 cltt 阅读(177) 评论(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 阅读(264) 评论(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 阅读(2434) 评论(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 阅读(714) 评论(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 阅读(668) 评论(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 阅读(760) 评论(0) 推荐(0) 编辑

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

导航