Jump to content
UBot Underground

Wordpress Bot Advice Needed


Recommended Posts

UBot Newbie here - just asking for some general direction...

 

I need to create a bot which performs repetative tasks in wordpress - basically cycling through every post and clicking a button.

 

I need a loop. The only thing that I can tell on the Wordpress post page is when it comes to the last page, the right 'arrow' buttons (one is 1 page forward and the 2nd is to the end) are greyed out. Not sure how to harness that yet.

 

I also need to click on each link to go into the post.

 

Then I need to click on the the target button.

 

Then I need to exit out of that post and go to the next and repeat, until it gets to the last listing on a page, and then it needs to click the right arrow to go to the next page.

 

Thank you.

 

Regards,

 

Stan

Link to post
Share on other sites
  • 2 weeks later...

Hi John,

 

This is all backend work...

 

When I scrape a page of links, they, as a whole, are inserted into a single list array item (http://screencast.com/t/WAFKkS9N). So, when I want to traverse through the list to visit the links (in my case), it navigates to a full string of urls, which will never resolve...

 

Here is my code for your kind consideration...

 

 

define initialize everything {

clear list(%LPN Page Links)

clear cookies

}

define navigate to and login {

navigate("http://sanantonio.emergencyacservice.com/wp-admin", "Wait")

type text(<username field>, "admin", "Standard")

type text(<password field>, "adminfakepassword", "Standard")

click(<login button>, "Left Click", "No")

wait(3)

click($element offset(<class="wp-has-submenu wp-not-current-submenu menu-top menu-icon-local-page">, 1), "Left Click", "No")

}

define scrape lpn links {

wait(5)

loop(4) {

wait(4)

add item to list(%LPN Page Links, $scrape attribute(<outerhtml=w"<a href=\"http://*/wp-admin/post.php?post=*&action=edit\" title=\"Edit this item\">Edit</a>">, "fullhref"), "Don\'t Delete", "Global")

wait(2)

click($element offset(<class="next-page">, 0), "Left Click", "No")

}

wait(3)

}

define process lpn links {

loop(2) {

navigate($next list item(%LPN Page Links), "Wait")

}

}

divider

initialize everything()

navigate to and login()

scrape lpn links()

process lpn links()

 

Thanks very much!

 

Stan

Link to post
Share on other sites

Change add item to list to add list to list.

 

John

 

Hi John,

 

Thanks for the response.

 

I don't quite understand. 'Add List to List' requires 2 lists, does it not? - I'm scraping urls from a page and adding them to a list.

 

When I put in the 'Add List to List', the only paramaters/options I have is a list (top and bottom) - I tried to put in a '$scrape attribute', but it's not taking it.

 

I must be missing something.

 

Thanks,

 

Stan

Link to post
Share on other sites

Hi John,

 

Thanks for the response.

 

I don't quite understand. 'Add List to List' requires 2 lists, does it not? - I'm scraping urls from a page and adding them to a list.

 

When I put in the 'Add List to List', the only paramaters/options I have is a list (top and bottom) - I tried to put in a '$scrape attribute', but it's not taking it.

 

I must be missing something.

 

Thanks,

 

Stan

 

Nevermind, it's taking the scrape attribute afterall - not sure what I was doing before...

Link to post
Share on other sites

Ok...it definitely works....whenever you use add item to list, even if you have 1000 items it treats them as a single item.

 

 

John

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...