Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11725497
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/pages/lemonde.php b/pages/lemonde.php
index bfbda23..2b16b11 100644
--- a/pages/lemonde.php
+++ b/pages/lemonde.php
@@ -1,44 +1,41 @@
<?php
class LeMondePage extends Page {
function analyse () {
parent::analyse();
//Hardcoded known info
$this->site = "[[Le Monde]]";
- $this->skipYMD = true;
$this->issn = '1950-6244';
//Gets date
// e.g. http://www.lemonde.fr/ameriques/article/2013/05/25/le-bresil-annule-la-dette-de-douze-pays-africains_3417518_3222.html
$pos = strpos($this->url, "/article/");
- $yyyy = substr($this->url, $pos + 9, 4);
- $mm = substr($this->url, $pos + 14, 2);
- $dd = substr($this->url, $pos + 17, 2);
- $this->unixtime = mktime(0, 0, 0, $mm, $dd, $yyyy);
- $this->date = strftime(LONG_DATE_FORMAT, $this->unixtime);
+ $this->yyyy = substr($this->url, $pos + 9, 4);
+ $this->mm = substr($this->url, $pos + 14, 2);
+ $this->dd = substr($this->url, $pos + 17, 2);
$this->author = $this->getAuthor();
}
/**
* Gets the author of the article
*
* @return string the article's author
*/
public function getAuthor () {
//Gets author field from HTML code
//e.g. <span itemprop="author" class="auteur txt12_120">Stéphanie Le Bars</span>
//TODO: ensure no article has more than one author
$author = self::between('itemprop="author"', '</');
$pos = strpos($author, '">') + 2;
$author = trim(substr($author, $pos));
if ($author[0] == '<') {
$pos = strpos($author, '>') + 1;
return substr($author, $pos);
}
return $author;
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Sep 18, 20:40 (4 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2991631
Default Alt Text
(1 KB)
Attached To
Mode
rSTG Source templates generator
Attached
Detach File
Event Timeline
Log In to Comment