• Python selenium chrome XPath element location


    For the problems encountered in trying to write selenium crawler in the past two days, I will give priority to attribute positioning for XPath positioning: I don’t recommend absolute path positioning at all. Relative path positioning can be written without writing. The stability of these two methods is very poor. A slight change in the […]

  • [selenium] drop-down scroll bar


    Article catalogue Three methods of selenium drop-down scroll bar 1、 Set scroll bar position 2、 JS window Scrollto() method 3、 Position elements to scroll Three methods of selenium drop-down scroll bar 1、 Set scroll bar position execute_ Script (“document. Documentelement. Scrolltop = location”) from selenium import webdriver import time driver = webdriver.Chrome() #Visit website driver.get(‘https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu&wd=%E5%86%AC%E5%A5%A5%E4%BC%9A&fenlei=256&rsv_pq=c61031d20000416d&rsv_t=34329gsBNwKJFQ%2Bmyc957YqRGPTtQjrdzsvJ%2Fpfwl4Dta6B4YxTZjnzxVE8&rqlang=cn&rsv_enter=1&rsv_dl=tb&rsv_sug3=13&rsv_sug1=15&rsv_sug7=101&rsv_sug2=0&rsv_btype=i&inputT=4248&rsv_sug4=4635’) […]

  • [selenium] anti shielding method


    Generally speaking, using selenium to visit a web site (taking chrome as an example) will haveChrome is being controlled by automated test softwareTips for Take Baidu as an example: from selenium import webdriver driver = webdriver.Chrome() driver.get(‘https://baidu.com’) Some websites will be blocked by detection and refuse access. Basic principle of detection: Detect the in the […]

  • Final solution to Chrome’s minimum font 12px limit


    I believe many website users will have such a problem. The default minimum font of chrome is 12px (the latest version of English also has this problem). This is designed by chrome to better display Chinese, but in this way, some superscript and subscript fonts will be too large, affecting the user experience. Before, I […]

  • Write a Chrome browser plug-in to remove advertisements from koa’s official documents


    Check the official documents of KOA and find that there are many Google advertisements. It’s very annoying to see the documents. Make a plug-in and delete it! Check the DOM and find that they are all inserted.google-auto-placedNodes, just delete these DOM nodes manifest.json { “manifest_version”: 2, “name”: “DeleteGoogleAdsEXT”, “version”: “1.0.0”, “Description”: “deleting a plug-in for […]

  • The ultimate solution to web page adaptation under Windows system


    The ultimate solution to web page adaptation in Windows system Article catalogue The ultimate solution to web page adaptation in Windows system preface 1、 Core idea? 2、 Use steps 1. Preparation of devicepixelratio tool class 2. Practical application summary preface Many novices will always encounter a “cancer” in the process of developing web pages – […]

  • Solve the problem that the higher version / 98 version of Chrome browser cannot manually add cookies locally, refresh cannot be retained, and the cookie item is red


    To solve the problem that samesite by default cookies in Chrome browser version 91 are removed, and that cross domain post requests in chrome cannot carry cookies After starting the project after going to work yesterday, Google browser automatically upgraded to version 98, because the previous project needed to manually add a cookie for local […]

  • Reptile notes (I)


    preface Website source code acquisition step code After mastering the basic syntax of python, I want to continue to learn some things of Python branches and practice my hands. I think of Python crawlers. This article almost only introduces the most basic steps to obtain the website source code. Website source code acquisition step 1. […]

  • The latest version 4.0 of chrome supports Greasemonkey script


    GreaseMokey(called oil monkey script in Chinese) it was just a plug-in of Firefox. It can be used to add some simple and useful small plug-ins to expand your browser’s function and experience. It is generally written in HTML + JavaScript, which is small and flexible. The very good news is,The latest version 4.0 of chrome […]

  • How to open webpage in Chrome browser of Linux system with Korean font overlapping garbled?


    How to use Chrome browser in Linux system to open webpage with Korean font overlapping garbled?, The Korean font of Google Chrome browser seems to be garbled. If you look at it carefully, you will find that the fonts overlap. The solution is as follows: 1. Turn on the terminal. 2. Installationadobe-source-han-sans-otc-fonts。 Input at the […]

  • HTML embedded WMP compatible with chrome and IE


    In fact, there are many corresponding writing methods, and the more common one is object + embed.But in the process of using, in XP SP3, the embedded tag is marked as x-mplayer 2, but strechtofit is invalid. It’s depressing~In win7, embed is marked as x-mplayer 2. It’s useless to write it directly in embed. You […]

  • What should I do when I enter the button in chrome address bar under Linux?


    Chrome has gradually become the best browsing tool in the Linux world. Recently, however, my chrome will get stuck when typing in the address bar. It’s very annoying. This article tells you how to solve this problem. The root of the problem is font rendering. If you’ve ever changed the system font, you’re likely to […]