<SOLVED> Script to automate website access and conference call recording

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
In2Blues
Level 2
Level 2
Posts: 53
Joined: Thu Oct 05, 2017 4:38 am

<SOLVED> Script to automate website access and conference call recording

Post by In2Blues »

I'm new to Linux and scripting but need some automation. It was suggested that BASH scripting might work for me but I'm exhausted trying to find info for my particular situation so I'm looking for some help from scripting experts here.

I'm running 64-bit Linux Mint 19.1 Cinnamon.

I need to do the following automatically with no user input:

Every Monday at 9:55 am I need to load Chrome, navigate to a specific website, and enter my username and password to log in. Once logged in, I need to click on two specific buttons to access a conference call.

Next, I need to load OBS Studio and record the conference call for 2 hours.

That's it. The conference call will log me out when it's finished and OBS Studio will stop recording after 2 hours.

(I'm assuming I might need a couple of 5-second pauses while the site loads and after I log in to give the buttons time to display)

My questions are:

1. Can a BASH script do what I need as described above?

2. Can someone point me in the direction of info that will help me write my script (or find a similar script that I can modify)?

I appreciate any help you can provide.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 19.1 Cinnamon 64-bit
Kernel: 4.15.0-52-generic
Intel Core i5-8400 CPU @ 2.80GHz x 6
8GB RAM
Intel graphics
deepakdeshp
Level 20
Level 20
Posts: 12337
Joined: Sun Aug 09, 2015 10:00 am

Re: Script to automate website access and conference call recording

Post by deepakdeshp »

I feel Python is more suitable for this. Please Post this in Python forum too.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
In2Blues
Level 2
Level 2
Posts: 53
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues »

deepakdeshp wrote: Fri Jul 26, 2019 9:44 am I feel Python is more suitable for this. Please Post this in Python forum too.
Thanks deepakdeshp. I will post it in the Python forum, too.

EDIT: Can't find a Python forum on here.
Linux Mint 19.1 Cinnamon 64-bit
Kernel: 4.15.0-52-generic
Intel Core i5-8400 CPU @ 2.80GHz x 6
8GB RAM
Intel graphics
In2Blues
Level 2
Level 2
Posts: 53
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues »

So is there nobody who can help with this issue?

How about someone to recommend a good Python forum where I can get help with it?
Linux Mint 19.1 Cinnamon 64-bit
Kernel: 4.15.0-52-generic
Intel Core i5-8400 CPU @ 2.80GHz x 6
8GB RAM
Intel graphics
deepakdeshp
Level 20
Level 20
Posts: 12337
Joined: Sun Aug 09, 2015 10:00 am

Re: Script to automate website access and conference call recording

Post by deepakdeshp »

If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Script to automate website access and conference call recording

Post by jimallyn »

That could probably be done in BASH or Python, as you prefer. Most browsers can be started from the command line, and directed to a particular site with this syntax:

chrome www.linuxmint.com

I know that works on Firefox and on Chromium (upon which Chrome is based), so I assume it will work with Chrome, too.

Starting the recorder from a BASH script would also be simple:

obs

However, I don't know whether you can make OBS start recording immediately upon opening. Most programs have command line switches that will make them do all sorts of things. I installed OBS just to see what was available, and there is nothing in the man page. You might have to use a different recorder if you can't find a list of command line switches for OBS.

Once you figure out all the commands you need, just put them into a script, and start it everyday with cron or at.

You can find what command line switches are available for most installed programs by reading the man page. For example:

man firefox

There are plenty of pages on line that will help you with BASH or Python. There is a good book, The Linux Command Line, that you can read online or download to your computer, available here:

http://www.linuxcommand.org/tlcl.php/

The parts of that that I think might give you trouble are logging in automatically to the website, and getting OBS to start recording. Is there a reason why you have to use Chrome, or why you have to use OBS? Other programs might be better for running from a script. I've got to go run some errands now, but I will check back here later and see if I can be of any more assistance to you. Oh, do you only need to record audio, or both audio and video?

But to answer your original question, can a BASH script do what you want to do? Very likely. I am NOT a BASH expert, but I have seen the BASH experts here do some amazing things, sometimes with a simple one-liner.
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Script to automate website access and conference call recording

Post by jimallyn »

It occurred to me while I was away from the computer that some browsers allow you to save your logins and passwords. That didn't occur to me immediately, because I never use anything like that. I know that it is possible to "click buttons" from a script or command, but I've never done it myself. Somebody here is likely to know how to do it.
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
In2Blues
Level 2
Level 2
Posts: 53
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues »

deepakdeshp wrote: Tue Jul 30, 2019 5:58 am https://python-forum.io/index.php
Thanks for your recommendation, deepakdeshp. I'll check it out.
Linux Mint 19.1 Cinnamon 64-bit
Kernel: 4.15.0-52-generic
Intel Core i5-8400 CPU @ 2.80GHz x 6
8GB RAM
Intel graphics
In2Blues
Level 2
Level 2
Posts: 53
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues »

Thanks for the info jimallyn. I appreciate your help.
jimallyn wrote: Tue Jul 30, 2019 2:16 pm There are plenty of pages on line that will help you with BASH or Python. There is a good book, The Linux Command Line, that you can read online or download to your computer, available here:

http://www.linuxcommand.org/tlcl.php/
Thanks, I'll take a look at it.
jimallyn wrote: Tue Jul 30, 2019 2:16 pm Is there a reason why you have to use Chrome, or why you have to use OBS?
I use Chrome because I have a number of extensions that work with it that I use regularly. As for OBS, I came across it when searching for recording programs and it does the basics that I need.
jimallyn wrote: Tue Jul 30, 2019 2:16 pm Oh, do you only need to record audio, or both audio and video?
I usually only need audio but occasionally record some video, too.
Linux Mint 19.1 Cinnamon 64-bit
Kernel: 4.15.0-52-generic
Intel Core i5-8400 CPU @ 2.80GHz x 6
8GB RAM
Intel graphics
In2Blues
Level 2
Level 2
Posts: 53
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues »

jimallyn wrote: Tue Jul 30, 2019 10:30 pm It occurred to me while I was away from the computer that some browsers allow you to save your logins and passwords. That didn't occur to me immediately, because I never use anything like that. I know that it is possible to "click buttons" from a script or command, but I've never done it myself. Somebody here is likely to know how to do it.
I don't let Chrome save my passwords. It's great and all but I think Google has enough of my info. :-)

