Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/GHMerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ jobs:

- name: Install PSParseHTML Module
shell: pwsh
run: Install-Module -Name PSParseHTML -Force -Scope CurrentUser
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module -Name PSParseHTML -Force -Scope CurrentUser
Import-Module PSParseHTML -Force

- name: Run Merge-GHFidoData Script
id: merge_script
Expand Down
17 changes: 2 additions & 15 deletions Scripts/Export-GHEntraFido.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,10 @@ Function Export-GHEntraFido {
[string]$Url
)

if (-not ('HtmlAgilityPack.HtmlDocument' -as [type])) {
$dll = Get-ChildItem -Path $HOME -Recurse -Filter HtmlAgilityPack.dll -ErrorAction SilentlyContinue |
Select-Object -First 1

if (-not $dll) {
throw "HtmlAgilityPack.dll not found. Ensure the dependency is installed before running Export-GHEntraFido."
if (-not (Get-Module -Name PSParseHTML)) {
Import-Module PSParseHTML -ErrorAction Stop
}

Add-Type -Path $dll.FullName
}

$response = Invoke-WebRequest -Uri $Url -UseBasicParsing
$htmlContent = $response.Content

$htmlDocument = New-Object HtmlAgilityPack.HtmlDocument
$htmlDocument.LoadHtml($htmlContent)

# Fetch the webpage content
$response = Invoke-WebRequest -Uri $Url -UseBasicParsing
$htmlContent = $response.Content
Expand Down
Loading