How to do FREE Web Scraping to Excel in Windows 10

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to this live stream it's a bit of a new setup for me so i don't hope we have any complications today let's get started it's about web scraping in windows 10 and we have a free solution it's called power automate for desktop and it's free with your windows there's a guide to installing it it's very very easy it's in the description below or in the upper right corner i prepared a case today which will start up start off very very simple and then we will move on i really hope that you are going to place your questions or comments in the chat i will be answering them as they come after my presentation let's get started so let me maximize this picture and see the windows 10 web scraping today's case is that we want to scrape used cars from beale basin so what we want to do first is that we want to do a search that could be tesla model x like this click the search and then we want to scrape the results these ones are danish cars but it could be whatever site you have like amazon or u.s site everything we can scrape here in windows 10. so what we want to do is that we want to first navigate to this page so this part is actually not part of the scraping but it is part of having a nice automation so that we can each time we start up this this can by the way run from the cloud or we can schedule it so we don't need to start it manually so what i want to do first is that after i installed it again the link is in the description below i want to navigate to this beetle basin dk that's this side so we will be grabbing this https and copy it like this so then we want to move to power automate for desktop and launch a new browser i'll just move the mic a bit here like this so then i will say launch i want to do it in either chrome or x as those browsers are the most stable ones so i'll take edge but you can take chrome just remember when you install it to have the extension installed or do it now so now we launch a new instance and here in the initial url i'll just paste in my address that's it things to notice is that the variables produced is called browser so this instant is getting saved into a browser instance we can refer to that later on in our flow then we click save so the power automate for desktop setup is very easy we find the actions over here and we drag them into the main and then we can perform it so from this one here we can test it we can just click run there you go and now we open up a browser navigate to basin that's very very easy now we want to do the typing and we want to click here so we want to do the typing that will be tesla model x here so we'll find another action don't worry you'll get very used to this these kinds of actions those ones are very easy so now i will find a populate text field on web page it's very easy that it's very important that you take the web form filling and not the form filling so then i drag in this you can see now that we're actually referring to the browser instance that we created from the previous step just like over here then we need a ui element and the ui element this was actually our browser here the edge the ui element we want to target now that is this one here the search field so if i go back to power automate for desktop then i can for example click this drop down that's probably the easiest thing to do click add ui element then we will have this ui element picker going on and now you can see that i can actually target different ui elements in my browser we wanted the text field we want to type something in here so i'll just do this press ctrl in on my keyboard and click it with the left of the mouse so now we have created a ui element then we just need to decide what's going in it well we wanted a search for tesla model x so i'll say tesla model x like this the web page doesn't distinguish between capital letters or non-capital letters so we will just do like this but you can of course if you wanted a capital t you could do this this will also be fine but we'll just do this and then we'll click save so now we have created an automation that opens up a browser populate some text field we can see how that is going on and if it works so if i close down the edge again i'll click run up here we are now popular we're opening up the browser navigating to beetle basin and we could actually do the search did you see that or was it too quick if you want to have this one open i'll just make some coffee and i really think that you should do this one together with me as you will learn a lot and if you're out there please let me know in the chat that would be so awesome i feel i can see that we actually have viewers here but i feel a bit lonely i know i schedule it in the last second but i just wanted to try the new setup so please let me know what you think of this here in the chat anyway i will move on i'll just see if we actually have seven viewers so um now we have to open it so we are again just to if you want to see what's going on we are running it we are searching for tesla model x and now we want to click this field here as that will finish up the search so if i go back here and then i will find a click link on web page take that one it doesn't only click on links it will also click on elements so i'll drag that one in again i'm in my browser instance that is fine and we will be creating another ui element for the search button so if i click this drop down here then i can say add ui element and now again since we wanted to target this button here i will take that one press ctrl and click with the mouse so now we made another ui element and then click save if we close down our browser again and run the automation you can now see that we are clicking the actual button and now we are under search we are ready to do the actual web scraping which was the topic of this video anyway so now we can start extracting the data i want this title i also want kilometers model here i want a price that is in danish chronos we're having quite expensive cars here i think this one is around dollars so cars are really not um cheap here and then i want to also get the url you can see that i can click each one of these elements here getting b and b taking to the car i need some data later on in this exercise but for now i'll just grab the url so i can work with it later on to extract data in power automate for desktop it's in fact it's so easy that you can't believe it when you see it here in a few seconds so what we want here is that we won't extract data from web page and drag that in so what we want to do is that we want to open up the page where our data is and we have it here in the edge and you'll see that we have our live web helper this one helps us by choosing the elements that we want to scrape out and we can scrape data in different ways ways we can scrape one kind of data say like we want just this header this will of course not change but we can script one thing or we could take structured data let me show you the power of structured data in a bit so what we want to do is that we want the titles we not only want this title but we want each one of the titles on this page so i'll pick the first title and here there's a little pro tip from me to you here we can actually make a mistake you can see that this one says that it's in the a but as also if i expand it a bit there's also a diff so if you choose a here you also need to choose a in the next title i will show you so if i just choose this a here i then right click extract element value as and here you can see what we can extract i can extract a text that is tesla model x that's this title that's fine i extracted that one so now i have extracted one element but i want to hold whole list down and if i just go to this tesla model x ludicrous performance that one is quite expensive i can see again the same thing and here you can see i can do i can either take the diff or the a by moving the mouse a bit i want the a that is very important since we want to tell power to make for desktop that this is structured data so now what i want to do here is that i right click again extract element value go up to this text there you go now you can see that we have all the titles on this page going down i have this this this you can see the green dotted lines isn't that beautiful so we want to add all the other data to it and the way we do it is simply just by saying well i want the should we say url first the url is not present but the url is tied to this title or is tied to different places on this page so the url for each one of these elements is tied to this title and what i can do again by hovering over the title is right click extract element value and then find it this href you can see that it's actually the start of the address i click that boom i don't have to do anything more all the urls are scraped like that i can work with the url if i want to get out the data at a later point very clever so now we can just do similar things with the kilometers model year and price and that's it the video is just about showing you how easy this is it's also about showing you how we can scrape this data down to excel and how we can work with the data because we want to do it a little bit more advanced at the end so make sure you stick we will scrape results from each one of these models later on and do i have any anyone here in the chat please let me know that will be very nice i can just go to my streaming software here and i will try this one here as i said this is a new piece of streaming software so please help me all you can with feedback i'll be very helpful just if you can add anything the sound is bad the video could be better anything you can do to help me i will highly appreciate it anyway so now let me hide this again this was actually quite annoying wasn't it so we won the kilometers and again i just find the kilometers up here that from the first item that one is here i right click extract element value and here it is 123 000 like this we have it like here all the kilometers down here so and then we warned the model here so the model here will find it here i will right click extract element value again have the text so right click over the element that will extract all the structured data that you want then i want the price so we have the title the url the kilometers the year and the price similarly just right click with your mouse extract element value as the text now we have it one thing that there's a little bug in this software it's when we want to add titles to it and sometimes it works sometimes it doesn't work don't worry i'll show you how you can do it manually later we can do it up here it might work when you work with the software again there's a full guide to installing it it takes 5-10 minutes to install this program and then you can scrape all you want for free it's included in your microsoft windows experience as microsoft owns this piece of software and here that was kilometers and we have there and we have the price so everything you need is here in this video i also created a 4 hour and 30 minute course which you can find in the description and up here in the right corner after the video ends but i'll click finish so now let me just have this one so now we are extracting it we can choose to either store it to a variable or an excel spreadsheet let's pick the excel spreadsheet and as you can see here we have a variables produced excel instance i can click save so that's it four actions i just drag them in and you'll be amazed by the result let me close this one down one thing that you need to remember is to save your flows we don't have auto save on here in power automate for desktop so it's very important that we actually save our flows so now we can run it we run our flow we go to tesla model x we have our search result here and in a few seconds we have scraped our results there you go this one opens this excel sheet and we have everything we need we have the models over here the different urls here then we have the kilometers the year and the price as you can see these ones are the prices in danish kronos we have some of them those ones are least cars so that is monthly but anyway that's the price that we get here so it's just a paste page property that's it and um let us see what we can actually do now to even improve it and you can see here we actually missed the title so we will see how we can add titles to to this excel sheet and how we can improve this search so or this scraping so what i want to do here is that i want to say and also these ones were the easy ones so that was kind of the basic scraping i wanted to show you how easy it is to web scrape in windows but i also want for each one of these items i also want date that this car got registered at first and to find that one i can go into the tesla model x here and this is the date that i want that is the ninth month that that has to be september 2016. i want to get this date out i cannot find it here on this front page and think about the strategy our strategy will be to first script these then we want to iterate that means going through each one of these addresses click go to that url and then we want to scrape the results rate for that one of them and add it to the f column here like that we also want titles so let's go fix that i'll close down this excel sheet i'll i'll show you how we can save these excel sheets later in the video so make sure you stick and am i still alone or do i have someone in the chat i'm still alone well i know that this one was unannounced so i just pretty much just said it to you like five five minutes before but let me know in the chat if you think this one you want more of these in either power to make for desktop or uipath so now what i want to do i want to so this one just opened up an excel sheet i want to actually save this data down to my desktop or wherever i want to save the data so i go to actions then i find it launch launch itself and i just need to see that my mobile is actually on flight i know that it it interfere a bit with the microphone now it is so very sorry for that so here we can launch excel we can either launch it with a blank document that's fine we just open up an empty book and produce our results into that so here we can make it visible that's fine usually when we create these automations we don't want to make it visible because they will just run in the background there's no need but since we're developing here now won't show you the entire process we have it visible the variable is produced that is excel instance two that is because we already created an excel instance down here in the extract from web page in a few seconds we will change that to a variable but so for now i will just change this excel instance to to excel instance this is just a reference now we are referencing to the same excel instance to give it a more nice name and we actually have ashraf joining hello ashraf from denmark you are in bangladesh so nice that you actually wanted to to comment here that doesn't make me feel alone thanks a lot ashraf and i hope that you are getting some something out of that this it's very basic today we will be having more advanced sessions in the coming anyway let's move on so now we want this extract data from web page we want to extract that and we want to extract that into a er not an excel spreadsheet you could think that but since we already launched the excel instance up here we will just store it into a variable and this variable will be called data from web page you can rename this and the variable is just a container for a value so this data from web page variable will hold our stored data that we just got from the extract data from web page so then i can click save what i want to do first is that i want to add the headers on to our excel sheet as you saw this one disappears how how once in a while so to make it really stable we just add them all by ourselves and ashraf is in the chat again ashraf he says hello anders jensen how are you i'm fine ashraf just been joining this meeting at this office one hour ago had a nice bicycle ride and ashraf is watching from bangladesh i have watching your videos for three weeks they are extremely helpful thank you ashraf i'm really really happy that you can use these videos and now back to the presentation keep all the questions and comments coming they are really helping me a lot thank you so now the first thing that i wanted was to add headers to it we already saw that we could write it to an excel sheet so what i will do here is that i will write to excel worksheet here and drag that in so right after this extract data from web page we could start by adding the headers in or it's actually not that important where we place this this is just the headers so we can actually do it up here just after the lawrence excel what value do i need to write this one is a little bit trickier so you don't need to remember that you don't need hairs on in your excel sheet that is not an important part of this exercise but i want to show you how you can do we'll just be we will just be writing the first row in our excel sheet with the headers and to do so we need percentage designs around this row i'll make some spaces spaces will just be ignored here in power automate for desktop and then i want to have this curly brackets like this and square brackets like this and then i can have my headers our first headers that was the title like this then a comma and i can have the next header add one wars was it column you i think it was uil actually and i wonder kilometers i want uh yeah we will just we can change it very easy so if this one wasn't the right order we have the ul if this is not the right order we can change it and the register that was the day that we are going to find in each one of the search items i guess rahul says let me show you this is rahul from india hello rahul thanks a lot for joining it's really appreciated can you please show how to extract a web link from google searches reveal i actually just did it here in this video so you can either rewrite it you can do it afterwards i extracted the url but i will gladly show you how you can do that i will actually also make a video one of the coming days for you if you can figure it out after this session so let me know what you think if you can figure it out yourself or just place a comment to this video if you're still hanging trouble but the trick is to right click and then take the attribute called href that will extract the url so again thank you rahul for the great question so now here we are going to we're going to we have this this one here and we're going to write it into column a and then the first row so this is actually just like an excel sheet we say the column a and then we have the first row we are writing out our titles so then i can click save again if you want to see what's going on we have the percentages sign then we have this curly brackets we have the square brackets like this and rahul says thanks for considering my request i send an email also related to this thanks ravel i'll definitely look into it and create a video in one of the coming days as i think those ones are great topics to show as it shows how easy this topic is again this right to excel with all these headers this one is a bit more complicated it's just to write the headers you don't need that in the automation so we have this we are writing out the headers to our excel instance now we want to add the data from web page so again i just drag in a write to excel worksheet this one is important that is after the extract data from web page i'm writing to my excel instance and just let me show you i opened it up here then i wrote in the headers and now i can add in the script results so the value to write what value do i need to right i just want to write the data from web page that is here i click the x here and then i find it here i can double click it there you go now my data from web page will get added the right mode i can choose to have a specif specified cell that one will be the one that i'll use in 99 out of 100 cases or we can have the currently active cell it's all almost easier and more reliable to specify them ourself as that will make sure that we get it right where we want it and not just in the active cell and here i want to still start in the a column but i want to move to the next row as i have headers on in my first row so i just say 2 here and then i click save so now we're opening excel we're adding headers then we open our browser we do a search here we extract the data and write it back to excel what i just need to do now is to save this excel sheet somewhere one thing that i can recommend now because we need to specify an address the easiest thing to do is to let me move to my desktop it's just to create an empty excel sheet here that we can refer to so i'll say new then an excel worksheet we're just doing this to get the address of this or you can place it wherever you want then to get the address i'll shift right click move a little bit down and choose the copies path like this so now i have the address here and i'll use that in power automate for desktop so um what i will do now is that i will close excel and save it so in the actions find a close excel here and drag it in and ashraf actually let me just before i ask android us with i'll finish this one here so i'll close the excel instance and then i want to save the document as so do it by default it will not save our document but i want to save it the extension that is fine that will be in xlsx and document path here now i will use my newly newly acquired path so ctrl v that is the path remember to move the two quotation marks like this it could also let me delete this have found it if i click this file selector here move to my desktop take that one here that will also have gotten have gotten it then i can click save but we are calling it new microsoft excel worksheet if you want to call it something else i could call this result i guess you can feel free to do so let me try to run it and let me just close down so we are not interfering with it so now we are running our automation we are launching excel we are writing headers to it and we're doing the actual search extracting right back and we are closing let's inspect the results and see that we can actually do the things that we we actually claim to do you can delete this new microsoft excel worksheet if you want and open the results there you go we have now finished up the first part of this exercise except that we have the title the url the kilometers the year we forgot the price so we will just move we will have the price here and then move the register to the f column that will be the question that comes up in one minute so let us just fix that and i'll show you how easy it is to fix so if i go here as i said we we're needing we have the registered as a header of the price so let's just move that and let me show you how easy it is so if i go up here that was one was my headers so after the year i'll just add the price in single quotation marks i'll just say price like this then i'll say the single quotation marks and have it like this then i can click save one other thing that i really like to do is to name these extracted results sheets after a date down to the seconds because in that way i'll make sure that i never overwrite any script data and i'll also make sure that i can keep a decent log so let me show you that and ashraf i will get back to you in one second so to to do that i'll get the cue and date and so i'll get the current date on time just when my automation starts i will have the queue and date and time so i'll drag that in in front of the first action this one will just give get my system time in my current zone i'm in copenhagen central european time and store it into a date time variable called cue and date and time again this is just cherries on the top you don't need to do it but i just want to show you how you can easily make your automation extremely powerful then i can click save so now i got it what i will do is that i will need to use this date and time in my result xlsx so i want to use it as a file name and to do so i need to convert my date time into a text so in the actions i will find a convert date time to text i know this one moves a little bit fast you can take my beginner's course which is more than four hours it's free here on youtube the link is in the description below so the take time to convert well that one was the the daytime that i just created the cue and date and time like this like this we can use the standard format but this will actually it will not be allowed in the file format these forward slashes so what i will do here is that i'll pick custom then i will write the net date time custom format in this one is is handy to know but again you don't really need it it's just as i said cherry on the top so i'll say yeah yeah yeah this is just i'm defining how my date should look in the text format so then i'll do this i like to do in 20 hour format minutes and seconds but this one will give each one of my files a unique name so i can have a nice lock so let's say that this i schedule this to run twice a day then each one of these will have different names i'll not overwrite data and again we are saving it to formatted date time i click save so now i will use this formatted date time here i'll use that in whenever i save my excel sheet so i move just ahead of the result i click the x here then find the form at a date time that i just have double click it and boom it got inserted here let's try to run our automation once more so i will just be closing this and try to run it again so we're launching excel and we just do all the other things and while we do that i think i will take ashraf question so azrav says could you please show how to collect airline shipping line or carrier from the weblink and put into the excel sheet sure asref can you send me the link i will gladly be doing that so then again let's inspect the results to see that we actually have this one we can close first of all we now have created a unique name that one will be this name here and now we actually have moved the register here it's still empty so we still need to fix that and then we have the price that's it it's very very easy and let me just close this and now i really want you to pay close attention because let me move back to power automate for desktop because this question this advanced part of this video this is actually a question from one of you out there i know i'm not looking too much in the camera i'm looking into the screens but this is actually a question from one of you out there it's in danish but i will let me minimize this so you can see it a little bit better so this is actually a question from one of you carson says it was a really nice video and the video casting refers to is my web scripting video which is there's also a link to that in the description that video shows how you can script results from amazon and save it to excel it's a bit of almost the same approach but a different take on it i will definitely recommend you watch that as well it's in the description below anyway carsten says that's a nice video he wants to webscrape the url well we just did that and he want to move inside each item so that is he want to scrape the url now we just need to do the search so he wants to say tesla model x like this then he want to move inside each one of these search results that means that he needs this url from up here and he wants to scrape something i just want to scrape the first time registered but it could be anything here so let's go fix that for carson and carson thanks a lot for the question we will be solving uh i will be solving questions from you viewers in these live videos as i think they will help me a lot to get in contact with you to get feedback with you from you so rahul ashraf i'll definitely solve your queries incoming videos and if you out there have a query that one thing that you want to see a video about please ping me in the chat or in these comments after the video i cannot promise that i can make a video for each one of the requests so i will probably take the request that i think will be challenging or fun to watch like rahul's question or ashraf's question so now let me just move back we will be creating carson's solution or we will try to do it it's not that complicated again so what i want to do here is that i want to move to power automate for desktop so we have this one here we are now writing to our excel instance but we also want to add different data so what i want to do before i close excel here i want to because this search result let me open it again i don't know how many results that we got we can actually also we have 33 rows the first one is header so we have 32 results we can also have we could have a thousand we can move from page to page we could configure that we will not do it right now but we could so i don't really know how many results i got so i'll use a function in power to make for desktop that says where is my first free row i will use that information and i can also get the first three column if i want it that will be this one here anyways let's get started so i can easily have my excel sheet open up here then i will go here so what i want to do is to get the first free row and column from the data that i just wrote here so i will find a get first free row column row make sure you pick this get first three column row and not the get first three row on column so take that one here and drag it down after the write to excel worksheet but before the close excel so this one will just go into our excel instance that's this one it will give us two values one number that will be the first three column and one number that will be the first three row that's all it does but we will use that information so now we did that we will read this excel worksheet that was we want the headers and we want the actual data so everything that is in our excel sheet we're reading now and we're doing that so we can iterate that means go through one the urls one by one and then right in the corresponding registered column with the data that we get from each one of the items when we click into it that was a long sentence just watch you will earn everything and make sure you stick to the end i'll just take a short break um this actually it's very fun to create these live videos i learn a lot and i think that um you could also learn a lot but you will learn if you watch this but you will learn 10 times faster if you open up power automate for desktop and try these examples with me if you don't understand them this will this was how i learned things i just start building build build build build you'll be an expert in in a shorter time than you actually think getting a good job automating your daily tasks whatever you want that will be very easy with these programs you don't need to be a code or anything of course i will teach you code a little bit of code later on in these videos but it's not really necessary anyway let's continue on and i will also move for this overlay here with carsten so so now we are getting the first three column we will read it and then we will iterate through the data so i'm just reading out my excel sheet here so i read from excel worksheet again referring to the excel instance i'll be reading the value of a single cell not really i want to read the entire excel sheet so i just take the value from a range of cells then i want to start of course in the beginning a 1 like this and let me just do this and then i want to say where does my data end well we just found out we found the first three column in row so we want to say one before the first three column and one before the first three row to do this is just to click the x here say the first three column and then to get the column right before the first three column i'll just inside the percentage of the sign i'll say -1 i will do the same with the end row so click the x here first free row and say -1 like this this is all it does so and then take the advanced first line of range contains column names it does we have our headers on that was the title url so forth so make sure you take that one here then we click save so now we are reading all our data that we just script we can iterate through it get the url and start navigating to all those urls and get our data so what i want here is that i want a for each uh for each you will usually use when you loop through something for example these rows in our excel sheet so i will be dragging this just here right after the read from excel worksheet now i want to say what what do i want to read that could be a collection of items for example these data rows in our data table called excel data so we just read this data that well that was one was stored in the excel data so if i click this x here i'll say excel data each time we move through one of the rows as we do here with this action we are storing it in um in in a variable called q and item this is just for reference we could change this so i could call it a data row or whatever i want to but i'll just stick with current item this is just a reference so again you can change this name if it's easier for you to remember what it does i will just stick with cue an item i'll click save so now i'm iterating too and what do i want to do here let me just show you what our mission was so here we have our we have our result that we scraped before we want to go to let me just do this we want to go for each one of our results here we want to go to whatever is in the url column like this row and this column that will be this one here then we want to go there there there and script the results from inside these results that's all we want to do it's very easy in power automate for desktop let me show you so i go back here what i want to do here is that i want to find a go to web page like this make sure you place it inside the for each because we want to go to to this url for each one of these results again we're doing it in our browser we want to navigate to a url and to find the url we refer to the queue an item and then say the q an item that was the current row in our iteration then we want to say look in the ul column whatsoever in is in that cell go to that url we know this url let me show you so i click the x here again the this x is a shortcut to getting these variables like the q and item then it automatically places these percentages sign on you can of course also write it i recommend always doing it automatically by clicking here because you will reduce errors so now i'll say i want to say cue an item and i want to say hard brackets start and then i want a single quotation marks i'll say url again these spaces doesn't mean anything it just makes it a bit more easy for you to read so i want this square brackets around it then i will refer to my column name which was url here and i'm navigating to that since this is a go to web page so that's it let's just try to see it's always nice when we build these automations to see that it works so we don't create 20 steps before we realize that we could have fixed this arrow so let me run it and again if you out there in the chat if you're there put put a comment in say hi that could be really nice uh just to know that we are people out there still watching so now you can see that i moved to each one of these models um by our uls we are scrolling through all our tesla model x results now we can start scraping let me just stop this automation so this step works we can navigate to each one of the urls the rest is just piece of cake so and we can also make we didn't we didn't go to the step where we closed it so we just don't save it that one was here where we closed our excel sheet so now now we're navigating to each one of these results we want to scrape for each one of the cars whatever is in this this here that is the first time the car got registered so let's fix that what i want to do is that i want to do exactly the same thing as i did before i want to find and extract data from web page here make sure you take the one on the web data extraction so right after we navigate it to a the url we want to extract the data again to get to to continue from here we need to open up some source of data that will be a browser in this case so i open up this one here and you can see the live web helper got activated so what i want to do here is that i want to move here this is the result i want to get so again i just right click extract element value and this is the text here the power automate for desktop automatically does this i click here and we're not doing anything more we're just taking this one for each one of the cars and then i click finish and here you can see that we're actually scraping to data from web page two that will be another variable that is fine for now and then i click save and let me just see how this data looks because i need to write this data back to our excel sheet in the q and row and to do so i just need to see what what does this data look like i know it will be a data table but i want to show you as well so i just save my workflow and again if you enjoy these videos if you want more live builds please give this video a thumb thumbs up that will really help me and it will enable me to create more videos for you so thanks a lot if you're watching this and this actually helps you and just you're giving this stream a thumbs up well that was a long sentence anyway let's start the robot so i just click run again what i want here is just to inspect the data from web page two so we can talk a bit about what we're going to do now because now we're scraping the actual first time this car got registered so we just need to move through one car and then we'll stop it and then we'll inspect the data so let me stop here so what i want to do here is that i want to find the data from webpage2 here and open that we can see that this is a data table i know it it can sound weird since we're only having one result that is the sixth that is the june 2022 but it's actually a data table and we need to treat it treat it treat it as such that means that we need to refer to this one here then we want the first column and the first row you can see the first row is named zero it's zero indexed and so are the columns it's programming so you need to say that the first item is always zero then one two and so forth so we need to we script this result now we will write it back to our excel sheet and again let me show you we want to write it here so this car needs to have this this data going here here here here and so forth while we're moving down so now we find a right to excel worksheet so i will find a write i will just write my result back here so i'll take it right from excel worksheet drag it in here so i'll say i want this excel instance what value do i need to write well that was the data from webpage2 that is the result that we just script i'll say the data from webpage2 but i wanted to say i want the first column in the first row i know there's only one and it can seems counterintuitive but it is a data table it could be bigger so we need to tell power automate for desktop what data we want out that is very easy we just in hard brackets like this we'll say zero that is the first column and then the first row like this so zero zero that will be the result that we just got then we'll say where do we want to to write it we know that we want it in in column f we already talked about that so that one was here and then we want to do a trick because we need the row number we we don't we don't got it right now so we'll need to to find a way to get the wrong number that's very very easy so what i will do here is i'll say the f column then i'll click save i still need to fill in the row number it will give us an error that's fine we expected that because we need the row to be filled in then right before the 4-h we will have a counter variable that variable will start with the value 2 and then we will add 1 to it each time we navigate to a different row in our search results then we can keep track of the row numbers and use it down here so we'll find the set variable this will just be a counter again drag it in right before before each like this rename it i will call mine counter and then i'll give it the value too i'll click save now i have my calendar what i also need before i will update my right to excel worksheet is add one trade each for each one of these iterations that that that makes sure that it will go on with the search results this counter so i know exactly where i am find another set variable again this is very advanced compared to in the beginning of this video but i really hope that you build this with me and then learn something so now i'll say counter i want to add one to this counter to do so i'll just find it in here counter like this and then i will say plus one so i'll give it a new value of one whatever it's in it i'll say add one to it then i can click save now i will use that in my write to excel worksheet i will just in the row i'll find this newly created counter like this and then i click save so for now what we did here was just to to get the result and write it back to excel and after this one finished we are closing excel let me close all my old instances just to see that this actually works and again this one you can schedule it from the cloud it's very very easy i will start the robot and then save it first remember to save your robots here in power to make for desktop because there's no auto save on so when i have saved i'll run the robot and then we can talk a bit in the chat if anyone is here i will just write hello friends and here we are we are scraping apparently i cannot send uh through this new streaming software that's fine i'll just say hello friends are you still with me in the chat please let me know so now i am writing to excel you can see that i'm iterating to each one of the cars it will take like probably a couple of minutes we can talk a bit here so what i want to to recommend you to to do if you want to learn this is just to to install it there will be a video in the description below that will take you through the installation process very very easy then just open this video and repeat what we did today you can rewind the video it's very very easy so now we're scraping the tesla results and we have for each one of these items we're moving into them to to the url and we'll get data from the different pages so and again this will go on for for a little bit of time we'll just be inspecting the results and then we have finished with the exercise and then rahul ashraf do you still have problems with your automation i'll gladly create videos in the coming days based on your topics just let me know in the chat or in the comments below so now i am iterating too i'm not sure how how far we got but it's only the 32 tesla model x's so hopefully not that long i'll also be announcing these live sessions a bit more ahead in time so you can actually attend them this one was just improvised one announced 20 minutes before so we weren't so many but hopefully a lot of you will watch it after this session so tesla model x now we've finished our automation let's inspect the results again you can see we created a new result sheet here and we got the registered we got the date that the cow was what was registered we finished it it's that easy so we scraped all our results and for each one of the results we moved into the item and got this address so that's it we we finished with this exercise showing you how easy it is to web scrape in in windows 10 all the links from the videos are down here below i'm really happy that you you came here today um it's it's i mean it's a huge honor to make a living out of creating this kind of education and i can do it for free still i'm still earning money on this and if you want to support this stream and future streams give it a thumbs up and make a comment in the chat or in the comment sections that will help me more than you can think of that's it have a great time we will see each other very very soon
Info
Channel: Anders Jensen
Views: 17,132
Rating: undefined out of 5
Keywords: scraping, web scraping, how to do web scraping, free webscraping, anders jensen, windows 10 scraping, edge scrape browser, save browser results, power automate desktop, web scraping tutorial, data scraping tutorial, data scraping from websites into excel, data scraping, web scraper, data scraper, web scraper free
Id: 4zmviNtOFwA
Channel Id: undefined
Length: 53min 42sec (3222 seconds)
Published: Tue Jun 14 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.