Skip to content

Commit

Permalink
fixes output and changes download sheme to https
Browse files Browse the repository at this point in the history
  • Loading branch information
joestr authored Jul 14, 2020
1 parent 587b4c1 commit f28204f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions downloader.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$mainUri = "http://www.iconarchive.com/show/papirus-apps-icons-by-papirus-team.%page%.html"
$pageRange = 5..29
$pageRange = 1..29
$iconsPerPage = 50
$filesPerIcon = 4

Expand All @@ -11,17 +11,17 @@ $pageRange | ForEach-Object {
$currentUri = $mainUri -replace '%page%',$currentPage

# Get the HTML of the page.
$currentPage = Invoke-WebRequest -Uri $currentUri
$currentPageHtml = Invoke-WebRequest -Uri $currentUri

# Set counters
$iconCounter = 1
$fileCounter = 1

$links = (
$currentPage.ParsedHtml.getElementsByTagName('a') |
$currentPageHtml.ParsedHtml.getElementsByTagName('a') |
Where-Object {
$_.href -match "^about:/download/" -or
$_.href -match "^http://icons.iconarchive.com"
$_.href -match "^https://icons.iconarchive.com"
}
)

Expand Down

0 comments on commit f28204f

Please sign in to comment.