In this video I am going to show you how to get all images in a folder, or really any file type that you need. It can be PDFs, CSVs, TXTs and so on. Basically any extension that you want to target you can get this way. Most people are looking for images but you can use it with anything.
The first thing you need to do is get all of the files in your target folder into a list.
From here there is a number of things you can do, first I’ll show you how to target one extension, then multiple and then another way as well.
To get one extension you can use the ends with function. This does require you to be subscribed to Ubot updates but don’t worry because I’ll show you another way in a minute.
The next way is to use a regular expression and this can target one or more extensions. You also do not have to be subscribed to Ubot updates for this one which is nice.
Finally, the last way is to use the File Management plugin and then to use the get extension function, from here you can check the extension using comparison or check it against an entire list of extensions if you want.
So that’s how you can get all of the files you want out of a folder and into a list. I hope you enjoyed the video, feel free to subscribe and I’ll see you in the next one.
In this video you will learn how to clear textbox on a webpage. First I will demonstrate what the problem is then I will show you a couple of different solutions and the right way to clear a textbox on a webpage.
So first let’s take a look at the problem, when you go to fill out a text box on a web page generally you are appending text within the text box; so let’s go ahead and see what that looks like.
You may be thinking that clearing the textbox is as simple as dragging the nothing function into the type text command. However because type text is actually appending the text Within The textbox if we use the nothing function then it will not clear the text box.
What’s Happening Here is that we are actually just appending nothing within that text box and because we are appending nothing it’s not actually clearing textbox. At this point we do have a couple of options and I will show you the first method which is not the right method to be using in this case but you may not know about it and so I will show you it anyway.
We can actually send a backspace key within the type text command and I’ll show you how to do that right now.
While that’s pretty cool and you may one day find a use for it backspace is not actually the correct way to clear the text box.
The correct way to clear the textbox is to use the change attribute command. When we use the change attribute command we can change the value of thee attribute. In this case we would want to change the value of the textbox.
Because we are changing the value of the value attribute we’re not actually appending text in the textbox, instead we are replacing it. So when we set the value of the value attribute to be nothing it should clear the text box for us.
So that is how you can clear a textbox, if you like the video please feel free to subscribe and I’ll see you in the next one.
In this video I am going to show you a quick and easy way to scroll to the bottom of any webpage. This is especially useful when you are working with infinite scroll pages which are those pages that continue to load more content once you reach the bottom. Some notable examples are sites like Twitter and Instagram.
Let’s have a look at an example.
Once you click the load more button one time the page becomes an infinite scroll page where you simply need to keep scrolling in order to load more posts. If you wanted to scrape all the posts for this user then you would need a way to scroll to the bottom of the page over and over.
Luckily this is pretty easy. However, it’s probably not something you are going to want to memorize so be sure to copy this down and I’ll put it in the description for you.
This will scroll to the bottom of the page so that more posts will load. Now let’s give it a shot and see it in action.
As you can see it’s pretty quick and easy to do this. Once again, I put the code in the description so be sure to save it somewhere for future use.
That’s all for this video, if you liked it feel free to subscribe and I’ll see you in the next one.
Plugins are great because they extend the functionality of Ubot Studio, and it’s likely that you will quickly accumulate a bunch of them. However, installing plugins can be a slow and tedious process and so in this video I am going to show you how to mass install plugins quickly and easily.
For those who don’t know, the normal way to install a plugin is to come up to the tools menu and then select plugins. You can then choose the location of the .dll file to install. To remove a plugin, simply select the plugin and then hit remove, I am going to remove a couple of plugins now so that I can demonstrate how to add them back in a different way.
For this you will need to close out of Ubot and you will also need to have your plugins all ready to go. I keep mine in a dropbox folder, this gives me access to all my plugins quickly when I need a fresh install. In order to make this a quick process you will need to have the plugins already extracted so the .dll files are all in the same folder.
Now open a new File Explorer window and in the location bar type percent sign appdata percent sign then hit enter. This shortcut will take you to your appdata folder where you can find the Ubot Studio folder. Once inside the Ubot Studio folder, open the plugins folder and then copy in any plugins you want to have installed. This is the folder where Ubot would normally copy the plugins when you hit the add button. By copying them in manually this way we can copy several at once to speed up the process.
Now start up Ubot and your plugins should be installed. This will work on protected plugins as well, you will just be asked for your license info when you open the plugin window. That’s it for this video, I’ll see you in the next one.
Steelers Fan asks:
So, to my current understanding the function “scrape attribute” is used to get/find code that is “inside” of an attribute, but not to actually pull anything specific out of it?
And “find regular expression” is used to actually pull the desired text from some scraped code/text?
Using the element editor, it seems that the regular expression selector is used to target matches, but only under specific conditions? This is the part where I am getting lost. The same regex that works for me using “find regular expression”, will not work in the element editor. I am struggling to understand what I am doing wrong here…
I want to try and understand how to best use each of these scraping tools (particularly the proper use of the advanced element editor), but each new time I utilize regex, it gets more confusing than the last time…
It sounds like you mostly get it but I think if we look at a couple of examples it will help a lot.
The first part of your question asks:
“So, to my current understanding the function “scrape attribute” is used to get/find code that is “inside” of an attribute, but not to actually pull anything specific out of it?”
Which is correct.
But for anybody else watching who doesn’t quite get that let’s go over a quick example.
The scrape attribute function allows you to scrape the value of an attribute of an HTML element.
Once you have the value of the attribute you want you can further refine it with regex using the find regular expression function.
So scrape attribute scrapes the entire value of an attribute without any refinement. Then you can manipulate that data or refine it using a find regular expression.
Now onto the part about the advanced element editor, you ask about using regex in the element editor and just generally how to use it.
The advanced element editor is a tool that helps us tell Ubot what element we want to target.
When you use the element selector Ubot does its best job to try and find the unique element that you are clicking on.
But sometimes we need to refine or change that selection in some way. The advanced element editor makes this process a bit easier because we can see the source code of the element and we don’t have to manually type in the selector language because the advanced element editor will do that for us.
Now that we can see the HTML we can select an attribute to target by.
Using this we can tell Ubot exactly how to target the element. And we can use different match types as well. By default exact match is selected but there is also regular expression and wildcard.
Wildcard allows us to use a star as a wildcard character. This star represents anything and for any length until the end of the attribute.
Regular expression allows us to target attributes more specifically than a wildcard because we can use regex to specify what we expect to see. So for example you may only want to see numbers or letters.
But all of these match types are working to simply select the element attribute we are not changing the data we get from it. Ubot will scrape the entire attribute value and then after that you can change it if you want to.
So I hope that helps and if you like the video feel free to subscribe. I’ll be posting more videos on this channel soon.