Skip to content

无法翻页问题 #22

Description

@karmas056

章节跳转到该章节的第一页时无法点击;

增加以下下代码,解决;

n = 2
while True:
.....
 # go to next page or chapter ;266行
            try:
                next_btn.click()
            except Exception:
                self.switch_to_context(tag=n + 1)
            n += 1

修改方法

 def switch_to_context(self, tag=2):
        """switch to main body of the book"""
        self.S('button.catalog').click()
        self.S(f'li.chapterItem:nth-child({tag})').click()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions