Hello. The task is to parse the page, but before taking its DOM, you need to modify it somewhat. The fact is that on the page all the links are wrapped with the <span> and only after targeting this element they are converted into the <a> tag. The code that solves this problem looks something like this:

 $("tr > td > div > div.bus-point > div > span").mouseenter().mouseleave(); 

Those. first I need to get to the page, execute this command and only after that pick up the DOM page. Tell me, is it possible at all, and if possible, how to implement it? Thanks in advance to all responded.

  • Hovering over the <span> , where the data for the <a> tag come from. For example, where does href come from? - Stepan Kasyanenko
  • In general <br> </ span> Well, as the link is generated from it, the javascript on the page is somehow responsible for this - lost
  • @lost and what, the religion does not allow to take a span and its attributes and convert it into a link on its side? Look at the same JS as the link is converted there. Or is it problematic to open the console and browser resources? - Alexey Shimansky
  • one
    @ Alexey Shimansky, do not scoff. Everyone has different levels of knowledge. @lost. And you, it seems, need to collect all the tags <span> and take the data-a attribute from them, it contains the link href <a> tag, which <span> is converted in the browser. - Stepan Kasyanenko
  • @StepanKasyanenko thank you very much for understanding. I thought about converting a span into a link on my side, but I could not find out how it was done on their side. - lost

1 answer 1

Found a solution.

 data-a="!aHR0cHM6Ly93d3cuYXZ0b3Zva3phbHkucnUvcmFzcGlzYW5pZS9‌​tb3NrdmEvc2NoZWxrb3Z‌​v" 

It is decoded by the base64_decode() function. Many thanks to all who responded.