[SOLVED] How to crawl text embedded in tooltips using scrapy

Issue

This Content is from Stack Overflow. Question asked by Michael

I’d like to crawl the data that is embedded in a tooltip which becomes visible when you hover over the cell where the tooltip belongs to.

For example, I’d like to extract the tooltip in the row 10Bet and column 1 using scrapy (via splash requests) of

https://www.oddsportal.com/tennis/morocco/wta-rabat-2017/saville-daria-zanevska-maryna-r9VW6N40/



Solution

These tooltips are just title attributes

You tagged you question as javascript so:

console.log(document.querySelector('p').title)
<p title="hidden text">Some text with tooltip</p>


This Question was asked in StackOverflow by Michael and Answered by Konrad Linkowski It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?