I'm creating a way to extract data from Twitter without being quoted with their API values. The best way I found it was by using the widget that they make available (and that has no quota) and from their upload I "pick up the information" and treat it.
My problem is that I can not think of a way to make the page check for a tag in the body
element that Twitter creates after it loads [data-twttr-rendered=true]
.
I tried to make a setInterval
by analyzing if this exists and, if it exists, it executes a function and as callback already executes its own clearInterval
like this:
var twitter = setInterval(function(){
if($('body[data-twttr-rendered=true]').length != 0){
page.twitter.mutage(function(){clearInterval(twitter)});
}
},1000);
The problem that when running such a code I can bugar the DOM and crash the whole site ...
Does anyone have a better answer for me please?