当前位置:网站首页>一个小工具可以更快的写爬虫
一个小工具可以更快的写爬虫
2022-06-28 07:08:00 【somenzz】
你好,我是 somenzz,我想你应该写过爬虫吧,就是那个 requests 库,它太好用了,应该没有人不知道 requests。
通常我们使用谷歌浏览器的开发者工具(F12)查找网络请求,然后将网络请求里面的 url、headers、cookie、user-agent、请求的参数等等,记录下来,然后,用 requests 模拟浏览器发出的请求。
这些简单无脑复制操作,让我觉得写爬虫真的累,有没有一个工具,可以直接把这个请求转化为 Python 代码?
还真有!
那就是 curlconverter[1]

用法很简单:

以谷歌浏览器为例:
1、在「开发者工具」中打开「Network」选项卡
2、右键单击(或按住 Ctrl 键单击)请求
3、点击 "Copy" → "Copy as cURL"
4、将其粘贴到上面的 curl 命令框中
选择需要转换语言(默认就是 Python),就可以复制代码了,非常方便:

最后的话
这个工具真是相见恨晚,可以大大节省你写爬虫花费的时间,请记住网址是:https://curlconverter.com/,如果觉得有帮助,请点在看扩散,如果有好的工具,也可以留言分享。

[1]
curlconverter: https://curlconverter.com/
边栏推荐
猜你喜欢

Wechat applets - basics takes you to understand the life cycle of applets (I)

代码没写错,渲染页面不显示原因

Vivo browser rapid development platform practice - Overview

声网 VQA:将实时互动中未知的视频画质用户主观体验变可知

Top 25 most popular articles on vivo Internet technology in 2021

Recommend several 0 code, free, learning and using visualization tools

Principle and practice of bytecode reference detection

MySQL installation steps - how to create a virtual machine under Linux (1)

FPM tool installation

最后的二十九天
随机推荐
KMP string
Last 29 days
extern “C“概述
What if the applet page is set to 100% height or left blank?
MySQL installation steps - Linux configuration file JDK installation (II)
普歌--三大基础排序,冒泡·选择·快速
VM332 WAService. js:2 Error: _ vm. Changetabs is not a function
QT -- 通讯协议
Rn7302 three-phase electric quantity detection (based on STM32 single chip microcomputer)
The practice of traffic and data isolation in vivo Reviews
The code is correct, and the rendering page does not display the reason
Freeswitch uses origin to dialplan
实现这个 issue 得700块钱人民币,有人做嘛?
Jetpack - defects of livedata component and Countermeasures
【Rust翻譯】從頭實現Rust异步執行器
Singleton singleton mode
Batch import of pictures into WPS table by date
Causes of wechat applet compilation page blank bug
Extern "C" overview
4~20ma input /0~5v output i/v conversion circuit