Permalink
Browse files

parseOku() draft

  • Loading branch information...
1 parent 74af477 commit b575e6e05b4027bf3f8d74bfa55587d79efef1df maneulyori committed Jan 23, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 main.js
View
@@ -38,10 +38,14 @@ function fetchData(boardUrl, callback)
function parseOku(str, callback)
{
var result = str.match(/^\t(.*)facebook(.*)style(.*)<\/a>$/gm);
+ var timestamp = str.match(/^\t(.*)<span class="col3">[0-9](.*)<\/span>$/gm);
for(var i=0; i<result.length; i++)
{
+ result[i] = "http://oku.korea.ac.kr" + result[i].replace(/\t(.*)<a href="/gm, "").replace(/" style="(.*)">/gm, "\t").replace(/<\/a>/gm, "").replace(/&amp;/gm, "&");
+ timestamp[i] = timestamp[i].replace(/\t(.*)<span class="col3">/gm, "").replace(/<\/span>/gm, "");
console.log(result[i]);
+ console.log(timestamp[i]);
}
}

0 comments on commit b575e6e

Please sign in to comment.