I repeatedly called this method on the same steam account and it produced the same result. So i guess this isn't a random case. It's just the way Steam generate its HTML and we should take that into consideration when parsing it.
As you can see from the HTML above there are two data-confid and two data-key attribute per confirmation. But only 1 confDescRegex result.
Then, I added another confirmation to my account. Called FetchConfirmation and the HTML is like this
This is when I got totally confused. What? two data-confid and two data-key attribute again?! If the HTML code Steam is returning has always been like this, it's not possible that FetchConfirmation() can work without throwing an exception.
For reliability we'd probably be better off using a proper HTML parser like HTMLAgilityPack.
This issue is simlar to #51 so we can probably produce a fix at the same time.
I was able to catch this exception during debugging. The original HTML is like this.
I repeatedly called this method on the same steam account and it produced the same result. So i guess this isn't a random case. It's just the way Steam generate its HTML and we should take that into consideration when parsing it.
As you can see from the HTML above there are two data-confid and two data-key attribute per confirmation. But only 1 confDescRegex result.
Then, I added another confirmation to my account. Called FetchConfirmation and the HTML is like this
This is when I got totally confused. What? two data-confid and two data-key attribute again?! If the HTML code Steam is returning has always been like this, it's not possible that FetchConfirmation() can work without throwing an exception.
For reliability we'd probably be better off using a proper HTML parser like HTMLAgilityPack.