Jpizzo 0 Posted December 18, 2014 Report Share Posted December 18, 2014 http://posting.albany.backpage.com/online/classifieds/PostAdPPI.html/alb/albany.backpage.com/?u=alb&serverName=albany.backpage.com&category=5416§ion=4374 Guys when I make a script to navigate to each of the pages I have which is over 400 of them, I want to post to each biz op page for an actual job that I am offering for sales reps. Anyway I go to the page that you see above and now have to scrape each one and pick them each in a new navigation. Blah blah I can't scrape the href's and it's got me going crazy here is the code: loop($list total(%urls)) { navigate($list item(%urls,#number),"Wait") click(<value="Post Ad">,"Left Click","No") wait for browser event("Everything Loaded","") wait(5) click(<data-name="services">,"Left Click","No") wait(5) click(<data-category=5416>,"Left Click","No") wait(5) add list to list(%chooselocation,$scrape attribute(<href=w"/online/classifieds/*;section=4374&category=5416">,"href"),"Delete","Global") increment(#number) in the add list to list, there doesn't seem to be anything special about the url other than the section and category. I tried using wildcards but they dont work at all for me on this and when I try to use regular expressions they dont work because I dont know enough about them. What am i doing wrong? I need the hrefs for each location at the above link but I am doing this for a specific number of states. I need tips on what to do. I have watched videos on youtube and havent found anything that has helped. Quote Link to post Share on other sites
Edward_2 85 Posted December 18, 2014 Report Share Posted December 18, 2014 Is this what your looking for, Done with wildcards. It scrapes the cities in the url you gave. add list to list(%urls, $scrape attribute(<outerhtml=w"<a href=\"/online/classifieds/PostAdPPI.html/*/*.backpage.com/?u=*&serverName=*.backpage.com&superRegion=*§ion=4374&category=5416\" data-superregion=\"*\" data-multiple=\"no\">*</a>">, "fullhref"), "Delete", "Global") 1 Quote Link to post Share on other sites
Jpizzo 0 Posted December 18, 2014 Author Report Share Posted December 18, 2014 Much Appreciated it worked thanks Quote Link to post Share on other sites
Edward_2 85 Posted December 18, 2014 Report Share Posted December 18, 2014 Your welcome. Thank you for letting me know 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.