How to do No Code Web Scraping with Power Automate Desktop

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
no code web scripting with power automate desktop is straightforward we need a data set and here I have some Google searches for my own companies I want to get the result that is each one of the titles the descriptions and the URL behind it so back in power automate for desktop I need to find a launch and here I can pick my favorite browser I choose Chrome and drag it in I can either launch a new browser or simply just attach it to a running instance I'll choose this one and then we'll make the elegant solution a little bit later in this lesson click the drop down here and then find your data this will produce a variable called browser and I'll click save now we can data scrape so if I go up to actions I'll find and extract data from web page take the one on the web data extraction this one will open here so if I open my data set a new Wizard will come up here that is my screaming wizard first I need to pick something from the first element that is what I want to scrape that could be the title but it could literally be anything here I take the title so I right click here extract element value and pick the text now you can see I got the first title over here in the Wizard similarly go down to the second item pick the title here right click extract element value there you go we have now extracted all the titles we can take this description as well so go to the first item right click extract element value and pick the text that's it that's how easy it is to do no code web scripting with power automate desktop the URL is a little bit more difficult to get so we'll just click finish here here I can say do I want to store it as a variable which I can use if I want to make a more complicated flow or do I simply just want to save it to excel I will save it to Excel and the variables produced is called Excel instance I click save here now I can run it will take a few seconds and we will open up an Excel sheet with our data that's how easy it is to web screen now let me show you how to get the URL because that one is not easily accessible so what we will do here let me just close this Excel sheet again to get the URL I need to show you a very cool trick so add your data press F12 that will open up the developer tools this is the HTML code behind this Google site and if I just click this little arrow pointed to a title just click it and here you can see if I move down here this is the title it's called something with H3 that was by the way the same name as we got before with the wizard and if I move a little bit down we can see that the text is called an agency org all about automation so power automate desktop will create an address for us called H3 and tell to get the text here if we want to find a URL linked to this title we can move one element back to the a element you can see here I have the H3 and up here is the a this is H ref anaciensen org so what I can do here is that I can simply just say cut a little bit away from the address that we used before and use this a element it goes like this so in power to my desktop I'll open the extract data from web page again and if I open up my data this will open the wizard we'll move it over here so what I want to do is to click advanced settings and here we have the two CSS selectors that we created for each one of the elements this one appears for the title and this one was from the description since we want to move to do a little bit of edit with the title we go up here press end on your keyboard or simply just scroll away there you go you can now see that this was the a element and this was the H3 element we know that and let me just find it again so just to show you we know that we want to go up in the a element and not in the H3 anymore what I can do is simply just copy everything from the a without the arrow and the H3 then go down to specify additional CSS selector and paste it in here and here we need the attribute H ref so I'll say href then I'll click OK Bingo now we have the URLs that's how easy it is but then I click finish I click save we can try to run it again and we are attaching to the browser there you go we have now extracted it and now with a URL here so we can customize a our solution a bit more still with no code and let's start from an end we also want to save the data because this just opened and sells it and often you want to save the data so if I go up here and the easiest thing will just be to find a close Excel and drag it in so here we are tagging the Excel instance that we created up here I can say before closing Excel do not save document save document or save document as we will do that we will need to create a document path and the easiest thing to do will be let me click save here this one will produce an error fine minimize and go to your desktop let me just minimize this as well here I'm just creating an Excel file like this I'll grab the path of it and the way to do that is to press shift right click copious path so now I get a path for this Excel sheet and this will be where I will store my data I will simply just delete this one again it will be created in power to make desktop now in close Excel go down to document path and Ctrl V paste it in now I don't have to write everything here we can give it a new name so instead of new Microsoft Excel worksheet we could call it Google searches if I could just hit so Google search is liked it this remember to have the dot xlsx on then I can click save so now when I run it we will also save a close DXL and save it to our desktop here we have the Excel and we have saved it so if I go down here there you go we now have our Google searches on our desktop one thing I want to change more is that I want to give it a unique file name because we really if we run the robot again this will get overwritten over and over that's not really nice so a simple trick is to use the current date and time when the robot runs to make a file name so I go up here and here I'll find a get cune date and time drag it in up here this will just produce available at a time variable called q and date and time save now we can convert this date time variable to a text so we can use it in a file name we'll find a convert date time to text did it take time to convert that is the variable that we produced up here called q and date and time pick that one the form and to use choose custom and here we will use the net custom date time format it's similar to the one that you know from Excel so this is the format I want my date to be in as text so four wise that is years two big amps that is month two D's that it stays now I want hours in 24 hour format minutes and seconds this will be a unique name because the robot will not run every second so I can use this one here in my file name and now we have it as formatted date time so open up the close Excel and use it down here and the result that will be just before the Google searches click this x here and then choose the formatted date time and maybe we could have an underscore between the format date time the Google searches so let's see how that works I'll just click run we're launching Chrome extracting the data and now we save it to a unique Excel look look we now have a unique book I could run this over and over and it will produce a new file pretty clever we still have to make the elegant solution I promised you in the beginning because right now we need to have this page open instead let me just grab the URL of the page if you're scraping another page take the URL of that page now it can close so in the launch new crew choose launch new instance and paste in the URL I can click save so now I have closed each browser window I can just click run the robot will open up a web page scrape the result and save the data it's that easy there you go and again we have created a new result final thing this one is dynamic so I can go in here and simply just say Microsoft click save run the robot and this will save the Microsoft results instead very convenient and we can easily expand our Solution that's it that's how easy it is to do no code web extraction with power automate desktop I prepared the next lesson for you which is right up here
Info
Channel: Anders Jensen
Views: 4,304
Rating: undefined out of 5
Keywords: anders jensen, power automate desktop, power automate desktop scraping, no code scraping, no code scraping tool, no code web scraping, no code web extraction, how to web scrape in power automate desktop, how to web extract in power automate desktop, how to save web data to excel, how to scrape with no code
Id: GxCG7hzdN0U
Channel Id: undefined
Length: 10min 23sec (623 seconds)
Published: Tue Oct 18 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.