The problem is that Yahoo is unilaterally deciding to send that response. It could be for any number of reasons, but most likely due to it detecting multiple connections by your script in some relatively short amount of time, and deciding that you have monopolized too much of its bandwidth. The only solution would be to limit how often you hit Yahoo with these requests. You might want to look into some sort of caching routine so that you store the results and only access that URL when the cache has exceeded some arbitrary age.