Hello fellow scrapers!
I am scraping data from shops that sell items, using start urls with range. Every now and then, new items are added to the shops, making the amount of pages change. I am trying to figure out if there is a way, using the range method on start urls, to have a variable upper limit, that would automatically capture the amount of pages the site has without me having to check out the site every other day and make the appropriate changes on my Sitemaps.
For example I want this:
.../catalog?page=[1-45]
to work like this:
.../catalog?page=[1-"last page"] , in case more items are added in the future and the pages become 46 or 50 or 150.
I am already aware of (and using) the Pagination Selector, however due to some quirks of specific sites, this can method can become very inconvenient.
In case the approach of having a variable upper limit on the range is impossible to implement, I am open to suggestions that would solve this problem.
Thanks in advance for your time!
Kind regards,