Which library is best used to initialize the browser and then intercept cookies and modify them (as well as save to json)? Standard Webrequest or better CefSharp? You can examples of the implementation of such a task)

Roughly speaking, I need to insert the browser into WinForms, log in manually, then the program body goes without using visualization.

  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky
  • And what do you see the shortcomings of one or the other? What you can not do? - VladD
  • @VladD "And what do you see the shortcomings of one or the other?" - it seems to me that it’s like “The Knight at the Crossroads”. TC still did not go on any of the roads. so he asks which one to choose. - Stack

1 answer 1

using System.Windows.Forms; var f = new Form(); var b = new WebBrowser() { Parent=f, Dock=DockStyle.Fill, ScriptErrorsSuppressed=true }; b.Navigated += delegate { // вывести полученные cookie Console.WriteLine(b.Document != null ? b.Document.Cookie : "null"); }; b.Navigate("http://stackoverflow.com"); f.ShowDialog();