eztv_api_x
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -7,2 +7,3 @@ /************************* | ||
var cheerio = require('cheerio'); | ||
var moment = require('moment'); | ||
@@ -87,7 +88,7 @@ /************************* | ||
episode_rows = $(this).children('.forum_thread_post'); | ||
if(episode_rows.length > 0) { | ||
var title = $(this).children('td').eq(1).text(); | ||
if(title.toLowerCase().indexOf("x264") > -1) return true; | ||
} | ||
return false; | ||
if(episode_rows.length > 0) { | ||
var title = $(this).children('td').eq(1).text(); | ||
if(title.indexOf("x264") > -1) return true; | ||
} | ||
return false; | ||
}); | ||
@@ -113,2 +114,15 @@ | ||
} | ||
else { | ||
matcher = title.match(/(\d{4}) (\d{2} \d{2})/); // Date based TV Shows | ||
if(matcher) { | ||
var season = matcher[1]; // Season : 2014 | ||
var episode = matcher[2].replace(" ", "/"); //Episode : 04/06 | ||
var torrent = {}; | ||
torrent.url = magnet; | ||
torrent.seeds = 0; | ||
torrent.peers = 0; | ||
if(!episodes[season]) episodes[season] = {}; | ||
episodes[season][episode] = torrent; | ||
} | ||
} | ||
}); | ||
@@ -115,0 +129,0 @@ return cb(null, episodes); |
{ | ||
"name" : "eztv_api_x", | ||
"version" : "0.0.7", | ||
"version" : "0.0.8", | ||
"description" : "Web Scraper to provide methods to access EZTV easier", | ||
@@ -13,4 +13,5 @@ "author" : "SlashmanX & phenomenz", | ||
"request" : "latest", | ||
"cheerio" : "latest" | ||
"cheerio" : "latest", | ||
"moment" : "latest" | ||
} | ||
} |
var eztv = require('./eztv_api'); | ||
var episodes = eztv.getAllEpisodes({id: 124, slug: 'house'}, function(err, data) { | ||
var episodes = eztv.getAllEpisodes({id: 53, slug: 'the-colbert-report/'}, function(err, data) { | ||
if(err) return console.error(err); | ||
console.log(data); | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7006
108
3
+ Addedmoment@latest
+ Addedmoment@2.30.1(transitive)