当前位置:网站首页>IP池设计思考(面试点)[通俗易懂]
IP池设计思考(面试点)[通俗易懂]
2022-07-30 10:30:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
IP池设计思考(面试点)
面试中IP代理池的几个问题:
- IP怎么剔除的 通过设置失败次数, 超过失败次数就会删除, 可以自定义失败次数.
- 免费代理多久抓取一次 10min抓取一次, 代码实现可在ProxyRefreshSchedule.py中查看。每过10min就去目标网站抓取一次。有些网站不更新,当然如果是自己买的IP代理不用考虑代理不会更新的情况,因为买的IP数量应该是足够的。
- 怎么接入自己的代理设置 在GetFreeProxy类中(该文件在ProxyGetter文件夹中), 添加自己的静态方法, 扩展自己的代理.扩展的IP可以是免费代理,也可以是购买的IP代理。
- 代理多久验证一次 每五分钟,ProxyValidSchedule.py文件中可以查看。每过5min就会检测现有的可用的代理的情况。将不符合的代理剔除掉。剔除的原理是一次检测不成功就会剔除,当然也可以设置10次,100次等。
- 新代理检测频率 每一分钟检测一次, 先将获取的代理保存在数据库里面名为raw_proxy, 然后将该代理每1min检测一次, 检测成功的放入userful_proxy, userfull_proxy是每5min检测一次.
- API接口怎么实现的 通过flask, 在本地实现的接口.将数据库里面的代理提取出来。
- get是随机获取一个IP
- delete是删除指定的IP
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/129461.html原文链接:https://javaforall.cn
边栏推荐
- PyQt5 - draw sine curve with pixels
- 数据库事务,JDBC操作和数据类型
- Adaptive Control - Simulation Experiment 1 Designing Adaptive Laws Using Lyapunov's Stability Theory
- wsl操作
- Security tip: FreeType in Qt
- 易基因:人类tRNA基因位点表现出与衰老相关的DNA高甲基化|研究文章
- 软考 系统架构设计师 简明教程 | 系统运行与软件维护
- The thread pool method opens the thread -- the difference between submit() and execute()
- If someone asks you about distributed transactions again, throw this to him
- WebAPI 复习
猜你喜欢
Container Technology - A Simple Understanding of Kubernetes Objects

360发布面向未来的EDR,全方位守护政企用户终端安全

第2章 常用安全工具

Re16: Read the paper ILDC for CJPE: Indian Legal Documents Corpus for Court Judgment Prediction and Explanation

Re21: Read the paper MSJudge Legal Judgment Prediction with Multi-Stage Case Representation Learning in the Real

If someone asks you about distributed transactions again, throw this to him

TestNg整合Retry代码

线上靶机prompt.ml

360 released a future-oriented EDR to protect the security of government and enterprise user terminals in an all-round way

自适应控制——仿真实验一 用李雅普诺夫稳定性理论设计自适应规律
随机推荐
从数据流中快速查找中位数
在机器人行业的专业人士眼里,机器人行业目前的情况如何?
In 2022, the top will be accepted cca shut the list
OC - Manual Reference Counting Memory Management
Array of Shell System Learning
typescript入门之helloworld
Neural Network Study Notes 4 - Autoencoder (including sparse, stacked) (updated)
Nacos configuration in the project of battle
论文阅读:SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
【C和指针第七章】可变参数列表
jmeter接口压力测试-(二)
The method of parameter passing
Drag and drop events, dataTransfer, getBoundingClientRect
@RequestBody 和 @ResponseBody 详解
Telerik2022 R2,有效的自动化测试
JCL 学习
Mysterious APT Attack
4. yolov5-6.0 ERROR: AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor' solution
OC-关于alloc和dealloc(还没开始写)
系统设计精选 | 基于FPGA的CAN总线控制器的设计(附代码)