Skip to content

Commit

Permalink
[translate] restore custom useragent
Browse files Browse the repository at this point in the history
Without this magic useragent translate doesn't work
  • Loading branch information
Elad Alfassa committed Sep 9, 2014
1 parent 411433a commit 7253466
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def translate(text, in_lang='auto', out_lang='en'):
raw = True

headers = {
'User-Agent': web.USER_AGENT
'User-Agent': 'Mozilla/5.0' +
'(X11; U; Linux i686)' +
'Gecko/20071127 Firefox/2.0.0.11'
}

url_query = {
Expand Down

0 comments on commit 7253466

Please sign in to comment.