Skip to content

Commit

Permalink
Fixed several scraper bugs and missing option in GUI (javinizer#353) (j…
Browse files Browse the repository at this point in the history
…avinizer#349)

(javinizer#346)

Signed-off-by: Seeyabye <seeyabye91@gmail.com>
  • Loading branch information
seeyabye committed Feb 15, 2023
1 parent 5ddbdcf commit ca74ed0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Javinizer/Private/Scraper.Jav321.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function Get-Jav321CoverUrl {

process {
try {
$coverUrl = ((($Webrequest | Select-String -Pattern '"/snapshot/(.*)/\d/0"><img class="img-responsive" src="(.*)"').Matches.Groups[2].Value -split '" onerror')[0] -split '"></a>')[0].Trim()
$coverUrl = ((($Webrequest | Select-String -Pattern '"/snapshot/(.*)/\d/0"><img class="img-responsive" max-width="100%" src="(.*)"').Matches.Groups[2].Value -split '" onerror')[0] -split '"></a>')[0].Trim()
} catch {
return
}
Expand All @@ -221,13 +221,13 @@ function Get-Jav321ScreenshotUrl {

try {
$screenshotUrl = (($Webrequest | ForEach-Object { $_ -split '\n' } |
Select-String -Pattern '<a href="\/snapshot\/(.*)\/(.*)\/(.*)"><img class="img-responsive" src="(.*)"') -split "src=\'" |
Select-String -Pattern '<a href="\/snapshot\/(.*)\/(.*)\/(.*)"><img class="img-responsive" max-width="100%" src="(.*)"') -split "src=\'" |
Select-String -Pattern "(https:\/\/www.jav321.com\/digital\/video\/(.*)\/(.*).jpg)(.*)<\/a>").Matches |
ForEach-Object { $_.Groups[1].Value }
} catch {
try {
$screenshotUrl = (($Webrequest | ForEach-Object { $_ -split '\n' } |
Select-String -Pattern '<a href="\/snapshot/(.*)\/(.*)\/(.*)"><img class="img-responsive"') -split 'src="' |
Select-String -Pattern '<a href="\/snapshot/(.*)\/(.*)\/(.*)"><img class="img-responsive" max-width="100%"') -split 'src="' |
Select-String -Pattern '(https:\/\/www.jav321.com\/\/images\/(.*)\/(.*)\/(.*)\/(.*).jpg)"><\/a><\/p>').Matches |
ForEach-Object { $_.Groups[1].Value }
} catch {
Expand Down
1 change: 1 addition & 0 deletions src/Javinizer/Private/Scraper.Javbus.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ function Get-JavbusScreenshotUrl {
$screenshots = ($Webrequest -split '<a class="sample-box"')
$screenshots = $screenshots[1..$screenshots.Count] | ForEach-Object { ($_ | Select-String -Pattern 'href="(.*)"><div class=').Matches }
$screenshotUrl += ($screenshots | ForEach-Object { if ($_.Groups[1].Value -match '"') { ($_.Groups[1].Value -split '"')[0] } else { $_.Groups[1].Value } })
$screenshotUrl = $screenshoturl | ForEach-Object { if ($_ -notmatch 'http') { 'https://www.javbus.com' + $_ } else { $_ } }
} catch {
return
}
Expand Down
2 changes: 2 additions & 0 deletions src/Javinizer/Universal/Repository/javinizergui.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ $formatStringSettings = @(

$sortSettings = @(
'sort.movetofolder',
'sort.renamefolderinplace'
'sort.renamefile',
'sort.movesubtitles',
'sort.create.nfo',
Expand Down Expand Up @@ -3546,6 +3547,7 @@ $Pages += New-UDPage -Name "Settings" -Content {
foreach ($setting in $sortSettings) {
$sortTooltip = switch ($setting) {
'sort.movetofolder' { 'Specifies to move the movie to its own folder after being sorted' }
'sort.renamefolderinplace' { 'Specifies to rename folder in-place without moving files' }
'sort.renamefile' { 'Specifies to rename the movie file after being sorted' }
'sort.movesubtitles' { 'Specifies to automatically move subtitle files with the movie file after being sorted' }
'sort.create.nfo' { 'Specifies to create the nfo file when sorting a movie' }
Expand Down
Loading

0 comments on commit ca74ed0

Please sign in to comment.