Skip to content

Handle pagination #4

Description

@eight04

It is often that we have to grab multiple pages to get all images. With the current hook get_chapter_files, we have to implement something like this:

page_url = chapter.url
count = 0
while True:
  content = self.request.get(page_url)
  # parse content and find image links
  for url in urls:
    yield Image(...)
    count += 1
  # parse content and find next page
  if not next_page_url:
    break
  page_url = next_page_url

The problem is that you always have to start from the first page. I want to allow users to pause the download process, save the process to the disk, restart the application, load the process and continue.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions