def test_movie_page_parsing(): with open('fixtures/movies_page.html') as f: items = parsers.parse_movie_page(f.read()) assert len(items) == 25
def list_movies(page): html = utils.fetch_html(MOVIES_URL % page) return parsers.parse_movie_page(html)
def list_genre(genre, page): url = GENRES[genre] url += '?page-%s' % page html = utils.fetch_html(url) return parsers.parse_movie_page(html)
def list_series(page, order='view'): html = utils.fetch_html(SERIES_URL % (order, page)) return parsers.parse_movie_page(html)
def list_genre(genre, page): url = GENRES[genre] url += "?page-%s" % page html = utils.fetch_html(url) return parsers.parse_movie_page(html)
def list_series(page, order="view"): html = utils.fetch_html(SERIES_URL % (order, page)) return parsers.parse_movie_page(html)