06-21-2011, 08:12 AM | #1 |
Enthusiast
Posts: 26
Karma: 168
Join Date: May 2005
Location: Wuhan, China
Device: Kindle DXG
|
HTTP Error 504 when fetch news from an intranet
Running calibre 0.8 on debian squeeze, when fetch New York Times from a corporate network, calibre give following error message:
Traceback (most recent call last): File "site.py", line 58, in main File "site-packages/calibre/ebooks/conversion/cli.py", line 282, in main File "site-packages/calibre/ebooks/conversion/plumber.py", line 920, in run File "site-packages/calibre/customize/conversion.py", line 204, in __call__ File "site-packages/calibre/web/feeds/input.py", line 101, in convert File "site-packages/calibre/web/feeds/news.py", line 632, in __init__ File "/tmp/calibre_0.8.0_tmp_w1kmw3/calibre_0.8.0_ZFyno8_recipes/recipe0.py", line 326, in get_browser br.open('http://www.nytimes.com/auth/login') File "site-packages/mechanize/_mechanize.py", line 203, in open File "site-packages/mechanize/_mechanize.py", line 255, in _mech_open httperror_seek_wrapper: HTTP Error 504: Gateway Timeout new york times is the only recipe failed so far. On the same LAN, The NY times website open without any problem in firefox. I tried pipe all traffic through a local http proxy, which itself use a upsteam socks proxy, to bypass the corporate proxy or filter server, but get the same error message. Any suggestions? |
07-30-2011, 12:26 AM | #2 |
Enthusiast
Posts: 26
Karma: 168
Join Date: May 2005
Location: Wuhan, China
Device: Kindle DXG
|
Solved.
nytimes needs https, however, calibre currently ignore https proxy setting. After modified /src/calibre/__init__.py, the nytimes recipe works again. ---------------------------------------------------------------------------- https_proxy = get_proxies().get('https', None) if https_proxy: opener.set_proxies({'https':http_proxy}) if http_proxy and https_proxy: opener.set_proxies({'https':http_proxy, 'http':http_proxy}) ---------------------------------------------------------------------------- |
Advert | |
|
07-30-2011, 01:01 AM | #3 |
creator of calibre
Posts: 44,559
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Added.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conversion error in news fetch | kwolf | Calibre | 3 | 08-23-2010 04:38 PM |
Fetch News error CSSRuleList | rjaaa | Calibre | 2 | 05-02-2010 08:23 PM |
Can't Fetch News | Catew | Calibre | 2 | 07-19-2009 08:46 PM |
Error in .91 Fetch news | Mitchll | Calibre | 15 | 10-05-2008 05:52 PM |
Error in the Fetch News | luck0602 | Calibre | 11 | 08-11-2008 04:11 AM |