Skip to content

Instantly share code, notes, and snippets.

@osakanataro
Created July 13, 2021 05:56
Show Gist options
  • Save osakanataro/7bdff3abb2e1d6cd65c479fd6bf57df0 to your computer and use it in GitHub Desktop.
Save osakanataro/7bdff3abb2e1d6cd65c479fd6bf57df0 to your computer and use it in GitHub Desktop.
$storyurl="https://peep.jp/stories/hhJMikB1Hr3Ni4Hs"
$apistoryurl="https://api.peep.jp/web_api/v1/stories/"
$apichapterurl="https://api.peep.jp/web_api/v1/chapters/"
$storyuuid=$storyurl.Substring($storyurl.LastIndexOf("/")+1)
$storyjsonurl=$apistoryurl+$storyuuid
$storyresponse=Invoke-RestMethod $storyjsonurl
Write-Host $storyresponse.story.title
$chapterurl=$apichapterurl+$storyresponse.story.marker.chapter_uuid
$response=Invoke-RestMethod $chapterurl
Write-Host "===" $response.chapter.title "==="
$response.chapter.balloons|ForEach-Object{
$lines=$_
if($lines.character.name){
Write-Host $lines.character.name ":" $lines.body
}else{
Write-Host $lines.body
}
}
Write-Host $response.chapter.author_message
Write-Host "次話:" $response.chapter.next_chapter_uuid
@osakanataro
Copy link
Author

peepというサイトが読みづらいので、jsonデータを引っ張って表示させてみた
認証機能は搭載していない

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment