10 2021 档案

摘要:git的常用命令 git配置用户名和邮箱地址git config --global user.name “your_user_name”git config --global user.email your_email@domain.comgit config --list 查看配置信息 创建+提交 阅读全文
posted @ 2021-10-31 15:53 山水无期 阅读(61) 评论(0) 推荐(0)
摘要:1、python 开发之虚拟环境管理:virtualenv、virtualenvwrapper、pycharm https://www.cnblogs.com/chenhuabin/p/10538773.html 阅读全文
posted @ 2021-10-29 15:31 山水无期 阅读(49) 评论(0) 推荐(0)
摘要:面试题目的整理 1、python进程之间的通信方式有哪些? 队列: msg_queue (消息队列) 共享队列 管道: pipeline for single duplex (单工管道) pipeline for half duplex (半双工管道) name pipeline (命名管道) So 阅读全文
posted @ 2021-10-21 01:49 山水无期 阅读(44) 评论(0) 推荐(0)
摘要:多进程的通信 一、队列(Queue) ''' 一、队列(Queue) Queue.qsize() 返回当前队列包含的消息数量 Queue.empty() 如果队列为空,返回 True,否则返回 False Queue.full() 如果队列满了,返回 True,否则返回 False Queue.ge 阅读全文
posted @ 2021-10-21 01:48 山水无期 阅读(415) 评论(0) 推荐(0)
摘要:一、多进程的创建方式 1、通过multiprocessing #encoding='utf-8' from multiprocessing import Process import os import time ''' os.getpid() 获取一个进程的pid 返回当前进程的pid os.ge 阅读全文
posted @ 2021-10-20 02:03 山水无期 阅读(545) 评论(0) 推荐(0)
摘要:bee_server.py from sanic import Sanic from sanic import response from urlpool import UrlPool #初始化urlpool,很久需要进行修改 urlpool = UrlPool(__file__) #初始化url 阅读全文
posted @ 2021-10-18 16:32 山水无期 阅读(148) 评论(0) 推荐(0)
摘要:一、域名去重1、检测开头:link.startswith('http') txt = "Hello, welcome to my world." x = txt.startswith("Hello") print(x)#如果字符串以指定的值开头,则 startswith() 方法返回 True,否则 阅读全文
posted @ 2021-10-12 21:16 山水无期 阅读(225) 评论(0) 推荐(0)
摘要:1、网址:https://gitee.com/pengzhile/ide-eval-resetter 2、点击下载、下载后直接丢进pycharm中。 3、勾选、重启 、查看 阅读全文
posted @ 2021-10-08 09:24 山水无期 阅读(3334) 评论(1) 推荐(0)
摘要:猿人学第十四题 检测太多了,debugger fiddler替换无法实现、置空也不行。推荐使用hook Function原生的构造 var func_ = Function.prototype.constructor Function.prototype.constructor = function 阅读全文
posted @ 2021-10-07 19:55 山水无期 阅读(725) 评论(0) 推荐(0)
摘要:from requests_toolbelt import MultipartEncoderimport requests encoderl = MultipartEncoder( fields = { 'files': ('file_name', open(r"C:\Users\Administr 阅读全文
posted @ 2021-10-07 17:29 山水无期 阅读(1349) 评论(0) 推荐(0)
摘要:#异步并发爬虫的框架 #网址池:用于过滤重复的网址(因为会出现转发、或者不同页面出现相同商品的链接的情况) #网址池:突然断网等,因为其他原因下载器出现错误。网址池需要记录下来。设置失败三次之后就不再下载,标记为有问题的网址 #多个下载器 这里可以使用异步(协程aiohttp)并发的下载 #HTML 阅读全文
posted @ 2021-10-06 01:28 山水无期 阅读(63) 评论(0) 推荐(0)
摘要:import aiohttp import asyncio import time async def get_requests(url): async with aiohttp.ClientSession() as session: async with await session.get(url 阅读全文
posted @ 2021-10-06 01:04 山水无期 阅读(80) 评论(0) 推荐(0)
摘要:import requests import cchardet import traceback from lxml import etree def downloader(url,timeout = 10,headers = None,debug = False, binary = False): 阅读全文
posted @ 2021-10-06 00:57 山水无期 阅读(61) 评论(0) 推荐(0)
摘要:import random #一维示例 test_arry = [11,12,13,15,18,20,29,35,40,55,68,70,92,105,107,109] #最后一个数如果不是109,而是200,如何等比例、等长度的将这个列表进行放大的操作 #先计算缩放比例 rate = 200/te 阅读全文
posted @ 2021-10-06 00:50 山水无期 阅读(299) 评论(0) 推荐(0)
摘要://浏览器内存漫游解决方案(js逆向) //原理通过ast把所有的变量,参数中间值进行内存的存储 //搜索AST-hook,进入github //现在github的库下载下来 //anyproxy nodejs中的抓包工具 需要安装(管理员的) npm install -g anyproxy //然 阅读全文
posted @ 2021-10-06 00:34 山水无期 阅读(1297) 评论(0) 推荐(0)
摘要://第一种 补环境的方法 let test1 = { name:"小红" }; test = new Proxy(test1,{ get(target,key){ console.log("获取了",key + "属性"); return target[key]; } }) test.name // 阅读全文
posted @ 2021-10-06 00:05 山水无期 阅读(4559) 评论(0) 推荐(0)