C
You didn't take a very good example, because it wasn't just a ref.If you answer your question, the last address is always:response.RequestMessage.RequestUri //https://rozetka.com.ua/ua/search/?text=гречка
Why isn't that what was expected and how to get what you needed?To that end, let's follow the way the browser communicates with the server and what queries go: As you can see, when's on the site, he's directing us right away. https://rozetka.com.ua/ua/search/?text=гречка and it's for the website the final result, and it's not redirecting anymore. Okay, but where's the link from? Look at the queries. We're right here to see that the uses of the API and loads everything into some kind of frime, and the link is out. https://search.rozetka.com.ua/ua/search/api/v4/?front-type=xl&text=гречка&lang=ua{
"data": {
"quantities": null,
"pagination": null,
"options": [],
"filters": [],
"conditions": null,
"chosen": [],
"related_options": null,
"meta": {
"result_info": null,
"h1": "",
"title": "",
"keywords": "",
"description": "",
"navigateTo": {
"fragment": {
"search_text": "гречка"
},
"fragment_raw": "search_text=%D0%B3%D1%80%D0%B5%D1%87%D0%BA%D0%B0",
"host": "rozetka.com.ua",
"path": "/ua/krupy/c4628397/vid-225787=grechka/",
"query": [],
"query_raw": null,
"scheme": "https",
"url": "https://rozetka.com.ua/ua/krupy/c4628397/vid-225787=grechka/#search_text=гречка",
"url_api": ""
}
},
"categories": null,
"goods": null
}
}
And with the help of the JS, there's a substitution of the address line, but it's not a redirector.So, if you want a particular reference, send a request to the API address, and then get a link out of it (JPOON de-regulation).