From 269086d349f05d8b6a61d9e93f620456d37b7615 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 1 Sep 2010 19:57:29 +0200 Subject: [PATCH] new user agent, fix path --- ox/net.py | 2 +- ox/normalize.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ox/net.py b/ox/net.py index 2e77540..0ed02d2 100644 --- a/ox/net.py +++ b/ox/net.py @@ -12,7 +12,7 @@ from chardet.universaldetector import UniversalDetector # Default headers for HTTP requests. DEFAULT_HEADERS = { - 'User-Agent': 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 Firefox/3.6.8', + 'User-Agent': 'Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100823 Firefox/4.0.1', 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'en-us,en;q=0.5', diff --git a/ox/normalize.py b/ox/normalize.py index 076c411..f2a4016 100644 --- a/ox/normalize.py +++ b/ox/normalize.py @@ -188,7 +188,7 @@ def normalizeName(name): return name def normalizePath(path): - path = path.replace(':', '_').replace('/', '') + path = path.replace(':', '_').replace('/', '_') if path.endswith('.'): path = path[:-1] + '_' return path