上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 21 下一页
摘要: 03.图像处理 在setting中设置导入pillow库 前置知识 **RGB颜色:**3个颜色通道组成的颜色 **3个颜色:**红(255,0,0)、绿(0,255,0)、蓝(0,0,255) **其他常见:**黄(255,255,0) 一个像素(pixel)=3字节 做实验的两张图如下,分别为k 阅读全文
posted @ 2022-04-16 19:00 icui4cu 阅读(82) 评论(0) 推荐(0)
摘要: 和python进行互动 安装redis库 pip3 install redis 连接数据库 import redis # StrictRedis和Redis效果一样,后者是前者的子集 r = redis.StrictRedis(host='localhost',port=6379,db=0) r.s 阅读全文
posted @ 2022-04-16 18:55 icui4cu 阅读(78) 评论(0) 推荐(0)
摘要: Redis 介绍 NoSQL类型数据库之一,内存运行,效率极高,支持分布式,理论上可以无限拓展数据库,支持各种语言的API,可安装在各种平台 关系型数据库:MySQL、SQLServer、Oracle 非关系型数据库:NoSQL、Redis(key-value) 特点: c/s通信模式(Client 阅读全文
posted @ 2022-04-16 18:54 icui4cu 阅读(42) 评论(0) 推荐(0)
摘要: 同时采集多个字段 items.py import scrapy class Test1Item(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() # 在items定义数据类型 titl 阅读全文
posted @ 2022-04-16 18:53 icui4cu 阅读(41) 评论(0) 推荐(0)
摘要: 模拟手机操作 # 引入触控类 from selenium.webdriver.common.touch_actions import TouchActions mobileEmulation = {'deviceName':'iPhone 6/7/8'} options = webdriver.Ch 阅读全文
posted @ 2022-04-16 18:52 icui4cu 阅读(48) 评论(0) 推荐(0)
摘要: cookie操作 # 查看cookie cookie = driver.get_cookies() print(cookie) # 增加cookie driver.add_cookie({'name':'xiaoming','key':'9988'}) # 清除所有cookie driver.del 阅读全文
posted @ 2022-04-16 18:51 icui4cu 阅读(62) 评论(0) 推荐(0)
摘要: 拖拽操作 # 拖拽操作 first_target = driver.find_element_by_xpath("//span[contains(text(),'喜羊羊与灰太狼之决战次时代')]") second_target = driver.find_element_by_xpath("//a[ 阅读全文
posted @ 2022-04-16 18:50 icui4cu 阅读(44) 评论(0) 推荐(0)
摘要: selenium电脑模式和手机模式 # 指定调用某个地方的chrome options = webdriver.ChromeOptions() # chrome浏览器的主程序位置 location = r"F:\All_python_code\scrapy\chrome-win\chrome.exe 阅读全文
posted @ 2022-04-16 18:49 icui4cu 阅读(43) 评论(0) 推荐(0)
摘要: xpath 处理网页:pip install lxml from lxml import etree # 网页的源码 html_doc = resp.content.decode('utf-8') # 使用etree去转换html_doc,转换成了一个html对象,此时element对象可以使用xp 阅读全文
posted @ 2022-04-16 18:48 icui4cu 阅读(48) 评论(0) 推荐(0)
摘要: Json 在线数据生成器:https://www.onlinedatagenerator.com/ 加载json数据 import requests import json # from pprint import pprint def main(): url = "http://192.168.2 阅读全文
posted @ 2022-04-16 18:47 icui4cu 阅读(143) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 21 下一页