|
@@ 744-768 (lines=25) @@
|
| 741 |
|
]; |
| 742 |
|
} |
| 743 |
|
|
| 744 |
|
public function getTitleData(string $title_url) { |
| 745 |
|
$titleData = []; |
| 746 |
|
|
| 747 |
|
$fullURL = $this->getFullTitleURL($title_url); |
| 748 |
|
|
| 749 |
|
$content = $this->get_content($fullURL); |
| 750 |
|
|
| 751 |
|
$data = $this->parseTitleDataDOM( |
| 752 |
|
$content, |
| 753 |
|
$title_url, |
| 754 |
|
"//meta[@property='og:title']", |
| 755 |
|
"//ol[@class='discussionListItems']/li[1]/div[@class='home_list']/ul/li/div[@class='list_press_text']", |
| 756 |
|
"p[@class='author']/span|p[@class='author']/abbr", |
| 757 |
|
"p[@class='text_work']/a" |
| 758 |
|
); |
| 759 |
|
if($data) { |
| 760 |
|
$titleData['title'] = trim(html_entity_decode($data['nodes_title']->getAttribute('content'))); |
| 761 |
|
|
| 762 |
|
$titleData['latest_chapter'] = preg_replace('/^projects\/.*?\/(.*?)\/$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
| 763 |
|
|
| 764 |
|
$titleData['last_updated'] = date("Y-m-d H:i:s",(int) $data['nodes_latest']->getAttribute('title')); |
| 765 |
|
} |
| 766 |
|
|
| 767 |
|
return (!empty($titleData) ? $titleData : NULL); |
| 768 |
|
} |
| 769 |
|
} |
| 770 |
|
|
| 771 |
|
class MangaCow extends Site_Model { |
|
@@ 787-812 (lines=26) @@
|
| 784 |
|
]; |
| 785 |
|
} |
| 786 |
|
|
| 787 |
|
public function getTitleData(string $title_url) { |
| 788 |
|
$titleData = []; |
| 789 |
|
|
| 790 |
|
$fullURL = $this->getFullTitleURL($title_url); |
| 791 |
|
|
| 792 |
|
$content = $this->get_content($fullURL); |
| 793 |
|
|
| 794 |
|
$data = $this->parseTitleDataDOM( |
| 795 |
|
$content, |
| 796 |
|
$title_url, |
| 797 |
|
"//h4", |
| 798 |
|
"//ul[contains(@class, 'mng_chp')]/li[1]/a[1]", |
| 799 |
|
"b[@class='dte']", |
| 800 |
|
"", |
| 801 |
|
"404 Page Not Found" |
| 802 |
|
); |
| 803 |
|
if($data) { |
| 804 |
|
$titleData['title'] = trim($data['nodes_title']->textContent); |
| 805 |
|
|
| 806 |
|
$titleData['latest_chapter'] = preg_replace('/^.*\/([0-9]+)\/$/', '$1', (string) $data['nodes_chapter']->getAttribute('href')); |
| 807 |
|
|
| 808 |
|
$titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) substr($data['nodes_latest']->getAttribute('title'), 13))); |
| 809 |
|
} |
| 810 |
|
|
| 811 |
|
return (!empty($titleData) ? $titleData : NULL); |
| 812 |
|
} |
| 813 |
|
} |
| 814 |
|
|
| 815 |
|
/*** FoolSlide sites ***/ |