From 64fa42cae2e7c818a020ffbdd11204f4b4991b2a Mon Sep 17 00:00:00 2001 From: Ololbu <71982085+Ololbu@users.noreply.github.com> Date: Sun, 27 Sep 2020 22:09:58 +0500 Subject: [PATCH 1/2] [FicbookBridge] Fix data getting and months --- bridges/FicbookBridge.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bridges/FicbookBridge.php b/bridges/FicbookBridge.php index 8b8a57fc0e2..35cec90c1e3 100644 --- a/bridges/FicbookBridge.php +++ b/bridges/FicbookBridge.php @@ -84,7 +84,7 @@ private function collectSiteNews($html) { } private function collectCommentsData($html) { - foreach($html->find('article.post') as $article) { + foreach($html->find('article.comment-container') as $article) { $this->items[] = array( 'uri' => $article->find('.comment_link_to_fic > a', 0)->href, 'title' => $article->find('.comment_author', 0)->plaintext, @@ -97,7 +97,7 @@ private function collectCommentsData($html) { } private function collectUpdatesData($html) { - foreach($html->find('ul.table-of-contents > li') as $chapter) { + foreach($html->find('ul.comment-container > li') as $chapter) { $item = array( 'uri' => $chapter->find('a', 0)->href, 'title' => $chapter->find('a', 0)->plaintext, @@ -130,10 +130,10 @@ private function fixDate($date) { 'июня', 'июля', 'августа', - 'Сентября', + 'сентября', 'октября', - 'Ноября', - 'Декабря', + 'ноября', + 'декабря', ); $en_month = array( From 7453ad830d497929d6d6ddd49bf9f672023f9137 Mon Sep 17 00:00:00 2001 From: Ololbu Date: Mon, 28 Sep 2020 10:56:03 +0500 Subject: [PATCH 2/2] [FicbookBridge] Fix data getting fix --- bridges/FicbookBridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/FicbookBridge.php b/bridges/FicbookBridge.php index 35cec90c1e3..6a3761d5e31 100644 --- a/bridges/FicbookBridge.php +++ b/bridges/FicbookBridge.php @@ -97,7 +97,7 @@ private function collectCommentsData($html) { } private function collectUpdatesData($html) { - foreach($html->find('ul.comment-container > li') as $chapter) { + foreach($html->find('ul.list-of-fanfic-parts > li') as $chapter) { $item = array( 'uri' => $chapter->find('a', 0)->href, 'title' => $chapter->find('a', 0)->plaintext,