Git Product home page Git Product logo

coursera-crawler's Introduction

Coursera-Crawler

A crawler to scrape Coursera's discussion forum.

High-level code flow is documented here.

  1. Enviroment setup

    1.1 Python 2.7 (We recommend to set it up with anaconda)

    1.2 Install the packages specified in requirements.txt

       pip install -r requirements.txt
    

     For non-root users, please refer to PycURL and Non-root users to use pip to setup your environment.

     1.3 Download Phantomjs here for Windows, here for MacOS and here for Linux-64 bit( Other references), install it and add the path to 'phantomjsPath' of config.yml.

  1. config.yml

    <1> "UserName" is the username for coursera account;

    <2> "Password" is the password for coursera account;

    <3> "UserId" is the ID for every account.

     First, you have to login using your coursera account on the website. Then press F12, select "Network" and choose XHR. 
     
     You can see an API link "https://www.coursera.org/api/openCourseMemberships.v1/?q=findByUser&userId=XXX", your userid is "XXX".
    

    <4> "filePath" is the path to save the data you crawled(Choose or make your preferred saving path).

    <5> "activeCoursePageNum" is the maximum pages of your "Last Active" courses you want to crawl.(When you login, you will see "My Courses", including "Last Active" and "Inactive".)

    <6> "inactiveCoursePageNum" is the maximum pages of your "Inactive" courses you want to crawl.

      <7> "phantomjsPath" is the executable file path of phantomjs.

  1. CourseraScraper.py

    python CourseraScraper.py The crawled data will be saved in folders. Every course has a folder named as courseName_courseID_crawlTime(%Y_%m_%d)

coursera-crawler's People

Contributors

anyahui120 avatar cmkumar87 avatar

Watchers

James Cloos avatar Shingo Tomishima 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.