Cache problem with urllib2?

Kuntal Sampat sampat at removemiel.mot.com
Tue Apr 2 03:44:26 EST 2002


Apparently, calling urllib.urlcleanup() right before using urllib2.urlopen()
has solved the problem.

"Kuntal Sampat" <sampat at removemiel.mot.com> wrote in message
news:a893o4$s51 at nntp.cig.mot.com...
> Hi,
> I have a program that uses urllib2 to open a URL and then do further
> processing on it based on the content.
> The page I access is updated about once a week. My script is a cron job
> under UNIX. It wakes up regularly, checks for the update and sends me an
> email if the site has been updated. But my script fails to get the updated
> page on time. At one time it was over a day before my script actually saw
> the updated page.
> At another time, I have observed that if I do a "force reload" on the
> browser, then the script starts working fine (i.e. it accesses the new
> page).
>
> My question is this: Does urllib2 maintain a cache? If so, how can I clear
> it everytime before my script runs.
>
> Much thanks.
> Kuntal Sampat.
>
>





More information about the Python-list mailing list