Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add clarifying comment

  • Loading branch information...
commit 938a39121061d20f66ae0d45aac1790dddc4dc27 1 parent 3126359
Joshua Davis authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  indexer/crawler.js
View
2  indexer/crawler.js
@@ -81,6 +81,7 @@ function parseDate(site, $dateEl) {
//A date that looks like "Tue, Mar 25, 2014 -- 9:00 AM" (from KQED as of April 2, 2014)
date = new Date($dateEl.text().replace('--', ''));
} else if (site.pubDate.target === 'dotdash') {
+ //A date that looks like 12.05.2014 should be 12-05-2014
date = new Date($dateEl.text().replace(/\./g, '/').replace('-', ''));
}
if(date !== null) {
@@ -210,6 +211,7 @@ function loadSites() {
Article.count({
articleUrl: element.attribs.href
}, function(err, count) {
+
//Ensures that article is not present before fetching
if (count > 0) {
console.log("Article is already in DB");
Please sign in to comment.
Something went wrong with that request. Please try again.