-
Content Count
790 -
Joined
-
Last visited
-
Days Won
34
Posts posted by VaultBoss
-
-
You need to implement a LOOP WHILE logic there (the IF you were talking about would be 'surrounded' by the LOOP WHILE code, so to speak)
-
This code will extract only the LAST occurence:
(?<=.*").*\..*(?=".*$)
...otherwise, just like UBotDev.com said above, add everything to a list (so that you eliminate dupes that way and then loop through it and eliminate anything else that doesn't suit your needs.
-
Use IMAP
-
If you know for sure how many times a loop may have to run, then you don't need an increment if you're not using that as a variable to pull data specifically from a certain list item or table cell, etc...
...because a simple LOOP will automatically restart from its beginning for the set number of times you specified.
However, if you NEED the loop index to select list items with $list item or table cells, etc... then you will use the increment command at the end of the instructions contained in a LOOP WHILE so that you instruct the loop to restart, as long as its condition is still met, after the increment.
If you are looping backwards (very useful, many times) then you can even place a decrement command at the beginning of the loop.
-
If it is scraped multiple times, just add that url to a list with the advanced option set to "Delete" duplicates (which it is so by default anyway) and you'll end up with a list that contains the url only once.
-
If the only thing that changes there is the number, instead of regex you could also use a wildcard
-
You can use a LOOP WHILE command node and place your loop exit condition there...
LOOP WHILE($exists(~~~~Element to look for here~~~~)) {
} -
A simple define (command) is the equivalent of a sub-routine that performs code and affects data for variables/list/tables that are set as Global inside its container, w/o returning ANY result at all per se = it is only a series of commands that repeat themselves.
The function version of the define, is a series of commands that will return ONE variable value, the one specified by the RETURN command within its code.
That makes it very useful.
Personally, I only use functions, even when there is no particular output that I need from the define, but at least I return a false/true value as a measure of the functions' ability to perform all the code it was supposed to.
EXAMPLE
Many people use a simple DEFINE (as a command) for a signup or signin/login to a site
I prefer to use a FUNCTION instead, that returns the true/false value, telling the calling main program that the function was able to execute correctly (logged in successfully, or created an account successfully, etc...)
Makes more sense now?
- 2
-
You have the option to drag'n'drop the variables in Node View (which will let UBS to take care of the escaping for the curly brackets where needed,
or else,when in Code view, you have to make sure that the curlies from the $spin command ARE escaped, while the ones surrounding the variable names are not <<< as clearly depicted by danoctav's code...while obviously, yours is wrong.
-
When you added a new item to list inside the cycle, you basically moved the list index to point to that last item you added.
Say, initially the list index was 0 (you added the first item outside the loop)
Inside the cycle, the next list manipulation you perform is to add yet another list item (will take position with index # 1 now)AFTER that, you load that list item correctly with the first load html BUT AT THE SAME TIME the list index is moving forward, now pointing to item #2 (non-existent yet, but it doesn't affect program flow because you're not doing anything with it yet)
However, when repeating the cycle, you now add again this new list item that you create, to the CURRENT position in the list index (that was previously set by $next list item) + 1 >>> so now, the list index will be pointing to 2+1=3 and the index #2 is left empty...
When you try calling that list item to display with load html, there is an empty item there (pos #2) so nothing to display, while the command itself also increment moving forward once again... and so forth...
As you can see, the logic flow will become harder and harder to follow - which is why I said, just DUMP that command already and simply use $list item instead which gives you perfect positioning and control.
Just sayin'...
- 1
-
Change your code to this:
load html($list item(%ouputtoscreen, #ctr))
instead of this
load html($next list item(%ouputtoscreen))
...and it will work.
You can either follow my advice and stop using $next list item altogether, or not.
Your choice -
You are confused ... you are using both increment AND $next list item which is wrong.
I keep telling people on this forum that the best way to loop lists (except the very very simple, clear number of steps loops) is to STOP using $next list item and start using $list item instead.The difference between these two commands is that with $list item, you have to specify the EXACT index where you want the item to be retrieved from the list.
$next list item does a similar thing, but IN THE BACKGROUNDS, it ALSO MOVES THE INDEX FORWARD ONE STEP!!!
People usually are not even aware that thing happens and they get lots of errors, especially at the end of the loop, when the index tries to jump outside the bonds of the list...So make a choice now...
Keep using increment with $list item though... (the best way)
OR
use $next list item, but lose the increment and the LOOP WHILE and use a LOOP instead.
Hope this helps you.
-
Aymen, I must say (bromance, lol) I LOVE you(r work) man...
You are truly one of the best coders I've met on this arena. Kudos, mate!- 2
-
That's a smart workaround, Arno...
Personally, I prefer a replace in a text editor - but your method is very good too. Kudos!- 1
-
There is a UBS command: wait for element that you can use - it has either "Appear" or "Disappear" in Advanced options.
-
Pay attention that a .csv file is, of course, comma separated, BUT some people do USE commas in their descriptions, addresses, etc...
As a result, the file cannot be used directly as a source for automation, unless it is handbrushed first and corrected. -
Hmmm... not sure why you'd need a gentleman for this job, though...
Apart from the fact that we are not only gentlemen in here (the male group) there are also quite a few very talented Ladies around, you know?.. lolJust kiddin'.. I like your post title, tbh... but the thing remains valid, there are female coders here too.
- 1
-
I don't want to blow your bubble colton, but while your script does its job - probably (haven't test it) - I wanna STRESS this point out as highly as I can:
Do NOT, I repeat, do NOT test your proxies on public websites - they get 'caught' quickly and flagged as such and become unusable for serious usage, that way...I'm talking especially about private (or even shared) proxies that you pay for, of course.
The free ones scraped from the Internet are most probably, already flagged.
Just sayin'...
Best way is to have a page on your own server where to go check them, inconspicuously. -
Worked perfectly, thank you!
I only had to change the format fromdd MMM YYYY
to
d MMM YYYYto accommodate days numbered from 1 to 31.
-
Thanks, mate... so you basically tell me I can just alter the preset filters from the Node View by editing the command in Code View and pasting there my format?
-
Help me with this little bit here, mate...
If I'm scraping dates in the following format:
30 MAY 2013
5 APR 2013
1 SEP 2012etc...
How do I setup the plugin's function options properly, to transform that into a UBS type of date?
I keep getting errors, that the string input is not a recognized date, or some such wording...
Thanks in advance!
-
One mistake many people do with regex is that they are trying to get EXACTLY the bit of info they want, in a single step.
It is NOT necessary! You could scrape in Step 1 something close to what you need, even if 'polluted' with extra characters... then take the result of the scrape and apply regex to it in Step 2, using either $replace regex expression, or $find regex expression, depending on your needs.
And if you need to do it, DO continue, Step 3, Step 4..... Step N.. till you get what you want. -
Mate.. you keep looping the same thing again and again... no wonder you get the same thing all the time:
Insanity: doing the same thing over and over again and expecting different results.
Albert EinsteinWhat you need to do is to loop the list elements, not $add list to list
Let the $add list to list command outside the loop, ok?
-
Hey Chris.. beware of all those bots above welcoming you - LOL
- 1
someone knows how to control OpenVPN from ubot?
in General Discussion
Posted
I already did that, but still with a 3rd party software... I didn't find any other meaningful way by using OVPN directly.
That being said, maybe you could use some sort of Windows automation sw like AHK (AutoHotKey) or vTask or RoboTask, etc... if you know your way around them.
The sw I used and the solution I've got working is quite complex, but it does the job well.
I thought about putting it together into something commercially, but it seemed to be too much effort for a much too small market.
However, if enough people would want it and would be willing to pay for it, please PM me and state how much you would be willing to pay and if enough requests would be made to make sense, financially speaking, I would probably do it.
Thanks!