Posted By: SBGuy
screen scraping upcoming earnings date - 07/10/18 20:06
I'm a little rusty with string parsing. Hope one of gurus can help. I'm trying to scrape the upcoming earnings date from a Yahoo Finance quote page and it's not working.
See code below and sample of the text snipet I'm trying to parse.
Thanks!
...<span data-reactid="100">Earnings Date</span></td><td class="Ta(end) Fw(b) Lh(14px)" data-test="EARNINGS_DATE-value" data-reactid="101"><span data-reactid="102">Jul 31, 2018</span>...
See code below and sample of the text snipet I'm trying to parse.
Thanks!
Code:
void main() { string eDate[50]; string Content = http_transfer("https://finance.yahoo.com/quote/AAPL",0); sscanf(Content,"<span data-reactid="102">%s<",eDate); printf("n%s...Done!",eDate); }
...<span data-reactid="100">Earnings Date</span></td><td class="Ta(end) Fw(b) Lh(14px)" data-test="EARNINGS_DATE-value" data-reactid="101"><span data-reactid="102">Jul 31, 2018</span>...