Skip to content

Commit

Permalink
Push changes for release 0.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Dec 9, 2019
1 parent 5655739 commit 731bbdc
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Javinizer/Javinizer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'Javinizer.psm1'

# Version number of this module.
ModuleVersion = '0.1.8'
ModuleVersion = '0.1.9'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
12 changes: 6 additions & 6 deletions src/Javinizer/Private/Get-AggregatedDataObject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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()
}
}
}
Expand Down
29 changes: 26 additions & 3 deletions src/Javinizer/Private/Get-R18DataObject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}

Expand All @@ -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
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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 '<h1>Product Description<\/h1>') {
$description = ((($WebRequest.Content -split '<h1>Product Description<\/h1>')[1] -split '<p>')[1] -split '<\/p>')[0]
$description = Convert-HtmlCharacter -String $description
} else {
$description = $null
}

Write-Output $description
}
}

function Get-R18ReleaseDate {
param (
[object]$WebRequest
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 731bbdc

Please sign in to comment.