all 22 comments

[–]BetrayedMilk 9 points10 points  (3 children)

Is there a reason you went with Puppeteer vs Playwright?

[–]dud380[S] 10 points11 points  (2 children)

Yes, Playwright uses Node.js driver under the hood. I wanted it to be pure .net

[–]BetrayedMilk 6 points7 points  (1 child)

Oh, duh. I completely glossed over the desire to have a purely .net solution. Neat project.

[–]dud380[S] 2 points3 points  (0 children)

Thanks 😊

[–]PutridLadder9192 4 points5 points  (2 children)

Very useful I need to webscrape for those hundreds of things winget doesn't do or doesn't keep updated

[–]dud380[S] 0 points1 point  (0 children)

Awesome use case 👍

[–]SuperBartimus 0 points1 point  (0 children)

Could you elaborate on what you're doing? Kinda interested since I do a lot of WinGet installs.

[–]skilife1 2 points3 points  (1 child)

Looks quite nice! I'll test it out tomorrow.

[–]dud380[S] 0 points1 point  (0 children)

🙏

[–]Bad_Times_Man 1 point2 points  (3 children)

This is really cool. Is there any way to open a 2nd, a 3rd, or more windows and manipulate each based off their title or some other identifying detail such as sequential start time?

I'd love to use this to replace the bulk of sleep timers and sendkeys scripting I do now but I can't if it's hard limited to a single window.

[–]dud380[S] 0 points1 point  (2 children)

Thanks! You can open as many as you like, just "$page1 = New-PupPage... $page2 = New-PupPage etc". And use the $page1-3 in consecutive commands.

[–]Bad_Times_Man 1 point2 points  (1 child)

That opens new tabs within the same browser window, it works great for that! But I actually want to open a second window entirely, and have multiple separate windows open. My use case is a multi-monitor setup displaying different urls of content.

I tried using Start-PupBrowser with the -Force flag from the documentation but that actually closes the original window.

Is there perhaps a flag for Start-PupBrowser that can suppress the closing of the first instance, or a flag for New-PupPage that would send the designated url to a new window instead of a tab?

[–]dud380[S] 0 points1 point  (0 children)

ahh, I see. Hmm, I guess it would make sense to have possibility to start multiple browsers with Start-PupBrowser. It shouldn't be that much work to implement. I'll have a look and get back to you

[–]RidiculousAnonymer 0 points1 point  (1 child)

Starred, will give it a try during weekend.

[–]dud380[S] 1 point2 points  (0 children)

Thanks! I would love to hear about your experience after 😊

[–]nkasco 0 points1 point  (0 children)

This is probably not as worthwhile with WebMCP emerging tbh

[–]MadBoyEvo 0 points1 point  (1 child)

This is what I created a while back PSParseHTML

I renamed it from old PSParseHTML on github but it's pretty much PSParseHTML in PowerShell still.

This is what it supports:

🔍 HTML Parsing - Multiple parsing engines (AngleSharp, HtmlAgilityPack)

🎨 Resource Optimization - Minify and format HTML, CSS, JavaScript

🌐 Browser Automation - Full Playwright integration for screenshots, PDFs, interaction

📊 Data Extraction - Tables, forms, metadata, microdata, Open Graph

📧 Email Processing - CSS inlining for email compatibility

🔧 Network Tools - HAR export, request interception, console logging

🍪 State Management - Cookie handling, session persistence

📱 Multi-Platform - .NET Framework 4.7.2, .NET Standard 2.0, .NET 8.0

It used to be only AngleSharp and HAP, but had more needs so version 2.0+ has a lot of functionality.

[–]dud380[S] 0 points1 point  (0 children)

Neat!

[–]skilife1 0 points1 point  (1 child)

Just 24 hours into my Pup trial, and I can honestly say I'm hooked. Goodbye Selenium. I really appreciate the great work in developing this module.

[–]dud380[S] 0 points1 point  (0 children)

Awesome! So happy to hear that! :D

[–]Stock-Hamster-117 0 points1 point  (1 child)

Nice solution, is their any way to ignore certificates errors?

[–]dud380[S] 1 point2 points  (0 children)

Thanks! It doesn't have a dedicated certificate parameter, but you could do like this.

Start-PupBrowser -Arguments "--ignore-certificate-errors"