kindle-open-books icon indicating copy to clipboard operation
kindle-open-books copied to clipboard

只有前100个小节

Open hnuzhoulin opened this issue 9 years ago • 0 comments

非常感谢介绍这个优秀的软件,但是我是用您的方法生成的书只有前面100个小节,后面的没有。 书籍地址是:https://support.omnigroup.com/documentation/omniplan/mac/3.0/zh/contents/

我的recipe文件为:

from calibre.web.feeds.recipes import BasicNewsRecipe

class Git_Pocket_Guide(BasicNewsRecipe):

    title = 'OmniPlan 3 for  MAC User Mannual zh'
    description = ''
    cover_url = 'https://support.omnigroup.com/doc-assets//OmniPlan-Mac/OmniPlan-Mac-v3.0.0.1/zh/EPUB/art/cover.thumbnail.jpg'

    url_prefix = 'https://support.omnigroup.com/'
    no_stylesheets = True
    #keep_only_tags = [{ 'class': 'body_content' }]

    def get_title(self, link):
        return link.contents[0].strip()

    def parse_index(self):
        soup = self.index_to_soup(self.url_prefix + 'documentation/omniplan/mac/3.0/zh/')

        div = soup.find('nav', { 'epub:type': 'toc' })

        articles = []
        for link in div.findAll('a'):
            # if '#' in link['href']:
            #     continue

            # if not 'ch' in link['href']:
            #     continue
            print(link)
            til = self.get_title(link)
            url = self.url_prefix + link['href']
            a = { 'title': til, 'url': url }
            print(a)

            articles.append(a)

        ans = [('OmniPlan-Mac-zh-v3.0.0.1', articles)]

        return ans

hnuzhoulin avatar Feb 18 '16 05:02 hnuzhoulin