Stock Scraper
Create an instance of the PyScrappy library to interact
with the class StockScraper:
Helps in scrapping stock data
1. Analysis data of the stock2. Historical data of the stock3. Profile data of the stock
#
Typeclass
#
NoteCreate an object of this class to procced further.
obj = PyScrappy.stock_scrapper()
#
Stock#
MethodsHere are certain in-built methods of the Stock Scrapper. Feel free to explore them.
1.analysis_data_scrapper()
#Helps in scrapping the Analytical data of the stock.
#
return typedictionary
str
pandas.DataFrame
#
Parametersstock_code
: Enter the desired stock code.
Type: stranalysis_type
: Enter the name of the analysis type of the stock.
Type: str
Accepted values: "earning estimate", "revenue estimate", "earning history", "EPS trend", "EPS revision", "growth estimate"#
NoteMake sure you enter a valid stock code.
#
Exampleobj = PyScrappy.stock_scrapper()obj.profile_data_scrapper('stock_code')
2.profile_data_scrapper()
#Helps in scraping the financial data of any particular comapany.
#
return typelist
#
Parametersstock_code
: Enter the desired stock code.
Type: str#
NoteMake sure you enter a valid stock code. Make sure to store the result in three variable as list spreading.
#
Exampleobj = PyScrappy.stock_scrapper()obj.financial_data_scrapper('stock_code')
3.historical_data_scrapper()
#Helps in scraping the Historical data of the stock ('Date', 'Open', 'High', 'Low', 'Close', 'Adjusted Close', 'Volume')
#
return typeDownloads a
csv
file.#
Parametersstock_code
: Enter the desired stock code.
Type: strtime_period
: Enter the range/time period of the stock
Type: str
Accepted values: '1d', '5d', '3m', '6m', '1y', '5y', 'max' (or any value in 'd', 'm', 'y' format)frequency
: Enter the time period interval of the data
Type: str
Accepted values: 'Daily', 'Weekly', 'Monthly'#
NoteMake sure you enter a valid stock code.
#
Exampleobj = PyScrappy.stock_scrapper()obj.historical_data_scrapper('stock_code')