Answer the question
In order to leave comments, you need to log in
How to get page url?
Can you please tell me how to get the url of the page you are on using python?
The web page itself has no links to the page itself to parse from any link.
For example, I went to the site domen.ru/catalog/product-1
how to get the url itself - domen.ru/catalog/product-1 from the address bar of the browser?
Answer the question
In order to leave comments, you need to log in
Judging by the presence of the word "parse", it still means a URL request from python for subsequent parsing. How to get the url of the request that just requested? I think, save to a variable before the request and read from the variable immediately after. If scrapy or other libraries are used to bypass the Internet, then the details are in the studio.
If the question really is to get the URL from the browser address bar, then I would first of all look at the browser api (which you can probably reach in the same way as Selenium does) or extensions (which are not in python, but in js) - followed by sending this url to the server.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question