当前位置:网站首页>As a programming ape, do you really know how to operate Google browser
As a programming ape, do you really know how to operate Google browser
2022-06-09 18:45:00 【InfoQ】






1.Chrome Debug panel
(1) Common panels ( The location element in the crawler must use !)

- Position the small arrow button ( The first one on the left ): Choose Elements panel , And activate the button , You can locate the source code location of the corresponding element in the page , Or select the source code location to navigate to the corresponding element of the page .
- mobile phone -PC View switch button ( The second on the left ): Activate the button , Web pages can be found in pc Convert between website and mobile website . Because in the process of crawling , It's relatively easy to climb the mobile website , Therefore, you can switch the web page to mobile web page through this button to realize faster crawling operation .
- Elements panel ( Element panel ) This panel shows all the images after rendering HTML Source code , In the use of selenium When crawling a web page, you can find the location of each tag through these source codes , Attributes and other characteristics . what's more , double-click html Source code or on the right css, You can change the appearance of the web page , That is, you can debug static web pages .
- Console panel ( console panel ) Shortcut key :CTRL+~ This panel is used to display log information during web page loading , Including printing , Warning , Errors and other displayable information, etc . And it's also a js Interactive console .
- Sources panel ( Source code panel ) This panel is grouped by site , Store all the resources requested (html,css,jpg,gif,js etc. ). It is because this panel stores all the resources , So when debugging js when , The object code is found here . The panel also provides debugging button tools .
- Network panel ( Network panel )Network The panel records the details of the network request , Include request headers , Response head , The form data , Parameter information, etc ,
- Shortcut key small learning ( On the check page, enter !):CTRL+SHIFT+P Input javascript( You can directly select Disabled JavaScript Options ): You can block this website's JS Code , All of this site after refresh JS The code won't execute ! Input full: You can take screen shots ( Will cut off the whole page )
(2)Network panel ( Filtering requests and filtering data types in crawlers are required —— For example, filter out asynchronously loaded requests !)

- ALL: All requests
- XHR(XmlHttpRequest object js Generate ): js Dynamic load request
- JS: JS Code
- Css: style
- image: picture
- Media: Audio , video
- Font: typeface
- DOC: home page
- WS: WebSocket
- Hide data URLs: You can filter it out data Response
- Be careful :(1) Upper left corner Preserve log Options , If you check the , That is, it means that the data requested by the previous page is not cleared . such as : Log in to a web page , If this option is not checked , Because it belongs to a request before clicking login ; After clicking login, it belongs to another request . So there is no login information after clicking !
(3) To set breakpoints ( Reptile advanced medium JS Operations necessary for penetration !)
The first part : How to use !

The second part : Step by step commissioning !

The third part : Scope !

The fourth part : call Stack !
- Near the top of the sidebar is Call Stack( call Stack ) Panes . When code pauses at a breakpoint ,CallStack( call Stack ) The pane displays the execution path , In reverse chronological order , Bring the code to the breakpoint . This helps to understand where to execute now , How did it get here , Is an important factor in debugging .
- Call function chain , Now call the above function
2.Chrome Shortcut key
(1) Tab and window shortcuts ( a key : Commonly used !)
(2)Google Chrome Function shortcut

(3) Web Shortcut


3.In The End

边栏推荐
猜你喜欢

Do your filial duty to make an old people's fall prevention alarm system for your family

WSL attaching USB flash disk

Redis报错Field redisTemplate in xxx required a bean of type ‘org.x.RedisTemplate‘that can not be foud

CAM350检查gerber与钻孔文件

如何用高压差分探头测量差分信号

Three annotations, elegant implementation of micro service authentication

Inspur cs5280h raid scheme details

How to use wireless communication technology to optimize the fire water pipe network of iron and steel plant?

选择结构程序设计

QUIC会成为互联网传输的颠覆者吗?
随机推荐
Select structural programming
AD 删除尺寸标注
Redis basic and advanced
Some software I usually use
Golang基础(1)
C# 29. Textbox always shows the last line
C# 32. Select a network card from the static class implementation drop-down box
2022 中小企业数字化论坛召开 360 企业安全云发布全新升级
期货公司 开户,安全开户流程?
MySQL version driver problem
Twitter plans to provide musk with access to relevant databases as early as this week
【SOLIDWORKS-详细记录】测量方法、设置草图自动正视基准面、设置滚轮放大缩小方向、螺丝添加螺纹线等操作记录
20220603 how to query public IP
Golang基础(2)
3 个注解,优雅的实现微服务鉴权
Squeeze-and-Excitation Networks学习笔记
AD PCB画图注意点
C# 32. 静态类实现下拉框选择网卡
What is the difference between MySQL delete, truncate and drop
Database: data field change under high-speed parallel distribution
