|
@@ 971-995 (lines=25) @@
|
| 968 |
|
]; |
| 969 |
|
} |
| 970 |
|
|
| 971 |
|
public function getTitleData(string $title_url, bool $firstGet = FALSE) { |
| 972 |
|
$titleData = []; |
| 973 |
|
|
| 974 |
|
$fullURL = $this->getFullTitleURL($title_url); |
| 975 |
|
|
| 976 |
|
$content = $this->get_content($fullURL); |
| 977 |
|
|
| 978 |
|
$data = $this->parseTitleDataDOM( |
| 979 |
|
$content, |
| 980 |
|
$title_url, |
| 981 |
|
"//meta[@property='og:title']", |
| 982 |
|
"//ol[@class='discussionListItems']/li[1]/div[@class='home_list']/ul/li/div[@class='list_press_text']", |
| 983 |
|
"p[@class='author']/span|p[@class='author']/abbr", |
| 984 |
|
"p[@class='text_work']/a" |
| 985 |
|
); |
| 986 |
|
if($data) { |
| 987 |
|
$titleData['title'] = trim(html_entity_decode($data['nodes_title']->getAttribute('content'))); |
| 988 |
|
|
| 989 |
|
$titleData['latest_chapter'] = preg_replace('/^projects\/.*?\/(.*?)\/$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
| 990 |
|
|
| 991 |
|
$titleData['last_updated'] = date("Y-m-d H:i:s",(int) $data['nodes_latest']->getAttribute('title')); |
| 992 |
|
} |
| 993 |
|
|
| 994 |
|
return (!empty($titleData) ? $titleData : NULL); |
| 995 |
|
} |
| 996 |
|
} |
| 997 |
|
|
| 998 |
|
class MangaCow extends Site_Model { |
|
@@ 1013-1038 (lines=26) @@
|
| 1010 |
|
]; |
| 1011 |
|
} |
| 1012 |
|
|
| 1013 |
|
public function getTitleData(string $title_url, bool $firstGet = FALSE) { |
| 1014 |
|
$titleData = []; |
| 1015 |
|
|
| 1016 |
|
$fullURL = $this->getFullTitleURL($title_url); |
| 1017 |
|
|
| 1018 |
|
$content = $this->get_content($fullURL); |
| 1019 |
|
|
| 1020 |
|
$data = $this->parseTitleDataDOM( |
| 1021 |
|
$content, |
| 1022 |
|
$title_url, |
| 1023 |
|
"//h4", |
| 1024 |
|
"//ul[contains(@class, 'mng_chp')]/li[1]/a[1]", |
| 1025 |
|
"b[@class='dte']", |
| 1026 |
|
"", |
| 1027 |
|
"404 Page Not Found" |
| 1028 |
|
); |
| 1029 |
|
if($data) { |
| 1030 |
|
$titleData['title'] = trim($data['nodes_title']->textContent); |
| 1031 |
|
|
| 1032 |
|
$titleData['latest_chapter'] = preg_replace('/^.*\/([0-9]+)\/$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
| 1033 |
|
|
| 1034 |
|
$titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) substr($data['nodes_latest']->getAttribute('title'), 13))); |
| 1035 |
|
} |
| 1036 |
|
|
| 1037 |
|
return (!empty($titleData) ? $titleData : NULL); |
| 1038 |
|
} |
| 1039 |
|
} |
| 1040 |
|
|
| 1041 |
|
class EGScans extends Site_Model { |