-
Notifications
You must be signed in to change notification settings - Fork 3
Description
http://zzal.coroke.net has many zzal(:camera: ) posted by user.
It's way more accrate than our google search based image or idols scripts. (but, it's less naughty 😢)
with following hack, we can retrieve some image url from this site.
http://zzal.coroke.net works with keyword. http://zzal.coroke.net/<keyword> response an html document with image urls.
For example, http://zzal.coroke.net/iu url will response following html. We can get url with evaluating IMGURLS variable.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>아이유 - zzal.coroke.net</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link href="//cfile9.uf.tistory.com" rel="dns-prefetch" />
<link href="//cfs16.tistory.com" rel="dns-prefetch" />
<scripts>
var IMGURLS=[[42,'http://cfile9.uf.tistory.com/original/141BC33D509D63240985A1'],[44,'http://cfs16...
</scripts>cheerio can help us to parse this html response
But with invalid keyword (ex, http://zzal.coroke.net/전성균) will redirect to main page
How can we get valid keyword? Just send post request to http://zzal.coroke.net/search.do with keyword parameter.
keyword=<YOUR_KEYWORD>
If site has related keyword, you can get one in response. If not, response should be empty string.
Following command is suitable for this job ✨
hubot zzal <keyword>