Fabier 11 Posted February 29, 2012 Report Share Posted February 29, 2012 So I found this other thread on the board that helped me with putting variables into my selectors (basically drop the quote marks): http://ubotstudio.com/forum/index.php?/topic/7984-how-to-use-a-variable-in-your-selector/ But this didn't help me with using wildcards. This is what I'm going for: set(#agentid, "84574574", "Global") add list to list(%agentevents, $scrape attribute(<href=w"*#agentid*">, "href"), "Delete", "Global") They Key piece being this: <href=w"*#agentid*"> I need that agent id variable to turn into an actual variable while still maintaining the wildcards. Basically, there is a collection of links related to a specific "agent id" (its in the HREF) on the page, but I couldn't find any way to group them, so I'm trying to scrape them all into a list. That way I can loop through the list and manipulate each link individually. But I'm having trouble selecting the elements without wildcards . I'd post the page but its behind closed doors which I cannot open up to the public . Any thoughts? Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted March 1, 2012 Report Share Posted March 1, 2012 Hi you can PM me the url you wanted to scrape certain parts. Quote Link to post Share on other sites
k1lv9h 76 Posted March 1, 2012 Report Share Posted March 1, 2012 Hi, For variables you need to put them in { }.ex.add list to list(%agentevents, $scrape attribute(<href=w"*{#agentid}*">, "href"), "Delete", "Global") Your sample code with the change.sample-var-in-scrape-attribute-001.ubot Kevin 2 Quote Link to post Share on other sites
Fabier 11 Posted March 1, 2012 Author Report Share Posted March 1, 2012 Oh! You are my knight in shining armor! Where have you been all my life? In short: worked like a charm! Thanks . Quote Link to post Share on other sites
HarryPotter 9 Posted December 1, 2012 Report Share Posted December 1, 2012 Kevin! worked like a charm THANK YOU 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.