ksistrunk 0 Posted December 23, 2015 Report Share Posted December 23, 2015 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 Quote Link to post Share on other sites
pash 504 Posted December 23, 2015 Report Share Posted December 23, 2015 try. add list to list(%ProductCategory,$scrape attribute(<href=w"/household/*/*">,"fullhref"),"Delete","Global") alert(%ProductCategory) Quote Link to post Share on other sites
ksistrunk 0 Posted December 24, 2015 Author Report Share Posted December 24, 2015 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 Quote Link to post Share on other sites
deliter 203 Posted December 24, 2015 Report Share Posted December 24, 2015 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") Quote Link to post Share on other sites
ksistrunk 0 Posted December 25, 2015 Author Report Share Posted December 25, 2015 It worked! Thanks. I was not very familiar with using "Element Child". Thanks again. 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.