I’ve been working on this project for a good time now, and while I’ve found some solutions using PowerShell scripts, none of them have worked for me as I don’t know PowerShell!


The gist of this project is that I have a long list of service tags. Some are Dell, some are Cisco, some are HP, and some are Levono. After looking around for API’s and PowerShell scripts but not knowing how to implement them into my C# project, I resorted to using Selenium on this website: http://www.lookupwarranty.com/
However, this one only worked for Dell, and wouldn’t give me an output half of the time, so I moved to using Selenium on the actual websites by these companies. After spamming enough service tags through their websites, I started to get errors since the websites would start to check for a bot (and mine couldn’t work around that).
So, with all of these solutions not working for me, does anyone here have any ideas on a possible solution to this? It has to be through some form of C# implementation since I’m using this in an ASP.NET Core App that will be published as a data importing and sorting tool onto an Azure server.
Short of getting access to an API or some kind of tools from the companies, I don’t think you’re going to find a reliable implementation.
If you’re running into anti-bot measures, it’s very likely that’s because they charge money for access to tools that do this as part of service plans. Whether we agree with the ethics, it’s likely you’ve agreed to a EULA that you won’t attempt to do what you’re doing and automate their free sites instead of paying for the service plans.
Worse, they’re already trying to stop you. You might find a solution today, rework your application to use that new approach, then find out two weeks from now some new anti-bot behavior thwarts your new work. It’s cat-and-mouse and will likely be a continuing burden for you.
The cat and mouse example sums up what I’m running into perfectly. I’ll have to give each of these companies a call and see what I can figure out I guess!
Also, let me know if any more information is needed!
My favorite way to web scrape is to use PuppeteerSharp and Html Agility Pack. Selenium is meant for automating browsers for testing. I’ve looked at Selenium before and found it to be kind of cumbersome, especially when compared with the packages I mentioned. The nice thing about PuppeteerSharp is it uses a headless version of Chrome for the browser. Simplifies things quite a bit.


Any idea if PuppeteerSharp’s headless version of Chrome help prevent against bot-checking on these websites?
C# devs
null reference exceptions

source