|
@@ 999-1023 (lines=25) @@
|
| 996 |
|
]; |
| 997 |
|
} |
| 998 |
|
|
| 999 |
|
public function getTitleData(string $title_url, bool $firstGet = FALSE) { |
| 1000 |
|
$titleData = []; |
| 1001 |
|
|
| 1002 |
|
$fullURL = $this->getFullTitleURL($title_url); |
| 1003 |
|
|
| 1004 |
|
$content = $this->get_content($fullURL); |
| 1005 |
|
|
| 1006 |
|
$data = $this->parseTitleDataDOM( |
| 1007 |
|
$content, |
| 1008 |
|
$title_url, |
| 1009 |
|
"//meta[@property='og:title']", |
| 1010 |
|
"//ol[@class='discussionListItems']/li[1]/div[@class='home_list']/ul/li/div[@class='list_press_text']", |
| 1011 |
|
"p[@class='author']/span|p[@class='author']/abbr", |
| 1012 |
|
"p[@class='text_work']/a" |
| 1013 |
|
); |
| 1014 |
|
if($data) { |
| 1015 |
|
$titleData['title'] = trim(html_entity_decode($data['nodes_title']->getAttribute('content'))); |
| 1016 |
|
|
| 1017 |
|
$titleData['latest_chapter'] = preg_replace('/^projects\/.*?\/(.*?)\/$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
| 1018 |
|
|
| 1019 |
|
$titleData['last_updated'] = date("Y-m-d H:i:s",(int) $data['nodes_latest']->getAttribute('title')); |
| 1020 |
|
} |
| 1021 |
|
|
| 1022 |
|
return (!empty($titleData) ? $titleData : NULL); |
| 1023 |
|
} |
| 1024 |
|
} |
| 1025 |
|
|
| 1026 |
|
class MangaCow extends Site_Model { |
|
@@ 1042-1067 (lines=26) @@
|
| 1039 |
|
]; |
| 1040 |
|
} |
| 1041 |
|
|
| 1042 |
|
public function getTitleData(string $title_url, bool $firstGet = FALSE) { |
| 1043 |
|
$titleData = []; |
| 1044 |
|
|
| 1045 |
|
$fullURL = $this->getFullTitleURL($title_url); |
| 1046 |
|
|
| 1047 |
|
$content = $this->get_content($fullURL); |
| 1048 |
|
|
| 1049 |
|
$data = $this->parseTitleDataDOM( |
| 1050 |
|
$content, |
| 1051 |
|
$title_url, |
| 1052 |
|
"//h4", |
| 1053 |
|
"//ul[contains(@class, 'mng_chp')]/li[1]/a[1]", |
| 1054 |
|
"b[@class='dte']", |
| 1055 |
|
"", |
| 1056 |
|
"404 Page Not Found" |
| 1057 |
|
); |
| 1058 |
|
if($data) { |
| 1059 |
|
$titleData['title'] = trim($data['nodes_title']->textContent); |
| 1060 |
|
|
| 1061 |
|
$titleData['latest_chapter'] = preg_replace('/^.*\/([0-9]+)\/$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
| 1062 |
|
|
| 1063 |
|
$titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) substr($data['nodes_latest']->getAttribute('title'), 13))); |
| 1064 |
|
} |
| 1065 |
|
|
| 1066 |
|
return (!empty($titleData) ? $titleData : NULL); |
| 1067 |
|
} |
| 1068 |
|
} |
| 1069 |
|
|
| 1070 |
|
/*** FoolSlide sites ***/ |