Page MenuHomeDevCentral

D723.id1815.diff
No OneTemporary

D723.id1815.diff

diff --git a/pages/newyorktimes.php b/pages/newyorktimes.php
--- a/pages/newyorktimes.php
+++ b/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

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 06:02 (17 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2311523
Default Alt Text
D723.id1815.diff (1 KB)

Event Timeline