Skip to content

Instantly share code, notes, and snippets.

@OtakoidTony
Last active May 31, 2020 21:23
Show Gist options
  • Save OtakoidTony/ba243f4326c6628e094dc2953643acbc to your computer and use it in GitHub Desktop.
Save OtakoidTony/ba243f4326c6628e094dc2953643acbc to your computer and use it in GitHub Desktop.
Echo "Kakao Emoticon Downloader"
Echo ""
Echo "Made by Rojiku"
Echo ""
Echo "경고! 이 프로그램은 이미 구매한 이모티콘에 대하여 타 SNS에서 사용할 수 있게 하기 위해 개발된 프로그램입니다."
Echo "부정적인 사용은 저작권법에 의거하여 처벌될 수 있으며, 본 소프트웨어의 사용에 있어 모든 책임은 사용자에게 있음을 알립니다."
Echo ""
$title = Read-Host "Target "
$site = "https://e.kakao.com/t/"+$title
$sitedata = invoke-webrequest $site -UserAgent "Mozilla/5.0(Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36(KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36(compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
$Str = $sitedata.rawcontent
$itemcode = (($Str -split "item_code")[1] -split "'")[1]
$site = "https://e.kakao.com/detail/thumb_url?item_code=" + $itemcode
$sitedata = invoke-webrequest $site
$jsonData = (((($sitedata.rawcontent -split "\[")[1]) -split "]")[0]) -split ","
for($i=0;$i -lt $jsonData.Length; $i++){
$jsonData[$i] = ($jsonData[$i] -split '"')[1]
}
$save_folder = "C://"+$title
mkdir $save_folder
for($i=0;$i -lt $jsonData.Length; $i++){
$save_name = "C://"+$title+"/"+($i+1)+".png"
Invoke-WebRequest $jsonData[$i] -OutFile $save_name
$percentage = ($i+1)/$jsonData.Length*100
Write-Progress -Activity "Downloading..." -Status "$percentage% Complete:" -PercentComplete $percentage;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment