cefsharp

CefSharp Javascript registration and execution is not working in Release 79.1.36

China☆狼群 提交于 2020-06-29 04:27:21
问题 I tried to upgrade CefSharp from Version 69.0.0.0 to 79.1.36. I could not get the Javascript interaction working. The registration changed from this.Browser.RegisterJsObject to this.Browser.JavascriptObjectRepository.Register according to https://github.com/cefsharp/CefSharp/issues/2990. When I execute EvaluateScriptAsync, I get a response back with Status Canceled. Trying to understand how to implement it correctly, I examined the CefSharp.WpfExample and noticed that the Javascript

i cant watch youtube livestreams in CefSharp (ChromiumBrowser)

本小妞迷上赌 提交于 2020-06-29 03:38:30
问题 as I have said in my last post I am working on a CefSharp Browser and I encountered a problem when I try to watch a Livestream it comes up with this error "Your browser does not currently recognize any of the video formats available. Click here to visit our frequently asked questions about HTML5 video." is there any way I can fix this error I'm trying to make my browser feature-packed and would really appreciate the help. 来源: https://stackoverflow.com/questions/62316486/i-cant-watch-youtube

c# cefsharp browser trying to set proxy [closed]

送分小仙女□ 提交于 2020-06-08 19:11:11
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I'm not very good with CefSharp browsers so I need some outside help on this. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using

CefSharp get a part from a Source Code of a selected/active element

半腔热情 提交于 2020-06-01 07:40:09
问题 Hello everyone 😊 and already thanks in advance! I need to somehow get only a part of a loaded Website Source Code (Picture point 2) by hovering (if not possible I would also be happy with a mouse click) over an element (Picture point 1) . I know it sounds maybe weird because the DevTool does it already really nice with just a click (Picture point 3) . But if possible I would like to only read out the inner- and outer-HTML (whichever I need in the moment) the part which is active/selected.

Cefsharp RequestHandler can't catch all the incoming request

China☆狼群 提交于 2020-06-01 07:38:28
问题 I encountered a strange problem when using cefsharp. The browser accessed Twitter and automatically scrolled to the bottom to load new posts. There should be many requests, but the Function GetResourceRequestHandler didn't capture any requests, and the function wasn't called at all. Using the same class to capture Pinterest, requests can be captured, including XHR. The link to visit Twitter is https://twitter.com/HanamuraAsuka You can see many XHR requests in chrome's develop tool, such as

CEF sharp browser wait till website fully loaded

青春壹個敷衍的年華 提交于 2020-05-30 08:04:27
问题 I am using CEFsharp browser and determine the page finish loading with LoadingStateChanged event but it fires many times. I need it to fire only once the page has fully loaded, how can this be done? private async void Browser_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e) { if (!e.Browser.IsLoading) { await Task.Run(async () => { await Task.Delay(3000); }); try { MessageBox.Show("Page has been loaded"); } catch (Exception ex) { } } } 回答1: For those interested, I use (a

How to include VC++ Redistributable Files Needed by CEFSharp

别等时光非礼了梦想. 提交于 2020-05-29 08:18:27
问题 Building an application using the CEFSharp browser, works fine on my machine, but crashes on the server with the following error: System.IO.FileLoadException: A procedure imported by 'CefSharp.Core.dll' could not be loaded. I’ve seen this problem all over the internet, and the most common solution seems to be installing the VC++ Redistributable. However, I don’t have that access on our production server. In the development server, I tried installing the redistrituable (x86, x64, 2017, and

Cefsharp Oncontextmenucommand Get Menu Label

房东的猫 提交于 2020-04-17 22:05:56
问题 Alright so I have this code in my program to add menu items in context menu and perform action when they are clicked Private Sub IContextMenuHandler_OnBeforeContextMenu(browserControl As IWebBrowser, browser As IBrowser, frame As IFrame, parameters As IContextMenuParams, model As IMenuModel) Implements IContextMenuHandler.OnBeforeContextMenu ''Add new custom menu items model.AddItem(DirectCast(Copy, CefMenuCommand), "Copy Link Address") model.AddItem(CType(26504, CefMenuCommand), "Display

CefSharp.WinForms.ChromiumWebBrowser custom right context menu

瘦欲@ 提交于 2020-04-11 17:28:06
问题 I'm using CefSharp.WinForms.ChromiumWebBrowser v41.0.1 in my project. When I right click into webbrowser, default right context menu only have a few items. I want to customize it's right context menu, e.g add Reload function... But I can't find any way to do that. Somebody help me? 回答1: Unfortunately that feature is no available in the current release version ( 41.0.1 ). A PR was merged recently that adds that functionality. https://github.com/cefsharp/CefSharp/pull/1219 It will be available

.net 爬虫框架技术选型

ε祈祈猫儿з 提交于 2020-03-26 06:36:08
个人认为爬虫框架分抓取框架和分析框架 1)抓取框架 .net 市面上好的似乎不多,选择要素分两种:1.轻量型,2.重量型。 1. 轻量型是可以定制一些特殊的功能或者插件开关形式。总体性能高,速度快。 自己写的webclient,httprequest,httpclient等。或者直接socket编写! 2. 重量型是可以基本模式浏览器,更加傻瓜化,也基本屏蔽了一些反爬虫机制。 如webbrower或者其他的webkit浏览器内核封装的.net框架。 如:https://github.com/cefsharp/CefSharp ( .NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework ) 抓取的特殊功能包括:cookie支持(默认),301自动跳转,https默认支持,gzip等压缩默认支持,自动多种方式识别编码,默认模拟浏览器header,模拟css和js执行等等。 当然越是功能强大,性能越差些,但是适应各种情况的能力越强(反爬虫能力),轻量型和重量型适应的抓取场景也都不一样。 如: 携程的高级手法 技术选择: HttpHelper(作者是收费的,看了源码,其实功能也不强大;自己也能做,只是原来写的http框架源码没了,急着用暂时用下) scrapysharp