Skip to content

Safintim/flower-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Flower-parser

Скрипт для парсинга сайта цветов floristan.ru

Описание

Парсер сохраняет информацию о букетах в json файл. Структура файла:

[
    {
        "title": "Букет  Вдохновение",
        "sizes": [
            {
                "size": "SMALL",
                "price": 2826,
                "flowers": [
                    {
                        "title": "Гвоздика",
                        "count": 3
                    },
                    {
                        "title": "Ирис синий",
                        "count": 5
                    },
                    {
                        "title": "Роза 60 см",
                        "count": 5
                    },
                    {
                        "title": "Статица",
                        "count": 1
                    },
                    {
                        "title": "Писташ",
                        "count": 3
                    },
                    {
                        "title": "Оформление",
                        "count": 1
                    }
                ]
            },
            {
                "size": "MIDDLE",
                "price": 4423,
                "flowers": [
                    ...
                ]
            },
            {
                "size": "BIG",
                "price": 7031,
                "flowers": [
                   ...
                ]
            }
        ]
    }
]

Требования

  • Python3.8+

Установка

git clone https://github.com/Safintim/flower-parser.git
cd flower-parser
pip install -r requirements.txt

Использование

В текущей директории создаст bouquets.json с результатом

python main.py

Создаст ~/home/bouquets_12_03_2021.json с результатом

python main.py -d ~/home -n bouquets_12_03_2021

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages