Jump to content
UBot Underground

load and scrape url contents in the background


Recommended Posts

Is it possible to load a url and then crape its contents without navigating to the actual url itself?

 

example: say in my Ubot browser, I currently have google.com but I want to scape the contents of bing.com (in the background) so I can look if a certain text that exist on bing.com (while its running in the background) that I can manipulate in my current browser which is google.com.

 

Can it be done? TIA

 

 

Link to post
Share on other sites

Sure. Process would be something like ...

1) Navigate to Google

2) In a new thread Goto Bing. Scrape what you need & save in a variable / lists / table.

3) Once the thread has finished... use the data you saved to do what ever you wish on the Google page

Link to post
Share on other sites

What do you mean new thread? Add new script?

I tried that but when I'm navigating to bing.com in a new script, the current script also navigate to bing.com which I don't want to happen. 

I guess all scripts shared one browser. right?

Link to post
Share on other sites

Threads will only allow you to run multiple browsers side by side, so I think you are missing the part about browsers as well.

 

As answered in the other topic you've opened, one way is to use "in new browser" command to spawn a new browser, or as an alternative you could also use "$read file" function, which reads the content of the page but doesn't render it in a browser, it just stores the HTML inside UBot variable.

Link to post
Share on other sites

too bad I don't have Pro or Dev so I don't have access to threads.

 

I tried using "in new browser" to navigate to the iframe src but it loads the site in the new script as well as in the original script basically sharing the same browsers all through out the scripts.

 

It would be good if the main script has google.com running and the other script has bing.com simultaneously running so I can scrape dynamic contents to and from. (if that all is possible).

Link to post
Share on other sites

UBotDev is right. I guess with so may browser crashes I just get use to multi-threading with http and skip the browser completely.


'in new browser' will allow you to view both pages at the same time. Before the new browser closes, just save the page to a variable OR use read file (agin into a variable) as mentioned.

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