Page MenuHomeDevCentral

D718.id.diff
No OneTemporary

D718.id.diff

diff --git a/pages/footofeminin.php b/pages/footofeminin.php
new file mode 100644
--- /dev/null
+++ b/pages/footofeminin.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ * Represents a page from the http://www.footofeminin.fr/ site.
+ */
+class FootOFemininPage extends Page {
+ /**
+ * Analyses the page and extracts metadata
+ */
+ function analyse () {
+ parent::analyse();
+
+ // Hardcoded known info
+ $this->site = "Footoféminin";
+
+ $this->parseDate();
+ }
+
+ /**
+ * @return string The date published in the article
+ */
+ function extractDate() {
+ // Date is stored in HTML code as:
+ // <div id="date" class="date">
+ // <div class="access">Mardi 15 Nomvebre 2016</div>
+ // </div>
+ $dateId = self::between('<div id="date" class="date">', '</div>');
+ return self::grab($dateId, '<div class="access">');
+ }
+
+ /**
+ * Parses a date and fill dd, mm, yyyy properties.
+ */
+ function parseDate() {
+ $date = explode(' ', $this->extractDate());
+
+ $this->dd = $date[1];
+ $this->mm = strtolower($date[2]);
+ $this->yyyy = $date[3];
+ }
+}
diff --git a/pages/index.dat b/pages/index.dat
--- a/pages/index.dat
+++ b/pages/index.dat
@@ -3,6 +3,7 @@
http://rue89.nouvelobs.com/ Rue89
http://www.chroniquesautomatiques.com/ LesChroniquesAutomatiques
http://www.erudit.org/ Erudit
+http://www.footofeminin.fr/ FootOFeminin
http://www.formula1.com/ Formula1
http://www.jstor.org/ JSTOR
http://www.lalibre.be/ LaLibreBelgique

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 14:25 (5 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260359
Default Alt Text
D718.id.diff (1 KB)

Event Timeline