#!/usr/bin/env python
# vim:fileencoding=utf-8

from __future__ import absolute_import, division, print_function, unicode_literals

from calibre.web.feeds.news import BasicNewsRecipe


class WiComix(BasicNewsRecipe):
    title = 'dev.ua'
    __author__ = 'bugmen00t'
    publisher = '\u0422\u041e\u0412 \u00ab\u0414\u0435\u0432 \u0423\u043a\u0440\u0430\u0457\u043d\u0430\u00bb'
    category = 'news'
    cover_url = 'https://jobs.dev.ua/storage/images/34/70/82/79/original/af4c5c155ec48ed68e1c77ca26a8f0b0.jpg'
    no_stylesheets = False
    remove_javascript = False
    auto_cleanup = False
    oldest_article = 3
    max_articles_per_feed = 30
    description = '\u041c\u0435\u0434\u0456\u0430 \u043f\u0440\u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0456\u0457, \u0456\u043d\u043d\u043e\u0432\u0430\u0446\u0456\u0457, \u0432\u0438\u043d\u0430\u0445\u043e\u0434\u0438 \u0432 \u0423\u043a\u0440\u0430\u0457\u043d\u0456 \u0442\u0430 \u0437\u0430 \u0457\u0457 \u043c\u0435\u0436\u0430\u043c\u0438. \u041f\u0440\u043e \u0442\u0435, \u044f\u043a \u0432\u043e\u043d\u0438 \u0432\u043f\u043b\u0438\u0432\u0430\u044e\u0442\u044c \u043d\u0430 \u0436\u0438\u0442\u0442\u044f \u043b\u044e\u0434\u0435\u0439.'  # noqa: E501
    language = 'uk'

    remove_tags_before = dict(name='div', attrs={'class': 'article__header'})

    remove_tags_after = dict(name='div', attrs={'class': 'article__body'})

    remove_tags = [
        dict(name='div', attrs={'class': 'article__reference article__reference_header'}),
        dict(name='div', attrs={'class': 'my-lg-5'}),
        dict(name='div', attrs={'class': 'video '}),
        dict(name='figure', attrs={'class': 'incut'}),
        dict(name='figure', attrs={'class': 'global-incut'}),
    ]

    feeds = [('dev.ua', 'https://dev.ua/rss')]