I do use a password manager but I thought it might be easier to have the script go to the site and log in directly rather than try to get it to use the password manager program.
Linux Mint 19.1 Cinnamon 64-bit
Kernel: 4.15.0-52-generic
Intel Core i5-8400 CPU @ 2.80GHz x 6
8GB RAM
Intel graphics
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Script to automate website access and conference call recording

Post by jimallyn »

I use KeePassXC, and it will do "autotype." I checked the man page to see if it had any functions you could call from the command line, but it doesn't mention any. However, if KeePassXC can do autotype, you should be able to download the source code and see how they do it. Which password manager do you use?

Yeah, Google has enough of my information, too. Way too much, in fact.
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Script to automate website access and conference call recording

Post by jimallyn »

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
In2Blues
Level 2
Level 2
Posts: 53
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues »

jimallyn wrote: Fri Aug 02, 2019 3:17 am I use KeePassXC, and it will do "autotype." I checked the man page to see if it had any functions you could call from the command line, but it doesn't mention any. However, if KeePassXC can do autotype, you should be able to download the source code and see how they do it. Which password manager do you use?
I use KeePassX. I generally only use it for storing passwords in case I forget them so I haven't even look to see if it can to "autotype".
Linux Mint 19.1 Cinnamon 64-bit
Kernel: 4.15.0-52-generic
Intel Core i5-8400 CPU @ 2.80GHz x 6
8GB RAM
Intel graphics
In2Blues
Level 2
Level 2
Posts: 53
Joined: Thu Oct 05, 2017 4:38 am

<SOLVED> Re: Script to automate website access and conference call recording

Post by In2Blues »

Well I finally got this solved.

I installed Actiona and created a script to load a website, log me in, then load OBS Studio and automatically start recording (I set the Output Timer to always be used so it would stop after 2 hours).

However, calling the script directly loaded Actiona and required input from me.

So, I created a simple BASH script that loads the Actiona script and processes it without my input.

I still couldn't find a reliable way to start the script at the required time on the required day until I read about Alarm Clock in the Software Manager. I installed it and created an alarm that runs my BASH script and everything works perfectly at the proper time.

Thanks to everyone for their suggestions.
Linux Mint 19.1 Cinnamon 64-bit
Kernel: 4.15.0-52-generic
Intel Core i5-8400 CPU @ 2.80GHz x 6
8GB RAM
Intel graphics
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Script to automate website access and conference call recording

Post by jimallyn »

So, you do all the opening the web page and logging in and such with actiona, and only use Bash to start actiona? I had never heard of actiona before, I'll have to check it out.
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
In2Blues
Level 2
Level 2
Posts: 53
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues »

jimallyn wrote: Sat Sep 07, 2019 10:43 pm So, you do all the opening the web page and logging in and such with actiona, and only use Bash to start actiona? I had never heard of actiona before, I'll have to check it out.
Yes. It's great. Does everything automatically with no user input. Easy to modify and adapt. For example, I am using Vivaldi now and it acts a little differently from Chrome so I simply modified the Actiona script and it works perfectly.
Linux Mint 19.1 Cinnamon 64-bit
Kernel: 4.15.0-52-generic
Intel Core i5-8400 CPU @ 2.80GHz x 6
8GB RAM
Intel graphics
Locked

Return to “Scripts & Bash”