Javinizer
Javinizer copied to clipboard
jav321 screenshots not grabbing - Solution
As of recent, jav321 scrapes are not grabbing the screenshot url.
Reason: Jav321 added more code into the screenshot html. max-width="100%"
Add this code into Scraper.Jav321.ps1 in /PRIVATE
example:
function Get-Jav321CoverUrl {
param (
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
[Object]$Webrequest
)
process {
try {
$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
}
Write-Output $coverUrl
}
}
function Get-Jav321ScreenshotUrl {
param (
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
[Object]$Webrequest
)
process {
$screenshotUrl = @()
try {
$screenshotUrl = (($Webrequest | ForEach-Object { $_ -split '\n' } |
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" max-width="100%"') -split 'src="' |
Select-String -Pattern '(https:\/\/www.jav321.com\/\/images\/(.*)\/(.*)\/(.*)\/(.*).jpg)"><\/a><\/p>').Matches |
ForEach-Object { $_.Groups[1].Value }
} catch {
return
}
}
Write-Output $screenshotUrl
}
}