Skip to content

Commit

Permalink
If match not started yet
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthology committed Aug 24, 2018
1 parent 7a18e12 commit e6a50c1
Show file tree
Hide file tree
Showing 3 changed files with 5,481 additions and 220 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
node_modules
.DS_Store
.vscode
11 changes: 9 additions & 2 deletions crawler.js
Expand Up @@ -13,6 +13,7 @@ var c = new Crawler({
// Fetching Values from Cricbuzz Server

var matchHeader = $(".cb-lv-main").first().children(".cb-lv-scr-mtch-hdr").text();
var startTime = $(".cb-lv-main").first().find(".cb-schdl").children().text();
var scoreCard = $(".cb-lv-main").first().find(".cb-scr-wll-chvrn").children().first().text();
var scoreCard = scoreCard.split("  •  ")
var liveCommentary = $(".cb-lv-main").first().find(".cb-scr-wll-chvrn").children(".cb-text-live").text();
Expand All @@ -24,8 +25,14 @@ var c = new Crawler({
console.log(" 🏏 CriCLI 🏏");
console.log(clc.redBright(matchHeader));
console.log("--------------------------");
console.log(clc.cyanBright(scoreCard[0]));
console.log(clc.cyanBright(scoreCard[1]));
if(!scoreCard[0] & !scoreCard[1]){
console.log("☹️ Match not Started Yet !! ☹️");
}
else{
console.log(clc.cyanBright(scoreCard[0]));
console.log(clc.cyanBright(scoreCard[1]));
}

if(liveCommentary){
console.log(liveCommentary);
}
Expand Down

0 comments on commit e6a50c1

Please sign in to comment.