Jump to content
UBot Underground

Easy Newbie Question. How Do I Get A Url From A Button Tag


Recommended Posts

Ok, 

 

So below are the links that I want to turn into urls.

 

I have already scraped them into a list but I am having a problem removing the button stuff and adding in the "http://www.dollartree.combefore the sub directory.

Also afterwards I do not need other stuff.  I just need to make clean html links.

 

Can you help.  I think it with $replace but not sure how to get my head around it.

 

Thanks,

 

Kris

 

 

Here are the links:

 

<a class="" href="/household/kitchen-dining/drinkware/500c526c527/index.cat">Glasses</a>
<a class="" href="/household/kitchen-dining/Mugs/500c526c1218/index.cat">Mugs</a>
<a class="" href="/household/kitchen-dining/Barware/500c526c1111/index.cat">Barware</a>
<a class="" href="/household/kitchen-dining/Plastic-Cups-Travel-Mugs/500c526c1112/index.cat">Plastic Cups & Travel Mugs</a>
<a class="" href="/household/kitchen-dining/dinnerware/500c526c528/index.cat">Dinnerware</a>
<a class="" href="/household/kitchen-dining/Children-s-Dinnerware/500c526c916/index.cat">Children's Dinnerware</a>
<a class="" href="/household/kitchen-dining/cookware-bakeware/500c526c529/index.cat">Cookware & Bakeware</a>
<a class="" href="/household/kitchen-dining/Serving-Trays/500c526c530/index.cat">Serveware</a>
<a class="" href="/household/kitchen-dining/flatware-cutlery/500c526c531/index.cat">Flatware & Cutlery</a>
<a class="" href="/household/kitchen-dining/kitchen-utensils-accessories/500c526c532/index.cat">Kitchen Utensils</a>
<a class="" href="/household/kitchen-dining/linens-towels/500c526c533/index.cat">Linens & Towels</a>
<a class="" href="/household/kitchen-dining/barbecue/500c526c535/index.cat">Barbecue</a>
 
 
Thanks,
 
Kris
Link to post
Share on other sites

Still not working.

 

That picks up the whole page.  Thanks but that gave me 89 results.  Although the form was correct.

 

I am just trying to get the links for the subcategory on the left.

 

https://www.dollartree.com/household/kitchen-dining/500c526/index.cat

 

Here is what I got

 

<a class="" href="/household/kitchen-dining/drinkware/500c526c527/index.cat">Glasses</a>
<a class="" href="/household/kitchen-dining/Mugs/500c526c1218/index.cat">Mugs</a>
<a class="" href="/household/kitchen-dining/Barware/500c526c1111/index.cat">Barware</a>
<a class="" href="/household/kitchen-dining/Plastic-Cups-Travel-Mugs/500c526c1112/index.cat">Plastic Cups & Travel Mugs</a>
<a class="" href="/household/kitchen-dining/dinnerware/500c526c528/index.cat">Dinnerware</a>
<a class="" href="/household/kitchen-dining/Children-s-Dinnerware/500c526c916/index.cat">Children's Dinnerware</a>
<a class="" href="/household/kitchen-dining/cookware-bakeware/500c526c529/index.cat">Cookware & Bakeware</a>
<a class="" href="/household/kitchen-dining/Serving-Trays/500c526c530/index.cat">Serveware</a>
<a class="" href="/household/kitchen-dining/flatware-cutlery/500c526c531/index.cat">Flatware & Cutlery</a>
<a class="" href="/household/kitchen-dining/kitchen-utensils-accessories/500c526c532/index.cat">Kitchen Utensils</a>
<a class="" href="/household/kitchen-dining/linens-towels/500c526c533/index.cat">Linens & Towels</a>
<a class="" href="/household/kitchen-dining/barbecue/500c526c535/index.cat">Barbecue</a>
 
Hope it helps.
 

 

 

Thanks

Link to post
Share on other sites

This will get those sub categories from the above link

add list to list(%href,$scrape attribute($element child(<class="off">),"href"),"Delete","Global")
add list to list(%names,$scrape attribute($element child(<class="off">),"innertext"),"Delete","Global")
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...