Reading text after hover

I am trying to read the text - 83572 after I hover on 83.5k followers word from https://twitter.com/news

Tried different ways to read but only getting the value as 83.5k and not the whole number 83572.

Kindly suggest!

The bot will fetch what it sees. You can have a conversion mapping dictionary. That will replace the k, m with *1000 and *1000000. But getting exact number from that source will not be possible.

1 Like

Hello @Mahalakshmi

Can you try to use Get Attribute activity for the text 83.5K and let us know if you are able to read the “text” attribute ?

Cheers.

1 Like

The text will also give the same result with k in the end. that binding happens in the backend and sent as a converted values.

2 Likes

Only way you can get the actual ccount is by checking the other sites to get that.

you can simply fetch the twitter username and pass that to those sites to get the actual count. there are various


websites, one of them is below

1 Like

Thanks for the response.

I tried capturing a screenshot after hover and reading text from that screenshot, that doesn’t work either!!!

1 Like

Hover will not work, only way is to get it from different site, you may even use API to get the count.

Hope this helps!

1 Like

Hi

I m just wondering what is happening on clicking that number of followers itself
If it takes to a new page then there we can find the number in total which we can get it with Get Attribute activity

Pls give a try with that

Cheers @Mahalakshmi

1 Like

Use Get Attribute against the “83.5k Followers” object and get the Tooltip attribute.

1 Like

Hello @Palaniyappan, I hope that would return the list of followers, if i am not wrong.

1 Like

I inspected this element on twitter with Chrome and UiExplorer and I have no clue, where this value is coming from. It is not reflected in any of the item’s attributes.

I sense some big tech shenanigans going on :smile:

Probably best to use twitter stat page like Rahul mentioned Reading text after hover - #5 by rahulsharma

3 Likes

I tried it on my tablet (can’t browse to twitter on work PC) and I don’t even get a tooltip when I mouse over it. I suspect it’s being generated via script, not HTML, which is why Ui can’t find it.

2 Likes

Yes! Appreciate your curiosity @postwick

To clear that point only, I added the screenshot with inspect element itself. I am 100% sure that there is no way to extract from twitter, because the binding happens before the data is loaded in the web. Hence no way to get exact count in there.

I just checked for other social handles too, seems they all have the same logic.

Found one thing :bulb:, we can get the list of users using the developer APIs, here’s the one for twitter:
GET followers/list | Docs | Twitter Developer Platform

This can be useful to you in getting the count without hitting any other website

BTW, for this usecase if we are opening twitter then, I assume hitting socialblade would not harm anyone either. @Mahalakshmi you could give a try and check if that works well with you.

2 Likes

Hi @Mahalakshmi,

Adding to the discussion, this is a tactic to ensure webscrappers cannot scrape values “easily”.

As you see in the screenshot, there is an event listener which will trigger a CSS element. If you can reverse engineer this and use the dynamically created class (within the span) and then try get attribute activity for inner text or innerhtml, may be just may be you can get the value. In this case its mouseover : vendors~main.84aa1b65.js which creates the dynamic class.

The function which changes the class of the span

An interesting problem, I am sure this is solved somewhere in the react.js community. Best bet is to talk to a react developer and find out what tricks you can use to reverse engineer this hidden element.

Goodluck!

1 Like

Thanks to all for the response and suggestions.

Hi @Mahalakshmi,

Try this workflow which works for all the Twitter accounts where the followers should be in million like(1M, 1.4M).

Hope it solves your query.

@TwitterFollowersCountv2.xaml (9.3 KB)

Regards,
@90sDeveloper

1 Like

Happy to help!

If your query is resolved you can mark a post as solution to close the thread

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.