05-18-2023, 12:10 PM
Hi Gintaras,
I seem to be addicted to using LA to crawl web resources. May I have some questions?
1.How to make exe with LA? I've reviewed the instructions(Cookbook) in detail but still don't have a general idea.
2.How to terminate the scripts which are running at one mouse click? It's that possible to run the scripts background (Without opening LA).
3.Why does finding elements by xpath work for some elements and not for others? In the following example, I found the xpath successfully, but when I run it, I get a ”System.NullReferenceException: Object reference not set to an instance of an object. ” Please help me check it where was the problem?
Thank you so much!
I seem to be addicted to using LA to crawl web resources. May I have some questions?
1.How to make exe with LA? I've reviewed the instructions(Cookbook) in detail but still don't have a general idea.
2.How to terminate the scripts which are running at one mouse click? It's that possible to run the scripts background (Without opening LA).
3.Why does finding elements by xpath work for some elements and not for others? In the following example, I found the xpath successfully, but when I run it, I get a ”System.NullReferenceException: Object reference not set to an instance of an object. ” Please help me check it where was the problem?
Thank you so much!
/*/ nuget -\HtmlAgilityPack; /*/
using HtmlAgilityPack;
script.setup(trayIcon: true, sleepExit: true);
var web = new HtmlWeb();
for (;;) {
var doc2 = web.Load("https://www.toutiao.com/");
var title = doc2.DocumentNode.SelectSingleNode("/html/body/div[1]/div/div[5]/div[2]/div[2]/div/div/div/ol/li[1]/a").InnerText;
osdText.showTransparentText($"{title}");
20.s();
}