Skip to content

Instantly share code, notes, and snippets.

View Kyeongrok's full-sized avatar

Kyeongrok Kim Kyeongrok

View GitHub Profile
@Kyeongrok
Kyeongrok / gist:f79a2b1d825d7e8c2ad213950f66930a
Created May 9, 2017 16:27
python thread로 3초에 1번씩 hello 출력하는 코드
from threading import Thread
from time import sleep
def printHello():
while True:
print("hello")
sleep(3)
def main():
th = Thread(target=printHello)
var client = require('cheerio-httpcli');
var officegen = require('officegen');
var xlsx = officegen('xlsx');
var fs = require('fs');
var url = "https://search.naver.com/search.naver?where=post&sm=tab_pge&query=%EC%84%B1%ED%98%95%EC%99%B8%EA%B3%BC&st=sim&date_option=0&date_from=&date_to=&dup_remove=1&post_blogurl=&post_blogurl_without=&srchby=all&nso=&ie=utf8&start=1";
var param = {};
client.fetch(url, param, function(err, $, res){
if(err){console.log("error:", err); return;}