commit 6030a0b25d4a6bbfaaeba81f973a4cf1d7e74c50 parent 944d95c7ba52bcbf2771d50f33167701c4cbe64a Author: Dominik Schmidt <das1993@hotmail.com> Date: Thu, 10 Mar 2016 21:34:22 +0100 Always check for captcha. Not only if there is a parsing error. Diffstat:
fbstream.d | | | 15 | ++++----------- |
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/fbstream.d b/fbstream.d @@ -125,17 +125,10 @@ class FBStream : DRSS!(Post){ override public void parse(string document){ XmlNode[] arr; XmlNode root; - try{ - root=readDocument(document); - } - catch(Exception e){ - if(!captchaSolved(document)){ - throw new CaptchaException("Captcha has not been solved yet. " - "Please run the ./captcha utility"); - } - else{ - throw e; - } + root=readDocument(document); + if(!captchaSolved(document)){ + throw new CaptchaException("Captcha has not been solved yet. " + "Please run the ./captcha utility"); } arr=root.parseXPath(`//title`); headers[1][1]=arr[0].getCData().idup;