from calibre.web.feeds.news import BasicNewsRecipe


class En_Globes_Recipe(BasicNewsRecipe):
    description = 'This is en.globes.co.il.'
    cover_url = 'https://www.globes.co.il/images/GlobesEN-144x40.gif'
    title = 'Globes in English'
    language = 'en'
    __author__ = 'barakplasma'
    extra_css = 'img {max-width:100%;}'
    simultaneous_downloads = 5
    remove_javascript = True
    keep_only_tags = [
        dict(name='h1', attrs={'id': 'F_Title'}),
        dict(name='h2', attrs={'id': 'coteret_SubCoteret'}),
        dict(name='p', attrs={'id': None}),
    ]
    max_articles_per_feed = 100

    feeds = [
        ('Main Headlines', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederNode?iID=942'),
        ('Israeli stocks on Wall Street', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederKeyword?iID=1392'),
        ('All news', 'https://www.globes.co.il/webservice/rss/rssfeeder.asmx/FeederNode?iID=1725'),
        ('Macro economics', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederKeyword?iID=1389'),
        ('Aerospace and defense', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederKeyword?iID=1380'),
        ('Real estate', 'https://www.globes.co.il/webservice/rss/rssfeeder.asmx/FeederKeyword?iID=1385'),
        ('Energy and water', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederKeyword?iID=1382'),
        ('Start-ups and venture capital', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederKeyword?iID=1397'),
        ('Financial services', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederKeyword?iID=1383'),
        ('Tel Aviv markets', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederKeyword?iID=1404'),
        ('Healthcare', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederKeyword?iID=1377'),
        ('Telecommunications', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederKeyword?iID=1386'),
        ('Information technology', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederKeyword?iID=1376'),
        ('Transport and infrastructure', 'https://www.globes.co.il/WebService/Rss/RssFeeder.asmx/FeederKeyword?iID=1388'),
    ]
