I have gathered URLs from
sitemap.xml now I need category ID against category URL and Product ID against product URL. I want to do it by getting URL data from
In Magento 1.9 we use this code to get data by request path
How can we do it in Magento 2?