Skip to content

Latest commit

 

History

History
138 lines (108 loc) · 6.22 KB

CourseSpot_CodeCrafters.md

File metadata and controls

138 lines (108 loc) · 6.22 KB

COURSESPOT - A course suggesting web app

Team name: CodeCrafters

Team members

Mentors

Description

There are so many online educational platforms offering courses on various topics. It becomes a tedious task to go to each site and search for courses. COURSESPOT is a web app that shows most of the courses available on internet of various domains. These domains include

  1. Astronomy
  2. Computer Science
  3. Data Science
  4. Economics
  5. Maths
  6. Physics
  • You just have to select the domain and find the topic that you want to learn!

Links

Technology stack

Tools and technologies that you learnt and used in the project.

  1. Flask - For Backend
  2. HTML CSS JS and Bootstrap - For Frontend
  3. BeautifulSoup (bs4) - For Web Scrapping

Web Scrapping

We scraped http://www.openculture.com/ for getting the data

url = "http://www.openculture.com/"
course_dict = [{},{},{},{},{},{}]  #list of 6 dictionaries
sub_url=["computer_science_free_courses","free-online-data-science-courses",
         "economics_free_courses","math_free_courses","physics_free_courses",
         "astronomy-free-online-courses"]
csv_files=["computerscience","datascience","economics","math","physics","astronomy"]
#extraction of data
for i in range(len(sub_url)):
    course_no = 0
    url_new = url + sub_url[i]
    response = requests.get(url_new)
    data = response.text
    soup = BeautifulSoup(data, 'html.parser')
    contents = soup.find_all("ul")
    for content in contents:
        names = content.find_all("strong")
        for name in names:
            if len(name.text)>=6:
                course_link = []
                course_name = name.text
                courses = name.find_next_siblings("a")
                course_provider = name.find_parent("li").text[len(course_name)+1:]
                count =0
                for course in courses:
                    if count<=3 :
                        course_link.append(course.get('href'))
                        count +=1

                #print(course_no,course_name,course_provider,course_link)
                (course_dict[i])[course_no] = [course_name,course_provider,course_link]
                course_no += 1

            else:
                continue 

Project Setup

Clone the repository or download it. For cloning you must have GIT installed. For downloading git refer this link.

Type this command in the git bash terminal

    git clone https://github.com/dhairyashah1/CodeCrafters-CourseSuggestingWebApp

You must also have python and pip installed

Then you must install the required dependencies. In this repository 'requirements.txt' contains a list of all dependencies required for the project. The virutal environment is already present in the repository. You just have to activate it using the following command by opening cmd in the project directory.

  • For windows
    venv/Scripts/activate
  • For Ubuntu
    source venv/bin/activate

If you are not using the virtual environment then enter the command given below

    pip install -r requirements.txt

Setting up the configuration key

Before running this web application on your machine you have to make some changes in coursespot/init.py file.

  • Replace the os.environ.get('SECRET_KEY') variable with a random string
  • Replace os.environ.get('EMAIL_USER') and os.environ.get('EMAIL_PASS') with the email id and password of the account from which you want to send email.
  • or you can add these variables to your machine environment(more secure)

Usages

On the terminal enter

    python run.py

Applications

The Course Suggesting Web App suggests courses available in various domains from across many websites offering them.

Future scope

  • Using ML and AI further our recommendations will become user specific. Suggestions based on star ratings from various sites is one of them. Also the number of course domains and courses may increase enabling the user to find everything at one place.
  • Also blogging feature will enable the users to write educational blogs, thus making it a fully educational site.

Screenshots

Here are some screenshots of your web app. CourseSpot_2 CourseSpot_3 CourseSpot_4 CourseSpot_5 CourseSpot_6 CourseSpot_7 CourseSpot_8