Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions Python/Simplilearn_AutoWatch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Simplilearn AutoWatch

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

A Python automation tool designed to help Simplilearn users efficiently complete course viewing requirements.

## Overview

Simplilearn AutoWatch is a lightweight Python script that automates the video watching process on Simplilearn's learning platform. The tool uses Selenium WebDriver to simulate user interactions, allowing for seamless progress through course content.

<p align="center">
<img src="/sample1.png" alt="Simplilearn Login Page" width="500"/>
</p>

<div align="center"><em>Screenshot: Simplilearn Login Page</em></div>

## Features

- Automatic login to Simplilearn
- Continuous video progress monitoring
- Maintains session activity

## Prerequisites

- Python 3.7+
- Google Chrome browser
- ChromeDriver

## Installation

1. Clone this repository:
```bash
git clone https://github.com/kayden-vs/simplilearn_autowatch.git
cd simplilearn_autowatch
```

2. Install required Python packages:
```bash
pip install -r requirements.txt
```

3. Install Google Chrome (if not already installed):
- **Ubuntu/Debian**: `sudo apt install google-chrome-stable`
- **Windows/macOS**: Download from [Google Chrome website](https://www.google.com/chrome/)

4. Install ChromeDriver:
- **Ubuntu/Debian**:
```bash
wget https://chromedriver.storage.googleapis.com/$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/local/bin/
```
- **Windows**: Download from [ChromeDriver website](https://chromedriver.chromium.org/downloads) and add to PATH
- **macOS**: `brew install --cask chromedriver`

## Usage

1. Edit `video-bot.py` with your Simplilearn credentials:
```python
email = "[email protected]"
password = "your_password"
```

2. **Important**: Before running the script, manually log in to Simplilearn and ensure the course you want to complete is at the top of your "My Learnings" section. The script will click the first "Continue Watching" button it finds.

3. Run the script:
```bash
python video-bot.py
```

4. The script will automatically:
- Log in to your Simplilearn account
- Click on the "Continue Watching" button for your course
- Monitor video progress until completion

<p align="center">
<img src="/sample2.png" alt="My Learning Page - Script in Action" width="500"/>
</p>

<div align="center"><em>Screenshot: My Learning page showing the script in action</em></div>

## Disclaimer

This tool is designed for educational purposes and personal convenience. Users are responsible for ensuring they comply with Simplilearn's terms of service.

## License

MIT
17 changes: 17 additions & 0 deletions Python/Simplilearn_AutoWatch/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
attrs==25.1.0
certifi==2025.1.31
chromedriver-autoinstaller==0.6.4
h11==0.14.0
idna==3.10
outcome==1.3.0.post0
packaging==24.2
PySocks==1.7.1
selenium==4.28.1
sniffio==1.3.1
sortedcontainers==2.4.0
trio==0.28.0
trio-websocket==0.11.1
typing_extensions==4.12.2
urllib3==2.3.0
websocket-client==1.8.0
wsproto==1.2.0
Binary file added Python/Simplilearn_AutoWatch/sample1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Python/Simplilearn_AutoWatch/sample2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions Python/Simplilearn_AutoWatch/video-bot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
import time


options = Options()
options.add_argument("--headless") #Comment this out when running on remote server
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--autoplay-policy=no-user-gesture-required")

driver = webdriver.Chrome(options=options)

try:
# Go to Simplilearn website
driver.get(
"https://accounts.simplilearn.com/user/login?redirect_url=https%3A%2F%2Flms.simplilearn.com%2F"
)
time.sleep(8) # Wait for the page to load

#Login
email_field = driver.find_element(By.NAME, 'user_login')
email_field.send_keys("[email protected]") #remove square bracs

password_field = driver.find_element(By.NAME, 'user_pwd')
password_field.send_keys("Eren8653") #remove square bracs
time.sleep(4);

# Click the login button
login_submit = driver.find_element(By.NAME, 'btnlogin')
login_submit.click()
time.sleep(20)

#Click Continue Learning
driver.find_element(By.CSS_SELECTOR, "button.btn.prime.custom_button_ep.ng-star-inserted").click()
time.sleep(15)

#Click the self learning
driver.find_element(By.CSS_SELECTOR, "p.osl-section-name[title='Self learning']").click()
time.sleep(5)

print("Watching the video..")
# At this point, the video should be playing.
# The script won't exit, so it will stay connected as long as it's running.

while True:
# This loop keeps the script running so the browser stays active
time.sleep(30)

except Exception as e:
print(f"An error occurred: {e}")
finally:
# Close the browser
driver.quit()