hasadna/stock-scraper

Name: stock-scraper

Owner: The Public Knowledge Workshop

Description: Python scraping commands for stock market data

Created: 2016-02-22 17:44:01.0

Updated: 2017-08-03 09:30:29.0

Pushed: 2016-02-22 19:56:31.0

Homepage: null

Size: 11

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

A collection of commands allowing extraction of Israeli stock market data. The data is scraped from the http://maya.tase.co.il/bursa website.

In order to run the commands you need to setup the db and tool.

Data scraped:

  1. Company data - name, email, website, phone, etc.
  2. Market cap per company - market value
  3. Stakeholder data per company - security name, stock count, capital rate, etc.
  4. Management data per company - position, stock count, capital rate, etc.
  5. Financial report per company - balance, assets, equity, etc.
Setup
Install tool
  1. Clone the project and enter it's root directory.
  2. $ pip install -r requirements.txt.
Prepare DB

The database will keep the scraped data.

  1. Create a db and update bursa/settings.py accordingly. For example:

    BASE = {
    ass': 'MySQLDatabase',
    ame': 'bursa',
    ost': '',
    ser': 'root',
    assword': ''
    
    
  2. Create the tables by running $ python manage.py

Choosing a browser for the scraper

Since scrapers use web browsers, a browser should be made available on the machine running the scrape commands. Currently, the scraper is hardcoded to use Firefox so make sure it's installed either as the standard version or headless.

Running scrape commands

Basically, each type of company data has it's own scraper. Some data is static (e.g. company name) and some is time based (e.g market cap).

Here are the available commands:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.