Problem accessing a web page

A

Antoni Mont

Hi all,

My apologises if this is not the appropriate group.

I'd like to access a web site from a python script. That page, in fact,
is a form of main page. With a browser (Firefox, for instance) I can do
it without problem: I open the main web whose url is:

'http://www.mcu.es/webISBN/tituloSim...=busquedaisbn&layout=busquedaisbn&language=es'

and then, from the same (or another tab) I open the form (it's a book
database and the ISBN is the relevant parameter) whose url is:

'http://www.mcu.es/webISBN/tituloSim...=8484031128&action=Buscar&layout=busquedaisbn'

So I get the information about the book.

But when I try to do the same from the script, I get a time-out
error -without time elapsing at all. This is the piece of the
script relevant for the subject:

#!/usr/bin/python
# coding: latin-1
import os, sys
import types
import time
import string
import fileinput
import re
import urllib

mcup =
urllib.urlopen('http://www.mcu.es/webISBN/tituloSim...=busquedaisbn&layout=busquedaisbn&language=es')
# open main url
jonk = mcup.read() # read no matter
mcui =
urllib.urlopen('http://www.mcu.es/webISBN/tituloSim...=8484031128&action=Buscar&layout=busquedaisbn')
# open form for isbn
pagllibre = mcui.read() # reads it
print pagllibre # and print it
mcui.close() # close form
mcup.close() # close main page

Thanks in advance, I'd appreciate any help.

Regards,
Antoni Mont
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top