예제 #1
0
def crawl_comicbook(site, comicid, chapter_number):
    comicbook = ComicBook.create_comicbook(site=site, comicid=comicid)
    chapter = comicbook.Chapter(chapter_number=chapter_number)
    assert len(chapter.image_urls) > 0

    print(chapter.to_dict())
    print(comicbook.to_dict())
    return comicbook, chapter
예제 #2
0
def crawl_comicbook(site, comicid, chapter_number):
    comicbook = ComicBook.create_comicbook(site=site, comicid=comicid)
    comicbook.start_crawler()
    chapter = comicbook.Chapter(chapter_number=chapter_number)
    assert len(chapter.image_urls) > 0

    logger.info(chapter.to_dict())
    logger.info(comicbook.to_dict())
    return comicbook, chapter
예제 #3
0
def _test_crawl_comicbook(site, comicid=None, chapter_number=1):
    comicbook = ComicBook.create_comicbook(site=site, comicid=comicid)
    comicbook.start_crawler()
    chapter = comicbook.Chapter(chapter_number=chapter_number)
    assert len(chapter.image_urls) > 0

    logger.info(chapter.to_dict())
    logger.info(comicbook.to_dict())

    result = ComicBook.search(site=site)
    assert len(result) > 0
    return comicbook, chapter
예제 #4
0
def get_comicbook(site, comicid):
    return ComicBook.create_comicbook(site=site, comicid=comicid)
예제 #5
0
def get_comicbook_from_cache(site, comicid):
    comicbook = ComicBook.create_comicbook(site=site, comicid=comicid)
    return comicbook