Giter VIP home page Giter VIP logo

stock_crawler's Introduction

# Readme

- 設定檔
  修改config.ini,把你想要爬的股票相關參數填入。
  - 股票代碼
    將想要抓的代號例如台積電(2330), 鴻海(2317), 跟大立光(3008)
    填入config.ini的[Target]的Number填入 [2330, 2317, 3008]
    內容如下:
    
    [Target]
    Number: [2330, 2317, 3008]
    
    若要再增加一個標的,比如聯發科(2454)
    就再多加一筆變成
    
    [Target]
    Number: [2330, 2317, 3008, 2454]
    
    將之存檔
  - 資訊區間
    將想抓取的資料的區間填入[FinancialReport]裡的start_season跟
    end_season。例如要從2015年第一季至2019年第二季,則config.ini
    的內容如下:

    [FinancialReport]
    start_season = 2015/Q1
    end_season = 2019/Q3

- 如何執行
  - 安裝python(應為python 3)。
  - 安裝python相關套件
    在此資料夾下,輸入
    pip install -r requirements.txt

  - 執行
    - 進入src資料夾,輸入
    python3 dividend_crawler.py
    即可在同資料下得到"XXXX-XXXX歷年配股配息(元-每股).csv"

    - 進入src資料夾,輸入
    python3 eps_crawler.py
    即可在同資料下得到"XXXX-XXXX歷年EPS(元-每股).csv"

    - 進入src資料夾,輸入
    python3 income_crawler.py
    即可在同資料下得到"XXXX-XXXX歷史營收(億).csv"

stock_crawler's People

Watchers

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