hlaueriksson / puppeteer-sharp-contrib Goto Github PK
View Code? Open in Web Editor NEWContributions to the Headless Chrome .NET API ππ§ͺ
License: MIT License
Contributions to the Headless Chrome .NET API ππ§ͺ
License: MIT License
Methods like Id can be extremely dangerous. The Result
method is used in Parallel Libraries, and it should never be used in async code. Result
will deadlock the code in many circumstances, and I think in that code it would even fail if the task was not resolved yet.
There are many posts about this, here's one https://montemagno.com/c-sharp-developers-stop-calling-dot-result/
Great job with this library :)
Hey it would be nice to add installation guide for guys new to C# (like me) π₯
Why can't my innerText get the text, run directly, the program is stuck, quick check, prompt: item.InnerText () The function evaluation requires all threads to run. String
await page.EvaluateExpressionAsync("document.querySelector(\"input[name='q']\").value=''");
await page.TypeAsync("input[name='q']", w, new PuppeteerSharp.Input.TypeOptions { Delay = 5 });
await page.Keyboard.PressAsync("Enter");
await page.WaitForNavigationAsync();
await page.WaitForTimeoutAsync(1500);
var list = await page.QuerySelectorAllAsync("#webPhrase>p");
foreach (var item in list)
{
Console.WriteLine(item.InnerText());
}
Not sure when things changed but as of PuppeteerSharp v12 everything is done by interfaces ie IPage
and IBrowser
. This whole library is broken and not working as it targets the concrete objects of Page
etc.
e.g. ElementHandle eh = await page.QuerySelectorWithContentAsync("div> span", "Next");
results in:
error CS0012: The type 'ElementHandle' is defined in an assembly that is not referenced. You must add a reference to assembly 'PuppeteerSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
I had worked before updating PuppeteerSharp to version 3.0.0
Testet in .Net Framework 4.8
To make this a bit more extraordinary, I have this feature request.
In the ElementHandleExtensions class, within JS evaluation of the content regex
@"(element, selector, regex) => {
var elements = element.querySelectorAll(selector);
return Array.prototype.find.call(elements, function(element) {
return RegExp(regex).test(element.textContent);
});
}",``
Is it possible to extend the with a flag object RegExp(regex,flags), to pass modifiers like case-insensitive into the regex?
Cheers
Till
Curious if this can work in a Linux Container running .Net 6
Hi there, just want to ask if you guys have plan to add support like this?
https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.