Skip to content

Less videos and pages than normal search #1

Open

Description

@kanaritech

I found that a normal search would give a results_count of ~20.000 videos, but if I made the same search in the webpage, I would give me ~80.000.

Doing some changes, I found that if I put this in your get_soup function in base.py:

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
}
response = requests.get(full_url, headers=headers, params=params)

Instead of this:
response = requests.get(full_url, params=params)

It correctly gives me the exact number as in the webpage.

I copied the User-Agent from my Chrome browser.

And the pagination is fixed also!

Before I would give me a poor 12 pages: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
Now it gives me the correct: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 149]

I hope it helps!

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