Search code examples
c#htmlbrowserscreen-scrapingcefsharp

C# Grab HTML from a Browser Window


I want be able to somehow, get access of a open Webbrowser (like Chrome or Firefox) and Grab the HTML text from it. Then Load this HTML in my C# program and read important stuff out of it. and this should happen once a second.

The reason why i need to go this unusual way is, i cant use the webbrowser that is integratet in WPF because the website i want to parse says that the browser is to old. The CEFSharp Webbrowser works in 99% of all cases really fine and i am doing this currently with this browser BUT it cant handle an incoming H.264 Webcamstream witch is a red flag.

so i have no idea how i can force the cefbrowser to my 100% usability. that is why i need desperately i tipp or a hint from you guys ho i could grab the HTML text from my chrome browser.

thank you for your help =)


Solution

  • The Best approach i had is selenium. i use the chromewebdriver to start a chrome browser and from this i can get my stuff.