RonaldRaygun 0 Posted May 9, 2013 Report Share Posted May 9, 2013 So I'm currently working on a youtube comment rating bot of my own. I'm able to log into youtube and navigate to the video without a problem. What I'm trying to do is scrape the youtube comments and loop through them in order to identify the comment I'm looking for. Then I would go and identify the thumbs up button and click that. Any suggestions as to how I could approach this problem? I am able to uniquely identify a youtube comment based on the 43 character commentID, and match the comment when looping. I'm just not sure how to go about clicking the thumbs up button. Quote Link to post Share on other sites
Gogetta 263 Posted May 9, 2013 Report Share Posted May 9, 2013 Good luck on finding a way to click the thumbs button. The only way I have ever been able to do this was by passing the post data. Quote Link to post Share on other sites
RonaldRaygun 0 Posted May 9, 2013 Author Report Share Posted May 9, 2013 I'm assuming the same goes for the other social functions such as: Marking as spamUnmarking as spamVoting up / down Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted May 9, 2013 Report Share Posted May 9, 2013 quite easy show all commentsmouse over <innertext="your comment here">then click the thumbs, or whatever you like from it. or you can add all comments to a listloop till your comment innertext, and use position to mouse over, then click whatever you like. Quote Link to post Share on other sites
Gogetta 263 Posted May 10, 2013 Report Share Posted May 10, 2013 quite easy show all commentsmouse over <innertext="your comment here"> then click the thumbs, or whatever you like from it. or you can add all comments to a listloop till your comment innertext, and use position to mouse over, then click whatever you like. No, actually what you are suggesting doesn't work. If you use the mouse over as you have described the bot will only vote the first comment listed on a video. Given there is way to do it using the browser. Here is the code I came up with. My code: ui text box("User to vote", #user to vote) clear list(%get users) add list to list(%get users, $scrape attribute(<data-author-id=w"*">, "innertext"), "Don\'t Delete", "Global") loop($list total(%get users)) { set(#check user, $next list item(%get users), "Global") if($contains(#check user, #user to vote)) { then { set(#users position, $list position(%get users), "Global") decrement(#users position) type text($element offset(<class="yt-uix-button-icon yt-uix-button-icon-watch-comment-vote-up">, #users position), " ", "Standard") } else { } } } 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.