Why I'm using the complete Chrome browser inside of my bot.

Why I'm using the complete Chrome browser inside of my bot.

This article is a progress report and explanation on the current state of my Site-Checking bot. t.me/siteseer_bot

Current Working : Gets webpage body via GET request and hashes it. It then compares hashes to check if the website changed.

Problem : Does not work for dynamically generated websites like Google where the scripts and styles are generated on run-time. This will fool the bot into thinking that the site has changed.

Solution : Here's where the title comes in. The only solution is to use Puppeteer inside my bot, which will allow me to take screenshots of the page and compare them, or, I use the innerText command, which requires a layout engine to be present, provided by Puppeteer.

Puppeteer is a headless version of chrome provided for this exact function, kind of like Selenium on Java, Python.

In closing, I will probably be testing out both the possible solutions in the coming days, and deploy whichever works out best. My bot is very much becoming an Open Source version of visualping.io by now.

Bye !

Rahul Lamba

Proprietor @ Valhalla Tactical India

5 年

what was the result of the tests? curious to know.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了