Jump to content
UBot Underground

Scraping from a portion of the webpage?


Recommended Posts

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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/

Link to post
Share on other sites

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.

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...