摘要: SW1: [Huawei]vlan batch 10 20 [Huawei]int e0/0/1 [Huawei-Ethernet0/0/1]port link-type access [Huawei-Ethernet0/0/1]port default vlan 10 [Huawei]int e0 阅读全文
posted @ 2023-03-09 10:26 0x1e61 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 1. 创建项目 scrapy startproject 项目名称 2. 进入项目 cd 项目名称 3. 创建爬虫 scrapy genspider 名字 域名 4. 可能需要start_urls,修改成你要抓取的那个页面 进入spiders里面,会看见一个按你创建名字的python文件 例如: sc 阅读全文
posted @ 2023-03-08 22:46 0x1e61 阅读(16) 评论(0) 推荐(0) 编辑
摘要: from selenium.webdriver import Edge from selenium.webdriver.common.by import By # 操作链 from selenium.webdriver import ActionChains # 12306登录会检测,检测一些sel 阅读全文
posted @ 2023-03-07 12:54 0x1e61 阅读(37) 评论(0) 推荐(0) 编辑
摘要: from selenium.webdriver import Edge from selenium.webdriver.common.by import By # 在这里导入浏览器设置相关的类 from selenium.webdriver.edge.options import Options # 阅读全文
posted @ 2023-03-07 10:29 0x1e61 阅读(81) 评论(0) 推荐(0) 编辑
摘要: from selenium.webdriver import Edge # 在这里导入浏览器设置相关的类 from selenium.webdriver.edge.options import Options # 无可视化界面设置 # edge_options = Options() # 使用无头模 阅读全文
posted @ 2023-03-07 10:23 0x1e61 阅读(40) 评论(0) 推荐(0) 编辑
摘要: import time from selenium.webdriver import Edge from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys # 键盘输入 # 1 阅读全文
posted @ 2023-03-06 23:05 0x1e61 阅读(717) 评论(0) 推荐(0) 编辑
摘要: import time from selenium.webdriver import Edge from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys # 键盘输入 # 1 阅读全文
posted @ 2023-03-05 19:53 0x1e61 阅读(19) 评论(0) 推荐(0) 编辑
摘要: # 不用协程 """ import os import asyncio import requests import aiofiles as aiofiles from lxml import etree import aiohttp headers = { 'User-Agent': 'Mozil 阅读全文
posted @ 2023-03-04 00:56 0x1e61 阅读(60) 评论(0) 推荐(0) 编辑
摘要: import requests from lxml import etree url = 'https://changsha.zbj.com/xcxkfzbjzbj/f.html?fr=zbj.sy.zyyw_2nd.lv3&r=2' headers = { 'User-Agent': 'Mozil 阅读全文
posted @ 2023-03-03 23:56 0x1e61 阅读(23) 评论(0) 推荐(0) 编辑
摘要: # request.get() 同步的代码 -> 异步操作aiohttp import os # 异步io import asyncio # 异步file import aiofiles # 异步 http import aiohttp # 如果文件夹不存在则创建文件夹,用来放图片 if not o 阅读全文
posted @ 2023-03-03 23:09 0x1e61 阅读(10) 评论(0) 推荐(0) 编辑