[置顶]
anaconda换源
摘要:
anaconda镜像源下载 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 配置anaconda的国内源 清华源 conda config --add channels https://mirrors.tuna.tsinghua.edu.
自用的python库版本
摘要:
python 3.11.9 aiofiles 24.1.0 aiohttp 3.10.5 aioredis 2.0.1 beautifulsoup4 4.12.3 celery 5.4.0 cffi 1.16.0 curl_cffi 0.7.1 ddddocr 1.5.5 Django 5.0.3
python中的枚举函数enumerate
摘要:
# pytho中的enumerate()函数 # enumerate(sequence, [start=0]),其中sequence是一个可迭代序列,start是一个可选参数,表示序列下标的起始位置 # 这个函数可以用来遍历一个可迭代对象(如列表、元组、字符串)中的元素及其索引,并返回一个enume
selenium相关配置
摘要:
ChromeDriver驱动版本:https://googlechromelabs.github.io/chrome-for-testing/ # 创建一个配置对象 options = webdriver.ChromeOptions() # 代理设置 options.add_argument('--
fiddler隐藏掉不需要的数据包格式
摘要:
REGEX:(?insx)/[^\?/].(css|ico|jpg|png|gif|bmp|wav|js|jpeg)(\?.)?$ or .css .ico .jpg .png .gif .bmp .wav .js .jpeg
常用的hook代码
摘要:
// ==UserScript== // @name hook xxx // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You
猿人学5
摘要:
import requests from collections import Counter # 使用 Fiddler抓包工具获取请求头顺序 headers = { 'Host': 'match.yuanrenxue.cn', 'Connection': 'keep-alive', 'Pragma
python中的zip函数
摘要:
a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k'] b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] # zip函数需要传入迭代器,返回一个是zip对象,也是一个迭代器,内部的元素是元组形式 new_zip =
python中正则模块
摘要:
import re # 1. findall() 匹配字符串中所有符合正则的字符串,并返回一个列表 result_list = re.findall(r"\d+", "我的手机号是13812345678,我的QQ号是456789123") print(result_list, type(result
MysqlHelper
摘要:
# 来源:https://blog.csdn.net/YZL40514131/article/details/127170427 from pymysql import * class MysqlHelper: # todo 数据库连接参数,可以定义多个,比如conn_params1,conn_pa
MyRequestsHelper
摘要:
import requests import time class StateCodeError(Exception): """状态码异常""" pass class ContentError(Exception): """内容异常""" pass class RequestHelper: """未