jdgwartney / weboutlook

Automatically exported from code.google.com/p/weboutlook
0 stars 0 forks source link

Scraping mail from OWA 2007 - [Errno socket error] The read operation timed out #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

Am trying to use version 0.1.1 of Scraper (by Greg Albrecht) to scrape mail 
from OWA 2007. Unfortunately I keep receiving a timeout. I am a Python newbie. 
I am running Python 2.4. Can anybody help me get this script working? I am 
really lookin forward to use it.

What steps will reproduce the problem? Am running following code in the console:
from scraper import OutlookWebScraper
s = OutlookWebScraper('https://mail.bt.com', 'domain\user', 'password')
s.login()

What is the expected output? Not an error message.

What do you see instead? 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "scraper.py", line 140, in login
    html        = self.get_page(url=url)
  File "scraper.py", line 113, in get_page
    f = opener.open(fullurl=url)
  File "C:\Python27\lib\urllib.py", line 205, in open
    return getattr(self, name)(url)
  File "C:\Python27\lib\urllib.py", line 449, in open_https
    return self.http_error(url, fp, errcode, errmsg, headers)
  File "C:\Python27\lib\urllib.py", line 369, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "C:\Python27\lib\urllib.py", line 675, in http_error_401
    errcode, errmsg, headers)
  File "C:\Python27\lib\urllib.py", line 377, in http_error_default
    void = fp.read()
  File "C:\Python27\lib\socket.py", line 349, in read
    data = self._sock.recv(rbufsize)
  File "C:\Python27\lib\ssl.py", line 217, in recv
    return self.read(buflen)
  File "C:\Python27\lib\ssl.py", line 138, in read
    return self._sslobj.read(len)
IOError: [Errno socket error] The read operation timed out

What version of the product are you using? On what operating system?
Am using 0.1.1 of Scraper (by Greg Albrecht) to scrape mail from OWA 2007. I do 
this on Windows XP 64.

Please provide any additional information below. Am a Python newbie.

Original issue reported on code.google.com by christia...@gmail.com on 13 Nov 2010 at 2:11

GoogleCodeExporter commented 8 years ago
The shown output is from Python 2.7, I receive thesame output from Python 2.4

Original comment by christia...@gmail.com on 13 Nov 2010 at 2:13

GoogleCodeExporter commented 8 years ago
Change the timeout

    import socket
    socket.timeout(300)

That fixed it for me

Original comment by raja.ka...@gmail.com on 3 Dec 2010 at 4:26