winwell 1 Posted April 30, 2013 Report Share Posted April 30, 2013 I have a script that navigates to my phpmyadmin, logs in and displays a list of the databases under this user - there's 56 databases in this case. The list of databases are displayed on the screen and I want to scrape that list into a list. HEre's what I've tried so far which hasn't worked: clear list(%databases) ui stat monitor("Number of databases:-", %databases) click(<innertext="Databases">, "Left Click", "No") add list to list(%databases, $scrape attribute(<class="name">, "outertext"), "Don\'t Delete", "Global") save to file("C:path_to_my_file\\databases.txt", %databases) I've also tried the innertext attribute as well. When I add scrape_attribute to the list to scrape I select one of the databases in the list displayed on the screen. That populates the Element to scrape with <class="name">. Here are details of the HTML: <td class="name"> <a onclick="if (window.parent.openDb && window.parent.openDb('database_name')) return false;" href="index.php?token=ab9447187bc720f7ecd6a1022c9e5384&db=database_name" title="Jump to database "database_name"." target="_parent"> database_name </a> </td> As you can see, it's the name class I want in order to get the database_names. When I run this I was expecting to get a list of the 56 database names but I get nothing and when I added a stat monitor to track the database list, it is empty. I am obviously doing something wrong. I appreciate it might be difficult for you without seeing the html page, but can anyone point me in the right direction - or suggest things to try? Thanks Quote Link to post Share on other sites
nuc63 27 Posted April 30, 2013 Report Share Posted April 30, 2013 ui stat monitor("ff", #scrape) click(<innertext="Databases">, "Left Click", "No") wait(15) set(#scrape, $scrape attribute(<href=w"index.php?token=*&db=*">, "innertext"), "Global") wait(2) save to file("C:\\Users\\Ken\\Desktop\\scrfa.txt", #scrape) login to phpmyadmin. (my phpmyadmin looks like this http://screencast.com/t/SokWj40JsGzT)run bot clicks databasesscrapes all databasesaves to file If this post was useful click "Like This" button -> 1 Quote Link to post Share on other sites
winwell 1 Posted May 1, 2013 Author Report Share Posted May 1, 2013 @nuc63 - Thank you - I see where I went wrong - that worked 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.