]> code.delx.au - monosys/commitdiff
Virgin scraper - fixed regex for billing date
authorJames Bunton <jamesbunton@fastmail.fm>
Sun, 3 Jan 2010 20:28:04 +0000 (07:28 +1100)
committerJames Bunton <jamesbunton@fastmail.fm>
Sun, 3 Jan 2010 20:28:04 +0000 (07:28 +1100)
scripts/virginmobile.rb

index 8a6cc874c09d31e311c6347cafe7331092e5d90b..6eb832e031eccd8f3f778a4ea35a114133b388f0 100755 (executable)
@@ -65,7 +65,7 @@ class VirginMobile
        def request_bill_preview
                res = do_request("/selfcare/dispatch/PostPayUnbilledUsage")
                usage = res.body.scan(/\$([\d\.]*)/).flatten
-               last_bill_date = res.body.gsub(/\n/, '').scan(/Last bill date:.*(\d\d?\/\d\d?\/\d\d\d\d)/).flatten
+               last_bill_date = res.body.gsub(/\n/, '').scan(/Last bill date:.*>(\d\d?\/\d\d?\/\d\d\d\d)/).flatten
                return usage, last_bill_date
        end