Парсинг форума
1 USDДобрый день, компенсация за выполнение задания 26 грн.
Технологии: php.
Цель: сохранить содержимое форума в бд.
Форум состоит из веток и сообщений.При появлении нового сообщения, в ветке изменяется дата последнего сообщений, которая находится возле ее заголовка, эту дату можно отслеживать чтобы понять, какие ветки обновились после пред. запуска.
Информация о сообщении, получаемая со страницы:
имя автора
ссылка на аватар
текст сообщения
прикрепленные файлы(если есть)
дата
Информация о ветке, получаемая со страницы:
название
дата последнего сообщения
Таблцы mysql:
forum_threads:
id
project_id - int
title - string
last_publish_date - date
forum_messages:
id
topic_id - int
project_id - int
user_name - string
user_avatar - string
text - string
publish_date - date
attached_files - содержит json строку
[
{
title: "заголовок файла",
link: ссылка
}
...
{}
]
}
Необходимо создать класс ForumParser, который содержит след методы:
getPageThreads(string pageHtml): array - получить названия веток
getPageMessages(string pageHtml): array - получить сообщения
storeMessages(array messages): int - сохранить в бд массив сообщений
storeThreads(array threads): int - сохранить в бд массив веток
findUpdatedThreads(array pageThreads): array - найти обновившиеся ветки
findNewMessages(array pageMessages): array - найти новые сообщения
Библиотеки:
https://github.com/tburry/pquery - для парсинга страницы
db.php - для работы с бд
-
а почему именно 26, а не 25,50?
Интересуюсь, так, ради интереса 🙂
-
не, ну ради рейтинга кто-то да возьмет
-
Мне очень нравится, что написано не "награда", а "компенсация".
Да и "компенсация" слишком уж мала.
-
Current freelance projects in the category PHP
Website auditTask for technical debugging of OpenCart 3 (ocStore). I need a fixed budget for the result, not hourly payment. List of tasks 1. Fixing 500 error: A conflict occurs when updating modifiers (likely between system/seo_package.ocmod.xml and unixml.ocmod.xml). It is necessary to… Content Management Systems, PHP ∙ 9 hours 36 minutes back ∙ 32 proposals |
Development of a single project based on the refinement and integration of 4 scriptsHello. I need to combine 4 scripts from different authors into a single environment. The composition includes a forum, a video portal, an article portal, and a classifieds board. I will provide the scripts. Detailed specifications are in the attached files. Please think about… PHP, Web Programming ∙ 11 hours 3 minutes back ∙ 23 proposals |
A WordPress site using the Kadence theme and Kadence Blocks.
225 USD
We need to create a website on WordPress using the Kadence theme and Kadence Blocks. There will be no online store (although it may be added in the future). We need a homepage and several internal pages. The graphics are already prepared, the layout structure is mostly defined,… Content Management Systems, PHP ∙ 14 hours 30 minutes back ∙ 30 proposals |
Development of 2 SEO-oriented websites for selling spare parts (ATVs and special equipment)Development of Two Specialized Websites for Selling Spare PartsGeneral Information It is necessary to develop two specialized websites: Spare parts for ATVs, UTVs, SSVs, and other similar equipment. Spare parts for special equipment. Existing company website:… PHP, Web Programming ∙ 1 day 11 hours back ∙ 65 proposals |
Looking for a white-label solution for a betting company for rent. |