Skip to content

Commit

Permalink
Merge pull request #319 from aapatre/develop
Browse files Browse the repository at this point in the history
Release v3.2.0
  • Loading branch information
cullzie authored Sep 13, 2021
2 parents 37f7ff6 + 3d680d2 commit b9a929b
Show file tree
Hide file tree
Showing 8 changed files with 187 additions and 54 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
schedule:
# Runs at 12am IST
- cron: '30 18 * * *'
pull_request:
branches:
- develop
- master

jobs:
build:
Expand All @@ -24,6 +28,11 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.2.0] - 2021-09-13

### Added

- View run statistics at the end of the script
- Documentation updates
- Improved error handling and logging

## [3.1.0] - 2021-05-04

### Added
Expand Down Expand Up @@ -82,6 +90,8 @@ can continue as normal
project running locally. Suitable for users who are not looking forward to
contribute.

[3.2.0]:
https://github.com/aapatre/Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE/releases/tag/v3.2.0
[3.1.0]:
https://github.com/aapatre/Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE/releases/tag/v3.1.0
[3.0.0]:
Expand Down
55 changes: 29 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com)
[![forthebadge](https://forthebadge.com/images/badges/it-works-why.svg)](https://forthebadge.com)

# ALPHA IS A PRE DEVELOPMENT BRANCH, DO NOT EXPECT USER FACING ISSUES TO BE ADDRESSED IN THIS BRANCH!

# Udemy Coupon Grabber & Course Enroller: Grab FREE Coupons!

Expand All @@ -14,15 +13,16 @@ web-scraping and automation, this script will find the necessary Udemy Coupons
**NOTE: THIS PROJECT WILL NOT WORK WITH NON ENGLISH UDEMY.**

The code scrapes course links and coupons from:
- [tutorialbar.com](https://tutorialbar.com)
- [discudemy.com](https://discudemy.com)
- [coursevania.com](https://coursevania.com)

- [tutorialbar.com](https://tutorialbar.com)
- [discudemy.com](https://discudemy.com)
- [coursevania.com](https://coursevania.com)

In case of any bugs or issues, please open an issue in github.

Also, don't forget to **Fork & Star the repository if you like it!**

***We are also on [GitLab](https://gitlab.com/the-automators/Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE)***
**_We are also on [GitLab](https://gitlab.com/the-automators/Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE)_**

**_Video Proof:_**

Expand All @@ -32,9 +32,8 @@ Also, don't forget to **Fork & Star the repository if you like it!**

## **_Disclaimer & WARNINGS:_**


1. **Use** this ONLY for **Educational Purposes!** By using this code you agree
that **I'm not responsible for any kind of trouble** caused by the code. **THIS PROJECT IS NOT AFFILIATED WITH UDEMY.**
that **I'm not responsible for any kind of trouble** caused by the code. **THIS PROJECT IS NOT AFFILIATED WITH UDEMY.**
2. **Make sure web-scraping is legal in your region.**
3. This is **NOT a hacking script**, i.e., it can't enroll you for a specific
course! Instead it finds courses that provide coupon links to make the
Expand All @@ -48,6 +47,10 @@ Also, don't forget to **Fork & Star the repository if you like it!**

**Required Python version:** [Python 3.8+](https://www.python.org/downloads/)

**(Windows users only) Required Microsoft Visual C++ 14.0+ version:** [Microsoft Visual C++ 14.0+](https://visualstudio.microsoft.com/visual-cpp-build-tools/)

![alt text](https://docs.microsoft.com/answers/storage/attachments/34873-10262.png)

**You must have pip or poetry installed. Please look up how to install them in your OS.**

Download a release of this project or clone the repository then navigate to the
Expand All @@ -60,37 +63,38 @@ get all the requirements installed in one go. Similar instructions applies for p

Props to Davidd Sargent for making a super simple video tutorial. If you prefer written instructions then continue reading further, else click on the image below for a quick video tutorial:

[![GET Udemy Courses for FREE with Python | 2 Minute Tuesday](https://i.ytimg.com/vi/tdLsVoraMxw/hq720.jpg)](https://www.youtube.com/watch?v=tdLsVoraMxw "GET Udemy Courses for FREE with Python | 2 Minute Tuesday")
[![GET Udemy Courses for FREE with Python | 2 Minute Tuesday](https://i.ytimg.com/vi/6HLbqM-598k/hq720.jpg)](https://www.youtube.com/watch?v=6HLbqM-598k "pip installation of Automatic Udemy Course Enroller")

1 . Install from PyPI `pip install udemy-enroller`

- Run the script and the cli will guide you through the settings required
- If you decide to save the settings they will be stored in your home directory: <br>
**Windows**:
- Run the script and the cli will guide you through the settings required
- If you decide to save the settings they will be stored in your home directory: <br>
**Windows**:
C:/Users/CurrentUserName/.udemy_enroller<br>
**Linux**:
**Linux**:
/home/username/.udemy_enroller

**The values in settings.yaml should be in the same language as the site you are browsing on**
**The values in settings.yaml should be in the same language as the site you are browsing on**

2 . The script can be passed arguments:
- `--help`: View full list of arguments available
- `--discudemy`: Run the discudemy scraper only
- `--coursevania`: Run the coursevania scraper only
- `--tutorialbar`: Run the tutorialbar scraper only
- `--max-pages=<NUMBER>`: Max number of pages to scrape from sites before exiting the script (default is 5)
- `--delete-settings`: Delete existing settings file
- `--debug`: Enable debug logging

- `--help`: View full list of arguments available
- `--discudemy`: Run the discudemy scraper only
- `--coursevania`: Run the coursevania scraper only
- `--tutorialbar`: Run the tutorialbar scraper only
- `--max-pages=<NUMBER>`: Max number of pages to scrape from sites before exiting the script (default is 5)
- `--delete-settings`: Delete existing settings file
- `--debug`: Enable debug logging

3 . Run the script in terminal like so:
- `udemy_enroller`

- `udemy_enroller`

4 . The bot starts scraping the course links from the first **All Courses** page
on [Tutorial Bar](https://www.tutorialbar.com/all-courses/page/1), [DiscUdemy](https://www.discudemy.com/all) and [Coursevania](https://coursevania.com) and starts
enrolling you to Udemy courses. After it has enrolled you to courses from the
first page, it then moves to the next site page and the cycle continues.

- Stop the script by pressing ctrl+c in terminal to stop the enrollment process.
- Stop the script by pressing ctrl+c in terminal to stop the enrollment process.

---

Expand Down Expand Up @@ -142,7 +146,6 @@ retrieved in the Python console/shell, which may take a while.

It is recommended to run the script using your terminal and system python.


### 7. Which branch to commit against?

Pull request should be made on "develop" branch.
Expand All @@ -157,7 +160,7 @@ and help us on what you want or talk to us about your proposed changes.

## Support & Maintenance Notice

By using this repo/script, you agree that the authors and contributors are under no obligation to provide support for the script and can discontinue it's development, as and when necessary, without prior notice.
By using this repo/script, you agree that the authors and contributors are under no obligation to provide support for the script and can discontinue it's development, as and when necessary, without prior notice.

---

Expand All @@ -167,7 +170,7 @@ By using this repo/script, you agree that the authors and contributors are under

[![JetBrains](https://i.imgur.com/h2R018M.jpg)](https://jetbrains.com/?from=udemy-free-course-enroller)

Thanks to [JetBrains](https://jetbrains.com/?from=udemy-free-course-enroller) for supporting us. They are the maker of world class IDE and developer tooling. If you think their product might help you, please support them.
Thanks to [JetBrains](https://jetbrains.com/?from=udemy-free-course-enroller) for supporting us. They are the maker of world class IDE and developer tooling. If you think their product might help you, please support them.

### GitBook

Expand Down
21 changes: 20 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "automatic-udemy-course-enroller-get-paid-udemy-courses-for-free"
version = "3.1.0"
version = "3.2.0"
description = ""
authors = [""]

Expand All @@ -18,7 +18,26 @@ isort = "^5.6.4"
pytest = "^6.1.2"
pytest-cov = "^2.10.1"
pytest-asyncio = "^0.14.0"
bumpver = "^2021.1113"

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[tool.bumpver]
current_version = "3.2.0"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "Bump version {old_version} -> {new_version}"
commit = true
tag = true
push = false

[tool.bumpver.file_patterns]
"pyproject.toml" = [
'current_version = "{version}"',
'version = "{version}"',
]
"setup.py" = [
'version="{version}"',
]

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="udemy-enroller",
version="3.1.0",
version="3.2.0",
long_description=long_description,
long_description_content_type="text/markdown",
author="aapatre",
Expand Down
1 change: 1 addition & 0 deletions udemy_enroller/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def _redeem_courses(
logger.info("Ending test")
return
else:
udemy_actions.stats.table()
logger.info("All scrapers complete")
return

Expand Down
2 changes: 1 addition & 1 deletion udemy_enroller/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def _save_settings(self) -> None:
logger.info(f"Your email has not been saved to settings.")
if not self._should_store_password:
logger.info("Your password has not been saved to settings.")
if not self._should_store_email or self._should_store_password:
if not self._should_store_email or not self._should_store_password:
logger.info(
"You will be prompted to enter your email/password again when the cookie expires"
)
Expand Down
Loading

0 comments on commit b9a929b

Please sign in to comment.