Fixed the Wikipedia module's search capability.

This commit is contained in:
Sean B. Palmer
2010-04-03 11:08:03 +01:00
parent c5b234578e
commit b4c7019d53
4 changed files with 30 additions and 5 deletions

View File

@@ -84,7 +84,11 @@ def f_title(self, origin, match, args):
try:
redirects = 0
while True:
req = urllib2.Request(uri, headers={'Accept':'text/html'})
headers = {
'Accept': 'text/html',
'User-Agent': 'Mozilla/5.0 (Phenny)'
}
req = urllib2.Request(uri, headers=headers)
u = urllib2.urlopen(req)
info = u.info()
u.close()