Jump to content
Sign in to follow this  
DavidTunnell

extracting link from href tag

Recommended Posts

I am making a script that automates a backup process. I have all of the code working to login and create the backups. Once they are done I navigate to another page and within the HTML is the following.

<a class="download rep_sprite_backup" href="http://XXXXXX.com/wp-content/infinitewp/backups/XXXXXX.com_manual_full_2013-09-10_0e53f188c3e8fef2eb38c79c735526bd.zip" aria-describedby="ui-tooltip-16"></a>
 
How can I extract the link within the href tag? I want to use it with InetGet() to download the files to a specific location.
 
Note: as is shown there is no ID tag for the link
 
Thanks.
Edited by DavidTunnell

Share this post


Link to post
Share on other sites

- Get all elements with tagname "a"
- For each element in those elements
- If element.classname equals to "download rep_sprite_backup"
- then that element.href is the data you need, and you can exit the "for each" loop.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...