ayhoung 0 Posted May 25, 2013 Report Share Posted May 25, 2013 Hi everyone, I'm trying to scrape href links from just a portion of the attribute. I've used the "set" function to set the portion to a variable, but it doesn't seem I can use "scrape attributes" on a variable. I'm also trying to add it to a list such as below: Add list to list (%url_list, scrape_attribute($portion_of_page)) Is there any way you know that this could be achieved in some other way? Thanks,Allen Quote Link to post Share on other sites
nuc63 27 Posted May 25, 2013 Report Share Posted May 25, 2013 Set scrape Save to file or show in ui or check debugger. Keep trying to scrape it different ways to you get output you can work with. Quote Link to post Share on other sites
UBotDev 276 Posted May 25, 2013 Report Share Posted May 25, 2013 The only way to achieve this with "scrape attribute" function is to display that portion of the webpage. You can do that with "scrape attribute" where you scrape that portion, "load html" when you display that portion in a browser. After that you just scrape from browser which is now displaying portion instead of the whole page. Faster alternative is to use regular expression. Btw, for "click" command, approach is similar: http://www.ubotstudio.com/forum/index.php?/topic/13845-applying-sub-pages/ Quote Link to post Share on other sites
ayhoung 0 Posted May 26, 2013 Author Report Share Posted May 26, 2013 Thanks for the suggestions! It seems load_html was the simplest way to get it to work, but I'll also look into the regex method Quote Link to post Share on other sites
UBotDev 276 Posted May 27, 2013 Report Share Posted May 27, 2013 I thought you have standard version and REGEX is not available to you. Then just use scrape portion and use (<=<div>).*?(<=</div>), or replace accordingly to your code. 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.