Created
December 22, 2017 09:59
-
-
Save davlgd/cf0cb7c97780ed596c9c26ea34855edf to your computer and use it in GitHub Desktop.
AlticeStockChecker - Etape 6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Form1() | |
{ | |
InitializeComponent(); | |
this.Text = Application.ProductName; | |
} | |
private void timer1_Tick(object sender, System.EventArgs e) | |
{ | |
string webPageCode = string.Empty; | |
using (WebClient wc = new WebClient()) | |
{ | |
webPageCode = wc.DownloadString("https://finance.yahoo.com/quote/ATC.AS?p=ATC.AS"); | |
} | |
string rawStock = Regex.Match(webPageCode, | |
"currentPrice\":{\"raw\":(.+?),", | |
RegexOptions.Singleline).Groups[1].Value; | |
lblStock.Text = rawStock; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment