随笔 - 31  文章 - 0  评论 - 0  阅读 - 2430
11 2022 档案
<7> 简体--繁体转换
摘要:# 安装# pip install opencc-python-reimplemented# t2s - 繁体转简体(Traditional Chinese to Simplified Chinese)# s2t - 简体转繁体(Simplified Chinese to Traditional C 阅读全文
posted @ 2022-11-29 21:54 不是霉蛋 阅读(456) 评论(0) 推荐(0) 编辑
<5>RSA
摘要:. 阅读全文
posted @ 2022-11-28 09:28 不是霉蛋 阅读(4) 评论(0) 推荐(0) 编辑
<4>3DES
摘要:' 阅读全文
posted @ 2022-11-28 09:28 不是霉蛋 阅读(6) 评论(0) 推荐(0) 编辑
<3> DES
摘要:var CryptoJS = CryptoJS || (function (Math, undefined) { var C = {}; var C_lib = C.lib = {}; var Base = C_lib.Base = (function () { function F() {}; r 阅读全文
posted @ 2022-11-28 09:06 不是霉蛋 阅读(116) 评论(0) 推荐(0) 编辑
04. 中国招标投标公众服务平台
摘要:中国招标投标公众服务平台 https://bulletin.cebpubservice.com/ import httpx import warnings from lxml import etree from scrapy.exporters import CsvItemExporter from 阅读全文
posted @ 2022-11-28 08:55 不是霉蛋 阅读(472) 评论(0) 推荐(0) 编辑
03. 淘宝
摘要:csv 存储 阅读全文
posted @ 2022-11-19 23:51 不是霉蛋 阅读(17) 评论(0) 推荐(0) 编辑
02. 百度翻译
摘要:百度翻译 import requests import os import jmespath class Baidu: headers = { "Cookie": "APPGUIDE_10_0_2=1; REALTIME_TRANS_SWITCH=1; FANYI_WORD_SWITCH=1; HI 阅读全文
posted @ 2022-11-19 23:41 不是霉蛋 阅读(491) 评论(0) 推荐(0) 编辑
01. 有道翻译
摘要:有道翻译 popen import os import time import random import requests from loguru import logger class Youdao: headers = { "Cookie": "OUTFOX_SEARCH_USER_ID_NC 阅读全文
posted @ 2022-11-19 23:38 不是霉蛋 阅读(100) 评论(0) 推荐(0) 编辑
<2> AES
摘要:var CryptoJS = CryptoJS || (function (Math, undefined) { var C = {}; var C_lib = C.lib = {}; var Base = C_lib.Base = (function () { function F() { }; 阅读全文
posted @ 2022-11-12 00:00 不是霉蛋 阅读(114) 评论(0) 推荐(0) 编辑
<1> md5
摘要:var n = function(e, t) { return e << t | e >>> 32 - t } , r = function(e, t) { var n, r, i, o, a; return i = 2147483648 & e, o = 2147483648 & t, n = 1 阅读全文
posted @ 2022-11-11 23:45 不是霉蛋 阅读(7) 评论(0) 推荐(0) 编辑
<2> 滑块验证码距离识别
摘要:import io import cv2 import numpy as np from PIL import Image class DetectDistanceXY: def detectDistanceX(self, imgSlider, imgBackground): """X坐标缺口检测" 阅读全文
posted @ 2022-11-10 20:50 不是霉蛋 阅读(94) 评论(0) 推荐(0) 编辑
<1> 题目1:抓取所有(5页)机票的价格,并计算所有机票价格的平均值
摘要:"""题目1:抓取所有(5页)机票的价格,并计算所有机票价格的平均值oo0O0()函数返回值 > '' eval(atob(window['b'])[J('0x0', ']dQW')](J('0x1', 'GTu!'), '\x27' + mw + '\x27')); # atob(window[' 阅读全文
posted @ 2022-11-10 18:21 不是霉蛋 阅读(34) 评论(0) 推荐(0) 编辑
<6> 简易分布式
摘要:# produce端from loguru import logger from redis import StrictRedis class QuotesProduce: name = "start_urls" def __init__(self): self.redis_cli = Strict 阅读全文
posted @ 2022-11-07 20:19 不是霉蛋 阅读(15) 评论(0) 推荐(0) 编辑
<5> 分布式实现
摘要:1 """ 2 配置 redis 3 安装 pip3 install scrapy-redis 4 修改scrapy项目(先正常实现scrapy爬虫): 5 """ 6 7 # 1 导入分布式爬虫类 8 from scrapy_ redis.spiders import RedisSpider, R 阅读全文
posted @ 2022-11-07 20:14 不是霉蛋 阅读(26) 评论(0) 推荐(0) 编辑
<4> node.js----express服务
摘要:/* express的服务器 */ // 1. 导入express const express = require('express'); const bodyParser = require('body-parser'); // 2. js文件导入 const aesEncrypt = requi 阅读全文
posted @ 2022-11-05 22:49 不是霉蛋 阅读(18) 评论(0) 推荐(0) 编辑
<3> os.popen()获取js结果
摘要:# 访问js文件,获取结果 def decrypto(self, data: str): # 加密字符串 import os with os.popen("node js文件 {}".format(data)) as p: return p.read().strip() # js文件下(弊端:会造成 阅读全文
posted @ 2022-11-04 15:12 不是霉蛋 阅读(47) 评论(0) 推荐(0) 编辑
<1> 输入型验证码
摘要:# 直接识别验证码# pip install ddddocrfrom loguru import logger from ddddocr import DdddOcr ocr = DdddOcr() with open('尖叫登录验证码.png', 'rb')as f: img = f.read() 阅读全文
posted @ 2022-11-04 07:05 不是霉蛋 阅读(24) 评论(0) 推荐(0) 编辑
<2> 线程池---ThreadPoolExecutor
摘要:1 import time 2 from concurrent.futures import ThreadPoolExecutor, as_completed, ProcessPoolExecutor 3 4 5 class Spider: 6 7 executor = ThreadPoolExec 阅读全文
posted @ 2022-11-03 15:28 不是霉蛋 阅读(37) 评论(0) 推荐(0) 编辑
<1> flask服务
摘要:import flask app = flask.Flask(__name_, static_folder='static', template_folder='templates') @app.route("/") def index(): return flask.render_temp1ate 阅读全文
posted @ 2022-11-02 22:53 不是霉蛋 阅读(13) 评论(0) 推荐(0) 编辑
<4> pipeline
摘要:"""scrapy 保存管道数据""" from scrapy.exporters import CsvItemExporter class CsvPipeline: def __init__(self): # 文件存储初始化操作 self.file = open('filename.csv', ' 阅读全文
posted @ 2022-11-02 16:30 不是霉蛋 阅读(37) 评论(0) 推荐(0) 编辑
<3> MongoDB存储
摘要:from pymongo import MongoClient class Spider(object): def __init__(self): # 将数据存储到数据库中 try: self.client = MongoClient('localhost', 27017) self.sina_db 阅读全文
posted @ 2022-11-02 16:20 不是霉蛋 阅读(18) 评论(0) 推荐(0) 编辑
<2> MySQL存储
摘要:import mysql.connector """数据模型类""" class QingHuaModel(object): def __init__(self, title, time, contents): self.title = title self.time = time self.con 阅读全文
posted @ 2022-11-02 16:14 不是霉蛋 阅读(18) 评论(0) 推荐(0) 编辑
<1> csv 存储
摘要:"""方式一(scrapy下):""" scrapy crawl 爬虫名 -o 保存的csv文件名 """方式二(常用):""" from scrapy.exporters import CsvItemExporter class CsvPipeline: def __init__(self): # 阅读全文
posted @ 2022-11-02 16:08 不是霉蛋 阅读(30) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示