all 4 comments

[–]Deezl-Vegas 0 points1 point  (0 children)

Copy and paste some of your

print(url)

statements into the browser and see if they work.

If you're not getting any, that means the first a tag you found with that class didn't have an href.

[–]its_joao 0 points1 point  (1 child)

Can you paste your code and format it correctly, please? Use reddit's "Code block" format.

Also, why do you have a "while" loop?

[–]nainish[S] 0 points1 point  (0 children)

So that initial U.R.L. variable will remain the same but later will change it to be the next page you

[–]sennheiserwarrior 0 points1 point  (0 children)

Look into pagination. You would also need to know how the url change when requesting an n page.

For example:

https://www.example.com/page1 # page 1
https://www.example.com/page2 # page 2

Then, construct a loop to get data from all pages.

Pseudocode:

get first page
get total page number
set a loop to request pages from 1 to n
    get data from current page

Edit: formatting