Permalink
Browse files

Fix analysis for The New York Times

  • Loading branch information...
dereckson committed Nov 16, 2016
1 parent 787f7e3 commit 088a487c6a4247c666e1e61f3395e8479f2c8a5b
Showing with 6 additions and 5 deletions.
  1. +6 −5 pages/newyorktimes.php
@@ -2,19 +2,20 @@
//Page analysis for www.nytimes.com
class NewYorkTimesPage extends Page {
use DownloadWithWget;
function analyse () {
parent::analyse();
//Hardcoded known info
$this->site = "[[The New York Times]]";
$this->skipYMD = true;
//Gets date from pdate metatag
$yyyy = substr($this->meta_tags['pdate'], 0, 4);
$mm = substr($this->meta_tags['pdate'], 4, 2);
$dd = substr($this->meta_tags['pdate'], 6, 2);
$this->yyyy = substr($this->meta_tags['pdate'], 0, 4);
$this->mm = substr($this->meta_tags['pdate'], 4, 2);
$this->dd = ltrim(substr($this->meta_tags['pdate'], 6, 2), '0');
$this->unixtime = mktime(0, 0, 0, $mm, $dd, $yyyy);
$this->date = strftime(LONG_DATE_FORMAT, $this->unixtime);
//Gets author
//TODO: Handle the several authors case

0 comments on commit 088a487

Please sign in to comment.