Skip to main content

Investing Scraper of continuous Spanish stock market

Python Version PyPi Version Build Status

Introduction

Since Investing does not have an API to retrieve historical data of the Continuous Spanish Stock Market, I decided to develop a scrapper to retrieve that information.

I developed this scrapper in order to get the data from Investing for my Final Degree Project at the University of Salamanca titled "Machine Learning for stock investment recommendation systems".

To sum up this is not the final version of this scrapper since this is just the pre-alpha version of it. So I will continue scrapping information indexed in investing so you can be able to retrieve more data, as soon as I can.

Installation

In order to get this package working you will need to install investing-scrapper from PyPi via Terminal:

pip install investing-scrapper

All the dependencies are already listed on the setup file of the package, but to sum it up, you will need this requirements:

Use

Currently you just have two possible options to retrieve data with this scrapper:

  • Retrieve the recent data of a stock: it retrieves the historical data from a stock from the last month. The function also checks if the introduced equity name is correct and then retrieves the data.
import investpy as ivs

df = ivs.get_recent_data('bbva')
  • Retrieve the historical data of a stock from a specific range of time: it retrieves the historical data from a stock from a range of time between the start date and the end date, specified in dd/mm/YY format. This function also checks is the introduced equity name is correct and then retrieves the data.
import investpy as ivs

df = ivs.get_historical_data('bbva', '10/10/2018', '10/12/2018')

You can check all the available equities for the Spanish Stock Market in this list from investing: https://es.investing.com/equities/spain

(NOTE: you will need an active HTTP connection in order to get the scrapper working. As a temporary solution, you can just store the retrieved pandas.DataFrame in a CSV so you can work with that data offline.)

Future Work Ideas

Information

For further information or any question feel free to contact me via email at alvarob96@usal.es

Disclaimer: this is just for personal use, I am not related at all with Investing or any similar company. This is just a tool for the research project I am working on. I get no profit or economic benefit from this scrapper.

Release files for investpy 0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for investpy 0.3.6
File Size Uploaded
investpy-0.3.6.tar.gz 15.6 kB Details

Release files / investpy-0.3.6.tar.gz

Download URL investpy-0.3.6.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d61c7ced74e78bc117e21fc124b74e4a86fe7d4485265a8b9720a4cd4b208252
BLAKE2b-256 checksum
How to use checksums
a4fb7efc27c37e1816a145045cfb4c4b46e749ad42b9926f9e691ff6c90e17a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

Release history Release notifications | RSS feed

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0

1 release file

0.9.14

1 release file

0.9.13

1 release file

0.9.12

1 release file

0.9.11

1 release file

0.9.10

1 release file

0.9.9

1 release file

0.9.8

1 release file

0.9.7

1 release file

0.9.6

1 release file

0.9.5

1 release file

0.9.4

1 release file

0.9.3

1 release file

0.9.2

1 release file

0.9.1

1 release file

0.9

1 release file

0.8.9

1 release file

0.8.8

1 release file

0.8.7

1 release file

0.8.6

1 release file

0.8.5

1 release file

0.8.4.9

1 release file

0.8.4.8

1 release file

0.8.4.7

1 release file

0.8.4.6

1 release file

0.8.4.5

1 release file

0.8.4.4

1 release file

0.8.4.2

1 release file

0.8.4.1

1 release file

0.8.4

1 release file

0.8.3

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8

1 release file

0.7.6

1 release file

0.7.5

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

This release

0.3.6 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page