Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F22590005
lalibrebelgique.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
lalibrebelgique.php
View Options
<?php
//Page analysis for www.lalibre.be
class
LaLibreBelgiquePage
extends
Page
{
function
analyse
()
{
//La Libre uses ISO-8859-1 and not UTF-8
$this
->
data
=
iconv
(
'iso-8859-1'
,
'utf-8'
,
$this
->
data
);
//Calls parent analyzer
parent
::
analyse
();
//Hardcoded known info
$this
->
site
=
"La Libre Belgique"
;
$this
->
skipYMD
=
true
;
//Gets date
$date
=
trim
(
self
::
between
(
'Mis en ligne le '
,
'</p>'
));
$yyyy
=
substr
(
$date
,
6
,
4
);
$mm
=
substr
(
$date
,
3
,
2
);
$dd
=
substr
(
$date
,
0
,
2
);
$this
->
unixtime
=
mktime
(
12
,
0
,
0
,
$mm
,
$dd
,
$yyyy
);
$this
->
date
=
strftime
(
LONG_DATE_FORMAT
,
$this
->
unixtime
);
//Gets authors
$authors
=
trim
(
self
::
between
(
'<p id="writer">'
,
'</p>'
));
if
(
strpos
(
$authors
,
'daction '
)
>
0
)
{
//"rédaction en ligne", "Rédaction web","Rédaction en ligne (avec afp)", etc.
//(they're not coherent about case).
$this
->
skipAuthor
=
true
;
}
else
{
$authors
=
preg_split
(
'/( et |, )/'
,
$authors
);
$start
=
true
;
foreach
(
$authors
as
$author
)
{
//Fixes some authors
switch
(
$author
)
{
case
'G. Dt'
:
$author
=
'Guy Duplat'
;
break
;
case
'afp'
:
$author
=
'AFP'
;
break
;
}
if
(
$start
)
{
$this
->
author
=
$author
;
$start
=
false
;
}
else
{
$this
->
coauthors
[]
=
$author
;
}
}
}
//Gets title
if
(!
$this
->
title
=
$this
->
meta_tags
[
'og:title'
])
{
$this
->
title
=
self
::
between
(
"<title>Lalibre.be - "
,
"</title>"
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Jan 31, 17:47 (21 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3403932
Default Alt Text
lalibrebelgique.php (1 KB)
Attached To
Mode
rSTG Source templates generator
Attached
Detach File
Event Timeline
Log In to Comment