Jump to content
UBot Underground

Having trouble scraping href urls from webpage


Recommended Posts

I'm trying to scrape the href urls from a page, however so far I've been unsuccessful... The page has different peoples names on it, with each of their names containing a link to their profile.

 

This is the code that contains the hreflink (the person name contains the URL that i want to scrape

 

 

<li class="clickable">
<input type="hidden" id="quick_follow_username_15768" value="MathewPeter">
<input type="hidden" id="quick_follow_name_15768" value="Mathew Peter">
<div class="image-container">
<a href="Mathew Peter">
<img src="http://img.com" alt="Mathew Peter" >
</a>




I want to grab the hyperlink that is bolded with the persons name above...

do I have to use regex to do this? (havent got much experience) any help would be most welcome, cheers

Link to post
Share on other sites

add list to list(%Names1, $list from text($page scrape("<div class=\"image-container\">
<a href=\"", "\">
<img"), $new line), "Delete", "Global")
add list to list(%Names2, $list from text($scrape attribute(<href=w"*">, "fullsrc"), $new line), "Delete", "Global")
add list to list(%Names3, $list from text($scrape attribute(<href=w"*">, "href"), $new line), "Delete", "Global")

Link to post
Share on other sites
add list to list(%Names1, $list from text($page scrape("<div class=\"image-container\">
 <a href=\"", "\">
 <img"), $new line), "Delete", "Global")
add list to list(%Names2, $list from text($scrape attribute(<href=w"*">, "fullsrc"), $new line), "Delete", "Global")
add list to list(%Names3, $list from text($scrape attribute(<href=w"*">, "href"), $new line), "Delete", "Global")

 

That pulled every url (including .css links/outbound/inbound unrelated links from the page...

 

here is some more source code from the page that could help?

 

Once again, the href="kelvin.hos"  (the underline) is the only type of links that I want to scrape

<div class="details bold">
                        <a class="clickable-target" href="kelvin.hos">
                            <h4 class="orange">Kelvin  Hos</h4>
                        </a>

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