Jump to content
UBot Underground

Locating a specific comment on YouTube


Recommended Posts

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

quite easy

 

show all comments

mouse over <innertext="your comment here">

then click the thumbs, or whatever you like from it.

 

or you can add all comments to a list

loop till your comment innertext, and use position to mouse over, then click whatever you like.

Link to post
Share on other sites

quite easy

 

show all comments

mouse over <innertext="your comment here">

 

then click the thumbs, or whatever you like from it.

 

or you can add all comments to a list

loop 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 {
        }
    }
}

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...