Skip to content

Enforce ‎SerpResults.yield_pages to start from the first page #12

Open
@ilyazub

Description

@ilyazub

Currently, ‎SerpResults.yield_pages skips the first page. Because of that, it's required to duplicate the results processing in the clients' code.

current_page = self
while current_page.next_page_url and current_page_count < max_pages:
current_page = current_page.next_page()
current_page_count += 1
yield current_page

Let's yield current_page before entering the pagination loop.

@kennethreitz @jvmvik

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