# -*- coding: utf-8 -*-

from zitkino import parsers
from zitkino.models import Cinema, Showtime, ScrapedFilm

from . import scrapers, Scraper

cinema = Cinema(name=u'RWE letní kino na Riviéře',
                url='http://www.kinonariviere.cz/',
                street=u'Bauerova 322/7',
                town=u'Brno',
                coords=(49.18827, 16.56924))


@scrapers.register(cinema)
class RweletnikinonariviereScraper(Scraper):

    url = 'http://www.kinonariviere.cz/program'
    tags_map = {
        u'premiéra': u'premiéra',
        u'titulky': u'titulky',
    }

    def __call__(self):
        for row in self._scrape_rows():
            yield self._parse_row(row)

    def _scrape_rows(self):
        resp = self.session.get(self.url)
        html = parsers.html(resp.content, base_url=resp.url)
        return html.cssselect('.content table tr')
Пример #2
0
# -*- coding: utf-8 -*-

import re
from datetime import datetime, time

import times

from zitkino import parsers
from zitkino.models import Cinema, Showtime, ScrapedFilm

from zitkino.scrapers import scrapers, Scraper

cinema = Cinema(name=u'Kino Lucerna',
                url='http://www.kinolucerna.info',
                street=u'Minská 19',
                town=u'Brno',
                coords=(49.2104939, 16.5855358))


@scrapers.register(cinema)
class KinolucernaScraper(Scraper):

    url = 'http://kinolucerna.info/index.php/program'
    url_booking = 'http://kinolucerna.info/index.php/rezervace'

    tz = 'Europe/Prague'

    tag_re = (
        # order is not arbitrary!
        (re.compile(ur'[–\-] titulky', re.I), u'titulky'),
        (re.compile(ur'[–\-] (český )?dabing', re.I), u'dabing'),
Пример #3
0
# -*- coding: utf-8 -*-


from zitkino import parsers
from zitkino.utils import download
from zitkino.models import Cinema, Showtime, ScrapedFilm

from . import scrapers


cinema = Cinema(
    name=u'Kino Art',
    url='http://www.kinoart.cz',
    street=u'Cihlářská 19',
    town=u'Brno',
    coords=(49.2043861, 16.6034708)
)


@scrapers.register(cinema)
class Scraper(object):

    url = 'http://www.kultura-brno.cz/cs/film/program-kina-art'
    title_blacklist = [u'Kinové prázdniny']
    default_price = 110
    price_map = (
        ('seniors', 50),
        ('children', 80),
        ('small_hall', 100),
    )
    tags_map = {
Пример #4
0
# -*- coding: utf-8 -*-

import re
import datetime

import times
from zitkino import parsers
from zitkino.models import Cinema, Showtime, ScrapedFilm

from . import scrapers, Scraper

cinema = Cinema(name=u'Letní kino na dvoře MDB',
                url='http://www.letnikinobrno.cz/',
                street=u'Lidická 1863/16',
                town=u'Brno',
                coords=(49.2015431, 16.6082542))


@scrapers.register(cinema)
class LetniKinoMDBScraper(Scraper):

    url = 'http://www.letnikinobrno.cz/program-kina/'

    def __call__(self):
        for item in self._scrape_rows():
            yield self._parse_item(item)

    def _scrape_rows(self):
        resp = self.session.get(self.url)
        html = parsers.html(resp.content, base_url=resp.url)
        return html.cssselect('.program-item')
Пример #5
0
# -*- coding: utf-8 -*-

import re

import times

from zitkino import parsers
from zitkino.utils import download
from zitkino.models import Cinema, Showtime, ScrapedFilm

from . import scrapers

cinema = Cinema(name=u'Letní kino Na Dobráku',
                url='http://kinonadobraku.cz',
                street=u'Dobrovského 29',
                town=u'Brno',
                coords=(49.2181389, 16.5888692))


@scrapers.register(cinema)
class Scraper(object):

    url = ('https://www.google.com/calendar/ical/n6a7pqdcgeprq9v7pf'
           '84dk3djo%40group.calendar.google.com/public/basic.ics')
    tags_map = {
        u'čes. tit.': 'subtitles',
        u'od 15 let': 'age15',
    }
    desc_re = re.compile(
        r'''
        (?P<title>([^\n]+)\n)?  # first line with alternative title
Пример #6
0
        for row in html.cssselect('.feature_info_row'):
            label = row.cssselect_first('.pre_label')
            info[label.text_content()] = label.getnext().text_content()

        return {
            'title_orig': info.get(u'Name:'),
            'length': info.get(u'Délka (min.):'),
            # not taking the year, because they use year of Czech premiere,
            # instead of the year of the original release
        }


cinema_olympia = Cinema(
    name=u'Cinema City Olympia',
    url='http://www.cinemacity.cz/olympia',
    street=u'U Dálnice 777',
    town=u'Modřice',
    coords=(49.1381280, 16.6330180),
    is_multiplex=True,
)


@scrapers.register(cinema_olympia)
class OlympiaScraper(CinemacityScraper):

    location_id = '1010103'
    cinema = cinema_olympia


cinema_velkyspalicek = Cinema(
    name=u'Cinema City Velký Špalíček',
    url='http://www.cinemacity.cz/velkyspalicek',
Пример #7
0
import re
import datetime

import times

from zitkino import parsers
from zitkino.models import Cinema, Showtime, ScrapedFilm

from . import scrapers, Scraper


cinema = Cinema(
    name=u'Kinokavárna',
    url='http://www.kinokavarna.cz/',
    street=u'Náměstí SNP 33',
    town=u'Brno',
    coords=(49.2179300, 16.6207072)
)


@scrapers.register(cinema)
class KinokavarnaScraper(Scraper):

    url = 'http://www.kinokavarna.cz/program.html'

    length_re = re.compile(r'(\d+)\s*(min|min\.|minut)')
    year_re = re.compile(r'\d{4}')
    time_re = re.compile(r'(\d{1,2})[:\.](\d{2})')

    def __call__(self):
Пример #8
0
# -*- coding: utf-8 -*-

import re
import datetime
from collections import namedtuple

import times

from zitkino import parsers
from zitkino.models import Cinema, Showtime, ScrapedFilm

from . import scrapers, Scraper

cinema = Cinema(name=u'Kino Scala',
                url='http://www.kinoscala.cz',
                street=u'Moravské náměstí 3/127',
                town=u'Brno',
                coords=(49.1974, 16.6082))

Row = namedtuple('Row', ['element', 'url'])

FilmInfo = namedtuple('FilmInfo', ['title', 'tags', 'url'])


@scrapers.register(cinema)
class KinoscalaScraper(Scraper):

    url = 'http://www.kinoscala.cz/cz/program/'

    tag_re = (
        # order is not arbitrary!