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

Forum rules
Before you post please read how to get help
Post Reply
In2Blues
Level 2
Level 2
Posts: 52
Joined: Thu Oct 05, 2017 4:38 am

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

Post by In2Blues » Thu Jul 25, 2019 11:27 am

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 In2Blues on Sun Sep 08, 2019 7:54 pm, edited 1 time in total.
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 15
Level 15
Posts: 5658
Joined: Sun Aug 09, 2015 10:00 am

Re: Script to automate website access and conference call recording

Post by deepakdeshp » Fri Jul 26, 2019 9:44 am

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, and keeps the forum clean.
Regards,
Deepak

I am using Mint 19.2 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

In2Blues
Level 2
Level 2
Posts: 52
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues » Fri Jul 26, 2019 10:45 am

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: 52
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues » Tue Jul 30, 2019 1:48 am

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 15
Level 15
Posts: 5658
Joined: Sun Aug 09, 2015 10:00 am

Re: Script to automate website access and conference call recording

Post by deepakdeshp » Tue Jul 30, 2019 5:58 am

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

I am using Mint 19.2 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
jimallyn
Level 18
Level 18
Posts: 8945
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 » Tue Jul 30, 2019 2:16 pm

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.
Image

“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 18
Level 18
Posts: 8945
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 » 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.
Image

“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: 52
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues » Wed Jul 31, 2019 10:46 am

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: 52
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues » Wed Jul 31, 2019 10:52 am

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: 52
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues » Wed Jul 31, 2019 10:54 am

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 18
Level 18
Posts: 8945
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 » 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?

Yeah, Google has enough of my information, too. Way too much, in fact.
Image

“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 18
Level 18
Posts: 8945
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 » Fri Aug 02, 2019 3:32 am

Image

“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: 52
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues » Sat Aug 10, 2019 2:49 am

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: 52
Joined: Thu Oct 05, 2017 4:38 am

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

Post by In2Blues » Wed Aug 21, 2019 11:28 pm

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 18
Level 18
Posts: 8945
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 » 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.
Image

“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: 52
Joined: Thu Oct 05, 2017 4:38 am

Re: Script to automate website access and conference call recording

Post by In2Blues » Sun Sep 08, 2019 7:53 pm

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

Post Reply

Return to “Scripts & Bash”