|
@@ 715-725 (lines=11) @@
|
| 712 |
|
|
| 713 |
|
$nodes_title = $xpath->query("//div[@class='large comic']/h1[@class='title']"); |
| 714 |
|
$nodes_row = $xpath->query("//div[@class='list']/div[@class='element'][1]"); |
| 715 |
|
if($nodes_title->length === 1 && $nodes_row->length === 1) { |
| 716 |
|
$titleData['title'] = trim($nodes_title[0]->textContent); |
| 717 |
|
|
| 718 |
|
|
| 719 |
|
$nodes_latest = $xpath->query("div[@class='meta_r']", $nodes_row[0]); |
| 720 |
|
$nodes_chapter = $xpath->query("div[@class='title']/a", $nodes_row[0]); |
| 721 |
|
|
| 722 |
|
$link = (string) $nodes_chapter[0]->getAttribute('href'); |
| 723 |
|
$titleData['latest_chapter'] = preg_replace('/.*\/read\/.*?\/(.*?)\/$/', '$1', $link); |
| 724 |
|
$titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) str_replace('.', '', explode(',', $nodes_latest[0]->textContent)[1]))); |
| 725 |
|
} |
| 726 |
|
} else { |
| 727 |
|
//TODO: Throw ERRORS; |
| 728 |
|
} |
|
@@ 903-913 (lines=11) @@
|
| 900 |
|
if($nodes_row->length !== 1) { |
| 901 |
|
$nodes_row = $xpath->query("//div[@class='list']/div[@class='group'][1]/div[@class='element'][1]"); |
| 902 |
|
} |
| 903 |
|
if($nodes_title->length === 1 && $nodes_row->length === 1) { |
| 904 |
|
$titleData['title'] = trim($nodes_title[0]->textContent); |
| 905 |
|
|
| 906 |
|
|
| 907 |
|
$nodes_latest = $xpath->query("div[@class='meta_r']", $nodes_row[0]); |
| 908 |
|
$nodes_chapter = $xpath->query("div[@class='title']/a", $nodes_row[0]); |
| 909 |
|
|
| 910 |
|
$link = (string) $nodes_chapter[0]->getAttribute('href'); |
| 911 |
|
$titleData['latest_chapter'] = preg_replace('/.*\/read\/.*?\/(.*?)\/$/', '$1', $link); |
| 912 |
|
$titleData['last_updated'] = date("Y-m-d H:i:s", strtotime((string) str_replace('.', '', explode(',', $nodes_latest[0]->textContent)[1]))); |
| 913 |
|
} |
| 914 |
|
} else { |
| 915 |
|
//TODO: Throw ERRORS; |
| 916 |
|
} |