I am using requests in Python in order to get some data from a website, but there are multiple pages. They are accessible by modifying the URL parameter page=x
.
However by using GET like this :
r = requests.get(page, params={'sort':0, 'perPage':40, 'page':i})
the parameters are placed before the end of the URL, as print(r.url)
shows :
link.html?sort=0&perPage=40&page=1#/
instead of
link.html#/?sort=0&perPage=40&page=1
(see the "#/" placement)
Moreover, it seems that I can't pass the direct URL in the GET to access the other pages like this :
page_initial = "link.html#/
for i in range(1,50):
page = page_initial+"?sort=0&perPage=40&page={}".format(i)
r = requests.get(page)
...
This always returns the content of the first page again.
Am I missing something or am I using this wrongly ?