Giter VIP home page Giter VIP logo

justetf-overview-scraper's Introduction

justETF-overview-scraper

Simple scraper which can be used to scrape justETF's complete ETF overview (https://www.justetf.com/en/etf-list-overview.html). Build for personal use. I have no intention of actively maintaining this.

Installation

I'd recommened using a virtual environment and activating it before installing dependencies (see Python's Virtual Environments and Packages docs):

python -m venv venv

Install the required packages:

pip install -r requirements.txt

Usage

Simply run main.py from the command line:

python .\src\main.py

Optionally the --output (-o) can be passed in to specify a filename.

Output

The output file is a JSON representation of a dict of dicts, where the ETF ticker is the key to the dictionary containing the data. E.g. to get the ISIN number of PAF:

output['PAF']['isin']

Notes

This is my first web scraper, first time using Python and the first time using Beautifulsoup4. Therefor the code won't be as clean or efficient as it could/should be. I'm always open to feedback, tips & tricks!

justetf-overview-scraper's People

Contributors

naralux avatar

Stargazers

Tom Janu avatar kastldratza avatar  avatar  avatar Gabriele 'Gabryx' Concli avatar  avatar

Watchers

 avatar

justetf-overview-scraper's Issues

Adding ETF category to output

On the ETF overview page the ETFs are categorised by Equity/Bond/More. It would be nice if for each ETF we can also determine the category it belongs to.

Looking at the page's DOM we might be able to extract the <span> tags by cross referencing the JavaScript object variable name with the id attribute of the <div> that contains the <span>

E.g.: Equity Africa title is part of <div id="id2de">
image
Cross reference with the JS variable containing the data for this section:
image
The div id corresponds to the first 5 characters of the data object id.

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.