|
@@ 895-919 (lines=25) @@
|
| 892 |
|
]; |
| 893 |
|
} |
| 894 |
|
|
| 895 |
|
public function getTitleData(string $title_url, bool $firstGet = FALSE) { |
| 896 |
|
$titleData = []; |
| 897 |
|
|
| 898 |
|
$fullURL = $this->getFullTitleURL($title_url); |
| 899 |
|
|
| 900 |
|
$content = $this->get_content($fullURL); |
| 901 |
|
|
| 902 |
|
$data = $this->parseTitleDataDOM( |
| 903 |
|
$content, |
| 904 |
|
$title_url, |
| 905 |
|
"//meta[@property='og:title']", |
| 906 |
|
"//ol[@class='discussionListItems']/li[1]/div[@class='home_list']/ul/li/div[@class='list_press_text']", |
| 907 |
|
"p[@class='author']/span|p[@class='author']/abbr", |
| 908 |
|
"p[@class='text_work']/a" |
| 909 |
|
); |
| 910 |
|
if($data) { |
| 911 |
|
$titleData['title'] = trim(html_entity_decode($data['nodes_title']->getAttribute('content'))); |
| 912 |
|
|
| 913 |
|
$titleData['latest_chapter'] = preg_replace('/^projects\/.*?\/(.*?)\/$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
| 914 |
|
|
| 915 |
|
$titleData['last_updated'] = date("Y-m-d H:i:s",(int) $data['nodes_latest']->getAttribute('title')); |
| 916 |
|
} |
| 917 |
|
|
| 918 |
|
return (!empty($titleData) ? $titleData : NULL); |
| 919 |
|
} |
| 920 |
|
} |
| 921 |
|
|
| 922 |
|
class MangaCow extends Site_Model { |
|
@@ 938-963 (lines=26) @@
|
| 935 |
|
]; |
| 936 |
|
} |
| 937 |
|
|
| 938 |
|
public function getTitleData(string $title_url, bool $firstGet = FALSE) { |
| 939 |
|
$titleData = []; |
| 940 |
|
|
| 941 |
|
$fullURL = $this->getFullTitleURL($title_url); |
| 942 |
|
|
| 943 |
|
$content = $this->get_content($fullURL); |
| 944 |
|
|
| 945 |
|
$data = $this->parseTitleDataDOM( |
| 946 |
|
$content, |
| 947 |
|
$title_url, |
| 948 |
|
"//h4", |
| 949 |
|
"//ul[contains(@class, 'mng_chp')]/li[1]/a[1]", |
| 950 |
|
"b[@class='dte']", |
| 951 |
|
"", |
| 952 |
|
"404 Page Not Found" |
| 953 |
|
); |
| 954 |
|
if($data) { |
| 955 |
|
$titleData['title'] = trim($data['nodes_title']->textContent); |
| 956 |
|
|
| 957 |
|
$titleData['latest_chapter'] = preg_replace('/^.*\/([0-9]+)\/$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
| 958 |
|
|
| 959 |
|
$titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) substr($data['nodes_latest']->getAttribute('title'), 13))); |
| 960 |
|
} |
| 961 |
|
|
| 962 |
|
return (!empty($titleData) ? $titleData : NULL); |
| 963 |
|
} |
| 964 |
|
} |
| 965 |
|
|
| 966 |
|
/*** FoolSlide sites ***/ |