Mercurial > eagle-eye
comparison pyikriam/ikariam.py @ 227:f41ee87f4f7a
merged
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Tue, 04 Nov 2008 23:44:48 +0800 |
parents | f3502833be7c |
children | 60c4b4b78a01 |
comparison
equal
deleted
inserted
replaced
226:792e6e23f2a1 | 227:f41ee87f4f7a |
---|---|
9 from StringIO import StringIO | 9 from StringIO import StringIO |
10 | 10 |
11 class fake_moz(object): | 11 class fake_moz(object): |
12 __metaclass__ = decorator | 12 __metaclass__ = decorator |
13 | 13 |
14 def __init__(self,headers=0): | 14 def __init__(self,headers=None): |
15 fakeheaders=[('User-agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.8.1.12pre) Gecko/20071220 BonEcho/2.0.0.12pre')] | 15 fakeheaders=[('User-agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.8.1.12pre) Gecko/20071220 BonEcho/2.0.0.12pre')] |
16 if headers: | 16 if headers: |
17 fakeheaders=fakeheaders+headers | 17 fakeheaders=fakeheaders+headers |
18 super(fake_moz, self).__init__() | 18 super(fake_moz, self).__init__() |
19 cookie_jar = cookielib.LWPCookieJar() | 19 cookie_jar = cookielib.LWPCookieJar() |