Skip to content

Commit

Permalink
quick bug fix as Investing.com changed headers (thanks to @nhlsm)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarobartt committed Apr 8, 2021
1 parent db44000 commit f7f43c4
Show file tree
Hide file tree
Showing 17 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion docs/source/_info/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Installation

.. note::

After installing the package you are now available to use it! As investpy's latest release is 1.0.4 the installation is
After installing the package you are now available to use it! As investpy's latest release is 1.0.5 the installation is
optimized for it. If you try installing another investpy release, some features may not work.

First Installation
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Alvaro Bartolome del Canto'

# The full version, including alpha/beta/rc tags
release = '1.0.4'
release = '1.0.5'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion investpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See LICENSE for details.

__author__ = 'Alvaro Bartolome @ alvarobartt in GitHub'
__version__ = '1.0.4'
__version__ = '1.0.5'

from .stocks import get_stocks, get_stocks_list, get_stocks_dict, get_stock_countries, get_stock_recent_data, \
get_stock_historical_data, get_stock_company_profile, get_stock_dividends, get_stock_information, get_stocks_overview, \
Expand Down
8 changes: 4 additions & 4 deletions investpy/bonds.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def get_bond_recent_data(bond, as_json=False, order='ascending', interval='Daily
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -505,7 +505,7 @@ def get_bond_historical_data(bond, from_date, to_date, as_json=False, order='asc
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -655,7 +655,7 @@ def get_bond_information(bond, as_json=False):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -812,7 +812,7 @@ def get_bonds_overview(country, as_json=False):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down
8 changes: 4 additions & 4 deletions investpy/certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def get_certificate_recent_data(certificate, country, as_json=False, order='asce
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -540,7 +540,7 @@ def get_certificate_historical_data(certificate, country, from_date, to_date, as
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -702,7 +702,7 @@ def get_certificate_information(certificate, country, as_json=False):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -838,7 +838,7 @@ def get_certificates_overview(country, as_json=False, n_results=100):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down
8 changes: 4 additions & 4 deletions investpy/commodities.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def get_commodity_recent_data(commodity, country=None, as_json=False, order='asc
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -566,7 +566,7 @@ def get_commodity_historical_data(commodity, from_date, to_date, country=None, a
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -750,7 +750,7 @@ def get_commodity_information(commodity, country=None, as_json=False):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -892,7 +892,7 @@ def get_commodities_overview(group, as_json=False, n_results=100):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down
10 changes: 5 additions & 5 deletions investpy/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def get_crypto_recent_data(crypto, as_json=False, order='ascending', interval='D
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -489,7 +489,7 @@ def get_crypto_historical_data(crypto, from_date, to_date, as_json=False, order=
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -645,7 +645,7 @@ def get_crypto_information(crypto, as_json=False):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -734,7 +734,7 @@ def get_cryptos_overview(as_json=False, n_results=100):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -802,7 +802,7 @@ def get_cryptos_overview(as_json=False, n_results=100):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down
8 changes: 4 additions & 4 deletions investpy/currency_crosses.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def get_currency_cross_recent_data(currency_cross, as_json=False, order='ascendi
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -538,7 +538,7 @@ def get_currency_cross_historical_data(currency_cross, from_date, to_date, as_js
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -687,7 +687,7 @@ def get_currency_cross_information(currency_cross, as_json=False):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -814,7 +814,7 @@ def get_currency_crosses_overview(currency, as_json=False, n_results=100):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down
8 changes: 4 additions & 4 deletions investpy/etfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def get_etf_recent_data(etf, country, stock_exchange=None, as_json=False, order=
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -655,7 +655,7 @@ def get_etf_historical_data(etf, country, from_date, to_date, stock_exchange=Non
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -827,7 +827,7 @@ def get_etf_information(etf, country, as_json=False):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -967,7 +967,7 @@ def get_etfs_overview(country, as_json=False, n_results=100):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down
8 changes: 4 additions & 4 deletions investpy/funds.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def get_fund_recent_data(fund, country, as_json=False, order='ascending', interv
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -531,7 +531,7 @@ def get_fund_historical_data(fund, country, from_date, to_date, as_json=False, o
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -694,7 +694,7 @@ def get_fund_information(fund, country, as_json=False):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -833,7 +833,7 @@ def get_funds_overview(country, as_json=False, n_results=100):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down
8 changes: 4 additions & 4 deletions investpy/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def get_index_recent_data(index, country, as_json=False, order='ascending', inte
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -541,7 +541,7 @@ def get_index_historical_data(index, country, from_date, to_date, as_json=False,
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -704,7 +704,7 @@ def get_index_information(index, country, as_json=False):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -841,7 +841,7 @@ def get_indices_overview(country, as_json=False, n_results=100):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down
2 changes: 1 addition & 1 deletion investpy/news.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def economic_calendar(time_zone=None, time_filter='time_only', countries=None, i
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down
4 changes: 2 additions & 2 deletions investpy/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class instances which will contain the search results so that they can be easily
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down Expand Up @@ -201,7 +201,7 @@ def search_events(text, importances=None, countries=None, n_results=None):
"User-Agent": random_user_agent(),
"X-Requested-With": "XMLHttpRequest",
"Accept": "text/html",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
}

Expand Down
Loading

0 comments on commit f7f43c4

Please sign in to comment.