http web fetch question

G

grocery_stocker

Say I have a script that fetches data from a website every hour. Is
there a general solution or is the solution operating system specific?
 
P

Philip Semanchuk

Say I have a script that fetches data from a website every hour. Is
there a general solution or is the solution operating system specific?

It's not OS-specific. See the Python standard library modules urllib,
urllib2, or just run a command line utility like wget or curl.
 
G

grocery_stocker

WRT the periodic operation part of your task, there's the `sched`
module --http://docs.python.org/library/sched.html

Maybe I'm being a tad bit dense here, but I don't see how this
schedule mod can be used to fetch data from a website every hour for
10 hours straight and why this is different than using something like
time.sleep().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top