Help with Metadata Agent HTTP Error 302: I'm stumped

I need help. The website I was hitting modified something on their web pages.

The metadata agent I wrote was working fine, but now, it is giving the HTTP Error 302: on the following line:

 

japmovie = HTML.ElementFromURL(JAP_DETAIL_PAGE % query)

 

If I use a regular browser with the same URL, it works.

 

Any assistance appreciated.

 

 

HTTPError: HTTP Error 302: The HTTP server returned a redirect error that would lead to an infinite loop.
The last 30x error message was:
Found
 

Can you please provide us with an example url and the metadata agent code?