Skip to content

Commit

Permalink
investing_scrapper to investpy
Browse files Browse the repository at this point in the history
  • Loading branch information
Álvaro Bartolomé committed Feb 18, 2019
1 parent 2c06eff commit e06afec
Show file tree
Hide file tree
Showing 22 changed files with 122 additions and 113 deletions.
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

190 changes: 100 additions & 90 deletions .idea/workspace.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ install:
- pip install pandas==0.23.4
- pip install requests==2.21.0
- pip install beautifulsoup4==4.7.1
- pip install investing-scrapper==0.3.6
- pip install investpy
- pip install pytest==4.1.1

script:
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include README.md
include investing_scrapper/resources/*
include investpy/resources/*
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Investing Scrapper of continuous Spanish stock market
# Investing Scraper of continuous Spanish stock market

[![Python Version](https://img.shields.io/pypi/pyversions/investing-scrapper.svg)](https://pypi.org/project/investing-scrapper/)
[![PyPi Version](https://img.shields.io/pypi/v/investing-scrapper.svg)](https://pypi.org/project/investing-scrapper/)
Expand Down Expand Up @@ -31,14 +31,14 @@ 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 investing_scrapper as ivs
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 investing_scrapper as ivs
import investpy as ivs
df = ivs.get_historical_data('bbva', '10/10/2018', '10/12/2018')
```
Expand Down
Binary file not shown.
Binary file removed investing_scrapper/__pycache__/data.cpython-36.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
4 changes: 2 additions & 2 deletions investing_scrapper/__init__.py → investpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import requests
from bs4 import BeautifulSoup

from investing_scrapper.Data import Data # TypeError: 'module' object is not callable
from investing_scrapper import user_agent as ua, equities as ts, funds as fs
from investpy.Data import Data # TypeError: 'module' object is not callable
from investpy import user_agent as ua, equities as ts, funds as fs


def get_recent_data(equity):
Expand Down
2 changes: 1 addition & 1 deletion investing_scrapper/equities.py → investpy/equities.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from bs4 import BeautifulSoup
import pkg_resources

from investing_scrapper import user_agent as ua
from investpy import user_agent as ua


def get_equity_names():
Expand Down
2 changes: 1 addition & 1 deletion investing_scrapper/funds.py → investpy/funds.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from bs4 import BeautifulSoup
import pkg_resources

from investing_scrapper import user_agent as ua
from investpy import user_agent as ua


def get_fund_names():
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ def readme():


setup(
name='investing_scrapper',
name='investpy',
version='0.3.6',
packages=find_packages(),
url='',
download_url='https://github.com/alvarob96/investing-scrapper/archive/0.3.6.tar.gz',
download_url='https://github.com/alvarob96/investpy/archive/0.3.9.tar.gz',
license='MIT License',
author='Alvaro Bartolome',
author_email='alvarob96@usal.es',
description='This is a scrapping tool that retrieves continuous Spanish stock market information from investing, into a Pandas DataFrame.',
description='This is a scraping tool that retrieves continuous Spanish stock market information from Investing.com, into a Pandas DataFrame.',
long_description=readme(),
long_description_content_type='text/markdown',
install_requires=['requests==2.21.0', 'pandas==0.23.4', 'beautifulsoup4==4.7.1', 'pytest==4.1.1'],
data_files=[
('equities', ['investing_scrapper/resources/equities.csv']),
('funds', ['investing_scrapper/resources/funds.csv']),
('user-agents', ['investing_scrapper/resources/user-agent-list.txt'])
('equities', ['investpy/resources/equities.csv']),
('funds', ['investpy/resources/funds.csv']),
('user-agents', ['investpy/resources/user-agent-list.txt'])
],
include_package_data=True,
classifiers=[
Expand All @@ -42,5 +42,5 @@ def readme():
"Topic :: Software Development :: Libraries",
"Operating System :: OS Independent",
],
keywords='investing, scrapper, pandas, finance, stock, api'
keywords='investing, investment, scraper, pandas, finance, stock, funds, etf, api'
)
10 changes: 5 additions & 5 deletions tests/test_investing.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import pytest
import investing_scrapper
import investpy


def test_investing():
investing_scrapper.get_recent_data(equity='bbva')
investing_scrapper.get_historical_data(equity='bbva', start='30/10/2018', end='30/12/2018')
investpy.get_recent_data(equity='bbva')
investpy.get_historical_data(equity='bbva', start='30/10/2018', end='30/12/2018')
"""
investing_scrapper.get_fund_recent_data(fund='Bankia Soy Asi Cauto FI')
investing_scrapper.get_fund_historical_data(fund='Bankia Soy Asi Cauto FI', start='30/10/2018', end='30/12/2018')
investpy.get_fund_recent_data(fund='Bankia Soy Asi Cauto FI')
investpy.get_fund_historical_data(fund='Bankia Soy Asi Cauto FI', start='30/10/2018', end='30/12/2018')
"""

0 comments on commit e06afec

Please sign in to comment.