It seems Webbrowser control in C# is more useful for scraping contents from websites and also for doing autologin and autoposting of contents.
Offline scraping will save more time. i-e In offline scraping, we crawl the website onetime and download all the webpages onetime. We can scrap the required contents from the downloaded pages at any number of times without worrying about network constraints.
But we have faced many issues in using webbrowser control for offline scraping.
After searching the net, I came to know that many people are facing similar issue.
Please find below the code which will solve the issue.
string partHtmlpage = "Your html page"
webBrowser1.AllowNavigation = true;
if (webBrowser1.Document != null)
{
webBrowser1.Document.OpenNew(true);
}
else
{
webBrowser1.Navigate("about:blank");
}
webBrowser1.Document.Write(partHtmlpage);
More Articles...
Shop at Rajamanickam.com | Birthday Gift Idea? | Hire me for $6 per Hour
Get 3 useful ebooks for Rs 99 in India and $5.99 globally
Get a 75% commission | ChatGPT and and Google Gemini for Beginners (Use Discount code QPT)
Search This Blog
Art of Talking to AI | Tech eBook | Dream Big | Listen to Dream Big
Today's Deals | Timesheet | Products | 3 ebooks for $5.99 / Rs 99 | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
Today's Deals | Timesheet | Products | 3 ebooks for $5.99 / Rs 99 | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
No comments:
Post a Comment