diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index f262f475..1b3e0870 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.1.9] +### Added + - Parameter `OpenSettings` to open your settings file + - Parameter `Help` to display comment-based help for Javinizer usage + +### Fixed + - Single actress sames scraped from R18 with trailing space + ## [0.1.8] 12-8-2019 ### Changed - Various parts for compatibility with PowerShell Gallery releases diff --git a/src/Javinizer/Javinizer.psd1 b/src/Javinizer/Javinizer.psd1 index 0108858f..59002492 100644 --- a/src/Javinizer/Javinizer.psd1 +++ b/src/Javinizer/Javinizer.psd1 @@ -12,7 +12,7 @@ RootModule = 'Javinizer.psm1' # Version number of this module. - ModuleVersion = '0.1.8' + ModuleVersion = '0.1.9' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/src/Javinizer/Private/Get-AggregatedDataObject.ps1 b/src/Javinizer/Private/Get-AggregatedDataObject.ps1 index 67a988b4..c82df6ca 100644 --- a/src/Javinizer/Private/Get-AggregatedDataObject.ps1 +++ b/src/Javinizer/Private/Get-AggregatedDataObject.ps1 @@ -135,14 +135,14 @@ function Get-AggregatedDataObject { $temp = $cleanActressName.split(' ') if ($temp[1].length -ne 0) { $lastName, $firstName = $cleanActressName.split(' ') - $actressArray += $firstName + ' ' + $lastName + $actressArray += ($firstName + ' ' + $lastName).Trim() } else { - $actressArray += $cleanActressName + $actressArray += $cleanActressName.Trim() } } elseif ($var.Value.Source -eq 'r18') { - $actressArray += $cleanActressName + $actressArray += $cleanActressName.Trim() } else { - $actressArray += $cleanActressName + $actressArray += $cleanActressName.Trim() } } else { if ($var.Value.Source -eq 'javlibrary') { @@ -151,9 +151,9 @@ function Get-AggregatedDataObject { $temp = $cleanActressName.split(' ') if ($temp[1].length -ne 0) { $firstName, $lastName = $cleanActressName.split(' ') - $actressArray += $lastName + ' ' + $firstName + $actressArray += ($lastName + ' ' + $firstName).Trim() } else { - $actressArray += $cleanActressName + $actressArray += $cleanActressName.Trim() } } } diff --git a/src/Javinizer/Private/Get-R18DataObject.ps1 b/src/Javinizer/Private/Get-R18DataObject.ps1 index e33570e5..c155544e 100644 --- a/src/Javinizer/Private/Get-R18DataObject.ps1 +++ b/src/Javinizer/Private/Get-R18DataObject.ps1 @@ -20,12 +20,17 @@ function Get-R18DataObject { 'H*******m' = 'Hypnotism' 'S*****t' = 'Student' 'C***d' = 'Child' + 'D***king' = 'Drinking' 'D***k' = 'Drunk' 'V*****t' = 'Violent' 'M******r' = 'Molester' 'Sch**lgirl' = 'Schoolgirl' 'Sch**l' = 'School' '[Recommended For Smartphones] ' = '' + 'F***' = 'Fuck' + 'U**verse' = 'Universe' + 'V*****ed' = 'Violated' + 'Y********l' = 'Young girl' } } @@ -48,6 +53,7 @@ function Get-R18DataObject { ContentId = Get-R18ContentId -WebRequest $webRequest Id = Get-R18Id -WebRequest $webRequest Title = Get-R18Title -WebRequest $webRequest + Description = Get-R18Description -WebRequest $webRequest Date = Get-R18ReleaseDate -WebRequest $webRequest Year = Get-R18ReleaseYear -WebRequest $webRequest Runtime = Get-R18Runtime -WebRequest $webRequest @@ -88,7 +94,7 @@ function Get-R18ContentId { $contentId = Convert-HtmlCharacter -String $contentId #Write-Debug "Content ID is $contentId" - if ($contentId -eq '----') { + if ($contentId -eq '----') { $contentId = $null } @@ -124,12 +130,30 @@ function Get-R18Title { $title = Convert-HtmlCharacter -String $title foreach ($string in $replaceHashTable.GetEnumerator()) { $title = $title -replace [regex]::Escape($string.Name), $string.Value + $title = $title -replace ' ', ' ' } #Write-Debug "Title is $title" Write-Output $Title } } +function Get-R18Description { + param ( + [object]$WebRequest + ) + + process { + if ($WebRequest.Content -match '
')[1] -split '<\/p>')[0] + $description = Convert-HtmlCharacter -String $description + } else { + $description = $null + } + + Write-Output $description + } +} + function Get-R18ReleaseDate { param ( [object]$WebRequest @@ -339,11 +363,10 @@ function Get-R18Actress { } foreach ($actress in $movieActressExtract) { - $movieActress += (($actress -split 'alt="')[1] -split '"')[0] + $movieActress += ((($actress -split 'alt="')[1] -split '"')[0]).Trim() $movieActressThumb += (($actress -split 'src="')[1] -split '"')[0] } - if ($movieActress -eq '----') { $movieActress = $null }