20,000+ Professional Language Experts Ready to Help. Expertise in a variety of Niches.
Unmatched expertise at affordable rates tailored for your needs. Our services empower you to boost your productivity.
GoTranscript is the chosen service for top media organizations, universities, and Fortune 50 companies.
Speed Up Research, 10% Discount
Ensure Compliance, Secure Confidentiality
Court-Ready Transcriptions
HIPAA-Compliant Accuracy
Boost your revenue
Streamline Your Team’s Communication
We're with you from start to finish, whether you're a first-time user or a long-time client.
Give Support a Call
+1 (831) 222-8398
Get a reply & call within 24 hours
Let's chat about how to work together
Direct line to our Head of Sales for bulk/API inquiries
Question about your orders with GoTranscript?
Ask any general questions about GoTranscript
Interested in working at GoTranscript?
Speaker 1: Learning how to automate stuff in Python is a great skill to have is something that I started doing when I was learning and something I still do today, even though I have access to modern API's, etc. So if your job revolves you around using a browser based system, then we can absolutely automate good parts of it using playwright. So playwright is browser automation in Python. And we're going to be leaning heavily on its code gen feature, which is going to do the majority of the heavy lifting for us. I'll show you what I mean. So I've got VS code open here, and I have a new folder. So what you want to do is you need to install playwright like this pip install playwright. I've obviously already got it installed. The next thing you want to do is do playwright install and type chromium. So we only want to install the Chrome browser because that's the one we're going to be using. If you install the other ones, they'll just be there for until you delete them, no need. Now we want to do playwright code gen like this, this is going to open up a couple of extra windows. And I'm going to move these over to my other screen just so we can go through them. So what they do is the one on the left is the current code and the one on the right is the browser. So as we make changes to the browser page is going to record the appropriate action in the actual code itself. So I'm going to paste in a URL here. We'll see we now have this page dot go to the next thing you want to do is fill in any login details that you need. Now this is already filled in here. So I'm just going to just leave that at the moment and hit login. But ideally, you want to click on that. So what we're going to do is we're going to I'll just move this over a little bit. So it's a bit easier to see. What we're going to do is we're going to create a new discount in this ecom system. So I'm going to click promotions, then discount. Notice how the things are changing on the left hand side. Now I'm going to go to add new. There's another click bet dot click. So let's give it a name by clicking in the name box. And we'll just call this 50 off discount assigned to total order, click the use percentage. And then we're going to put 50 in here. Now we want to add a coupon code. So let's just do 50 offers the coupon code. And we're going to do a start date and an end date. Now I'm going to do this by clicking on this to see if this works. But you could, of course, type into the box here, the date and times that you need. Now I'm going to hit save. And done. That's it. Okay. So now let's go ahead and stop recording. Let's copy all of this and paste it into our code here. And then close out these two browsers here. So now we have the basis of what we need to do to basically automate that large part of our job. We've gone ahead and we've logged in, we can see that happening here. I only clicked on the email and password. Remember, because that was already in there. So if you need to add some text in here, click on it and then type the appropriate text in. And you can see we're clicking on all these buttons. Now we are going to need to tidy this up a bit because it will probably fail at some point. So what we're going to do is we're going to click run. And then we'll see where it fails, see where it stops and make the appropriate changes. Okay, so let's run that and see what happens. Okay, so it's opening up the page, logging in fine, going to promotions. Okay, so we've hit our first sticking point. So let's close that out. And it failed under the promotion. So where was going to promotions. So let's add in page dot wait for load state. This is the favorite one I like to use and it is network idle like this. So let's try that again. Okay, so that worked, creating a new one. This has worked. And as I expected, so it's failed on the date input thing here that hasn't worked. So we need another solution for that. So let's quickly let's have a look at the selector for this. Okay, you can see it failed on this parent settings div. Okay, so let's just try commenting this out for the moment and seeing if we get anywhere. Okay, that seemed to work. So what we're going to do now is I'm going to import in time. And this before we close everything off, I'm going to put in time, sleep, and we'll say five seconds for now. But what you can do is you can actually change these bits of information. So I'm gonna change this to 25 off. And I'm going to change the name to 25 off as well. So let's run it again. And this time, the sleep at the end is just going to give us a chance to see that it actually did it. Otherwise, we can just log in otherwise. Again, there we go. Before it closes, we can see we have our 25 off, I actually left it as 50% off. So that's, that's probably something you'd want to avoid doing. But now you can see how powerful this is, that was only a few minutes using its code generator to whip through and create a script that actually creates something on the system. Now you have to be careful when you do this, you have to make sure that what you're doing is repeatable, because the browser is just running through the commands that you're giving it. So if things change, it will fail. But for completely repeatable tasks where the same thing happens over and over again, this is a great way to get it done. If you've enjoyed this video, I think you're going to enjoy this one right here, which is more automation with Python, but this time for grabbing data.
Generate a brief summary highlighting the main points of the transcript.
GenerateGenerate a concise and relevant title for the transcript based on the main themes and content discussed.
GenerateIdentify and highlight the key words or phrases most relevant to the content of the transcript.
GenerateAnalyze the emotional tone of the transcript to determine whether the sentiment is positive, negative, or neutral.
GenerateCreate interactive quizzes based on the content of the transcript to test comprehension or engage users.
GenerateWe’re Ready to Help
Call or Book a Meeting Now