Jump to content
UBot Underground

problem scraping table to list


Recommended Posts

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

Link to post
Share on other sites
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 databases
  • scrapes all database
  • saves to file

 

If this post was useful click  "Like This" button ->

  • Like 1
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...