How to get the current page URL in the query library?

I am in a cycle looking through the results of a search on the pages. The next button never disappears. I want to keep clicking on it until the URL changes anymore. I think I need a query session? I want to do something like this:

new_url = soup.find("blahblah")['href']
if session.current_url == new_url:
    return
+4
source share
1 answer

The response object has a property .urlthat you can use to access the URL of the current page.

+7
source

Source: https://habr.com/ru/post/1621136/


All Articles