crawlers.cvm
CVMCrawler
Crawler for CVM data.
Example:
import brdata
crawler = brdata.CVMCrawler()
crawler.get_documents("DFP", 2018, 2020)
__init__
__init__()
get_documents
get_documents(
prefix: str,
start_year: str,
end_year: str,
enable_cache: bool = True
)
Get all documents for a given period.
Args:
prefix
(str): One of the valid prefixes. See VALID_PREFIXES
.start_year
(str): Year to start getting documents from.end_year
(str): Year to end getting documents from.enable_cache
(bool, optional): Whether to use cache or not. Defaults to True.Raises:
ValueError
: If prefix is not valid.ValueError
: If start_year is not valid.ValueError
: If end_year is not valid.Returns:
dict
: Dictionary of pandas.DataFrame with the documents.get_documents_by_year
get_documents_by_year(prefix: str, year: str, enable_cache: bool = True)
Get all documents for a given year.
Args:
prefix
(str): One of the valid prefixes. See VALID_PREFIXES
.year
(str): Year to get documents from.enable_cache
(bool, optional): Whether to use cache or not. Defaults to True.Raises:
ValueError
: If prefix is not valid.ValueError
: If year is not valid.Returns:
dict
: Dictionary of pandas.DataFrame with the documents.This file was automatically generated via lazydocs.