def scrapeProfile(self): '''set sector and description ''' symbol = self.symbol url="https://finance.yahoo.com/quote/" + symbol + "/profile?p=" + symbol s = scraper(url).__profile__() self.sector(s) self.description(s) self.name(s)
def scrape_history(self, url): ''' :param url: URL location of stock price history :return: price history ''' price_history = scraper(url).__table__() price_history = self.__clean_history__(price_history[0]) time.sleep(0.25) return price_history
def scrape(self): url = 'https://finance.yahoo.com/quote/' + self.symbol + '/balance-sheet?p=' + self.symbol table = scraper(url).__financials__(num_cols=4) return table
def scrape(self): symbol = self.symbol url = 'https://ca.finance.yahoo.com/quote/' + symbol + '/holders?p=' + symbol tables = scraper(url).__table__() return tables
def options(self, utc_dates): self.expiry = utc_dates self.url = "https://ca.finance.yahoo.com/quote/"+ self.symbol +"/options?date="+ self.expiry + "&p=" + self.symbol +"&straddle=true" table = scraper(self.url).__table__() return table
def scrape(self): url = 'https://finance.yahoo.com/quote/' + self.symbol + '/cash-flow?p=' + self.symbol table = scraper(url).__financials__(num_cols=5) return table