Giter VIP home page Giter VIP logo

udemypy's Introduction

UdemyPy ๐Ÿค–

UdemyPy is a bot that hourly searches for Udemy free courses and shares them on:

๐Ÿ”Œ How does it work?

For publishing new courses, UdemyPy follows these steps:

  1. UdemyPy looks for courses at Discudemy, UdemyFreebies and TutorialBar.
  2. The courses found are compared to those previously found. A new_courses list is generated and stored into the database.
  3. new_courses are shared on social media.

This process is run hourly, everyday.

๐Ÿ”Œ How are repeated courses detected?

Since UdemyPy scrapes different websites constantly, it must remember which courses have already been shared.
Every hour UdemyPy gets a list of free Udemy courses: courses_found. This list contains courses which haven't been shared yet and courses that have. For each course in courses_found, UdemyPy tries to add it to the database. If it fails, the course is already in the database (therefore the course has already been shared). If it success, the course is stored in a courses_added list.
Finally, the courses_added list is shared on social media.

๐Ÿ”Œ Enviroment Variables

FILE: udemypy/udemy/bot_settings.py

PAGES_TO_SCRAPE: number of pages to scrape from Discudemy, UdemyFreebies and TutorialBar.

FILE: udemypy/database/db_data.py

CLEARDB_DATABASE_URL: url provided by Heroku ClearDB.
COURSE_LIFETIME: days a course will be stored in the database.
TABLE_NAME: name of the table where courses are stored.

FILE: udemypy/tgm/data.py

TOKEN: token to establish connection with the Telegram API.
CHANNEL_ID: Telegram channel id (could be a number or string).
CHANNEL_LINK: link shown when you click the share button from a Telegram message sent by UdemyPy.
DONATE_ME_LINK: link shown when you click the donate button from a Telegram message sent by UdemyPy.
TWITTER_LINK: link shown when you click the twitter button from a Telegram message sent by UdemyPy.

FILE: udemypy/twitter/data.py

API_KEY: key provided by Twitter to use its API.
API_KEY_SECRET: key provided by Twitter to use its API.
ACCESS_TOKEN: token provided by Twitter to use its API.
ACCESS_TOKEN_SECRET: token provided by Twitter to use its API.

udemypy's People

Contributors

dylannalex avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.