Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12740965
thejapantimes.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
814 B
Referenced Files
None
Subscribers
None
thejapantimes.php
View Options
<?php
/**
* Represents a page from the http://www.japantimes.co.jp/ site.
*/
class
TheJapanTimesPage
extends
Page
{
/**
* Analyses the page and extracts metadata
*/
function
analyse
()
{
parent
::
analyse
();
// Hardcoded known info
$this
->
site
=
"[[The Japan Times]]"
;
// Gets the date from the URL
$this
->
extractYYYYMMDDDateFromURL
();
// Gets author
// e.g. <h5 class="writer" role="author" >by <a href="http://www.japantimes.co.jp/author/int-eric_johnston/" title="Posts by Eric Johnston" class="author url fn" rel="author">Eric Johnston</a></h5>
$this
->
author
=
$this
->
between
(
'rel="author">'
,
'</a>'
);
// Removes pipe and website name from the title
$this
->
title
=
$this
->
between
(
"<title>"
,
" |"
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 16, 13:13 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3169359
Default Alt Text
thejapantimes.php (814 B)
Attached To
Mode
rSTG Source templates generator
Attached
Detach File
Event Timeline
Log In to Comment