Closed richhollis closed 7 years ago
@richhollis it does seems like something did change on Google's side. Tried hitting the endpoint a couple of times, but couldn't get captcha form back. Can you try fetching that form directly from the server and check what the result it? Does it stay like that until you complete the captcha?
A PR on this is highly appreciated!
Just tried it again now from the server and it's working again. Although I noticed it being on/off over the past few days before I understood what the actual problem was, so it does appear to be intermittent.
Here is a gist which contains the capatcha response from yesterday: https://gist.github.com/richhollis/b9b03a7313636f544068a9a54876da5f
I'll submit a PR for the README shortly.
Great, thanks! Might be good to detect this response and raise an appropriate error
Done!
I started getting an error on a page that is using the Money::Bank::GoogleCurrency class. A page that has been working for many months suddenley started throwing a Money::Bank::GoogleCurrencyFetchError.
When I tested locally it all worked OK.
After a closer look and calling the raw endpoint through ruby and examining the returned HTML it isn't including the currency rate form, but a capatcha form.
So I guess Google have possibly made some changes or some auto detection has triggered. The page itself is very low usage and uses a high TTL on the bank.
Just thought I'd share my findings in case you guys weren't aware or it helps others. I guess I will need to investigate other money currency exchanges.
Maybe we could update the README to reflect this? I'm happy to submit a PR if you wish. Let me know.
Thanks!