thmgoodw 0 Posted March 10, 2010 Report Share Posted March 10, 2010 Hi everyone, I've only have ubot for about a week now, but have been experimenting with it and creating bots with all of the great info around here, in the ubottutorials and on vimeo. Unfortunately, I hit a stumbling block. I am trying to build a bot that will identify when a signature includes links with the nofollow tag. The plan is to save the current URL if the nofollow tag exists. The issue is that the particular pages in question, have mulitiple instances of the nofollow tag. They nofollow things like the register button, the search button, etc., which I don't care about. Here is an example of one of the pages (with nofollow links in the signature). It doesn't appear that I can use the normal ubot search function to find find nofollow tags as I can't limit it to the signature portion of the source code. If I could use wildcards it would be possible, but my understanding is that wildcards can't be used for searches. I can also easily scrape the signature, but I can't seem to figure out how to then search that scraped signature for the nofollow tag. Any insight or advice would be greatly appreciated. Tom Quote Link to post Share on other sites
Aaron Nimocks 19 Posted March 11, 2010 Report Share Posted March 11, 2010 I looked for a few minutes. This one I think is going to require javascript. If I have time later maybe I will come up with a solution for you. 1 Quote Link to post Share on other sites
Aaron Nimocks 19 Posted March 11, 2010 Report Share Posted March 11, 2010 Attached is a bot that will search between the Signature tags and save it in a List. Then it will use Next List Item and run it through some javascript. It will return 1 if the word "nofollow" is found. Worked with the sample page you gave.thmgoodw.ubot 1 Quote Link to post Share on other sites
crazyflx 22 Posted March 11, 2010 Report Share Posted March 11, 2010 While I didn't need this for this particular problem, it was nice to see how that works. I've got about a million uses for a solution like this. Thanks (yet again, haha) Aaron! Quote Link to post Share on other sites
thmgoodw 0 Posted March 11, 2010 Author Report Share Posted March 11, 2010 Attached is a bot that will search between the Signature tags and save it in a List. Then it will use Next List Item and run it through some javascript. It will return 1 if the word "nofollow" is found. Worked with the sample page you gave. You are a man among boys Aaron. Thank you so very much. Tom Goodwin Quote Link to post Share on other sites
HarryPotter 9 Posted December 21, 2010 Report Share Posted December 21, 2010 any way to evaluate if the chosen item has rel="nofollow" or not? i think from the method above, it checks the entire page for "nofollow" rather than the specific link? Quote Link to post Share on other sites
HarryPotter 9 Posted December 22, 2010 Report Share Posted December 22, 2010 nope, nevermind. everything is working fine! for anyone else wondering about the same problem, it made sense after reading this: http://www.w3schools.com/jsref/jsref_indexOf.asp thanks aaron Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.