theninjamanz 29 Posted June 9, 2016 Report Share Posted June 9, 2016 Hello! I'm scraping stuff to variables from a page with wildcards (God I love Ubot for this stuff!!). Here's an example of Debugger view: #variable1-1-2-3-4-5-6-7-8 #variable2-A-B-C-D-E-F-G-H Once the collection has completed what I want to do is save off a file as follows: 1,A2,B3,C4,D5,E6,F7,G8,H Before I start writing an almighty loop (there are 12 variables to in total) which will send me into a dark place, are there any other ways that I might consider achieving this? I have already tried converting the variables to lists and then inserting those lists as columns in a table, but that does not work. Thanks Ninjamanz. Quote Link to post Share on other sites
theninjamanz 29 Posted June 9, 2016 Author Report Share Posted June 9, 2016 Managed to get this working. The problem I had was in the scraping, fixed that and then it worked like this: add list to list(%stuff,$scrape attribute(<outerhtml=w"<h5 =\"yummyyummy\">*</h5>">,"innertext"),"Delete","Global")add list to table as column(&results,0,1,%stuff) It would be nice to be able to use variables for this, lists can get quite painful having to always clean them afterwards! Quote Link to post Share on other sites
stanf 43 Posted June 9, 2016 Report Share Posted June 9, 2016 What I like to do is attempt to isolate the block of code that the data resides in, and scrape that block of code in to s list and then work on each individual block.This helps avoiding a case where what you are scraping may have a flawI.e. Everyone has an address except one.If you just scrape name to one list and address to another list and one doesn't have an address your scrape will be flawed.---- I used to dig in and attempt to do it by Regex witch is a major pain, but since Dan put out his xpath plugin for UBot browser the job has become a lot easier-----Just my thoughts Quote Link to post Share on other sites
theninjamanz 29 Posted June 15, 2016 Author Report Share Posted June 15, 2016 Cheers buddy. 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.