Add Google web search

This commit is contained in:
Kovid Goyal 2017-05-08 20:25:17 +05:30
parent 8ada28488c
commit abe1cf1425
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -12,20 +12,23 @@ AUTHOR_SEARCHES = {
'wikipedia': 'wikipedia':
'https://en.wikipedia.org/w/index.php?search={author}', 'https://en.wikipedia.org/w/index.php?search={author}',
'google': 'google':
'https://www.google.co.in/search?tbm=bks&q=inauthor:%22{author}%22', 'https://www.google.com/search?tbm=bks&q=inauthor:%22{author}%22',
} }
BOOK_SEARCHES = { BOOK_SEARCHES = {
'goodreads': 'goodreads':
'https://www.goodreads.com/search?q={author}+{title}&search%5Bsource%5D=goodreads&search_type=books&tab=books', 'https://www.goodreads.com/search?q={author}+{title}&search%5Bsource%5D=goodreads&search_type=books&tab=books',
'google': 'google':
'https://www.google.co.in/search?tbm=bks&q=inauthor:%22{author}%22+intitle:%22{title}%22', 'https://www.google.com/search?tbm=bks&q=inauthor:%22{author}%22+intitle:%22{title}%22',
'gws':
'https://www.google.com/search?q=inauthor:%22{author}%22+intitle:%22{title}%22',
} }
NAMES = { NAMES = {
'goodreads': 'Goodreads', 'goodreads': _('Goodreads'),
'google': 'Google Books', 'google': _('Google books'),
'wikipedia': 'Wikipedia' 'wikipedia': _('Wikipedia'),
'gws': _('Google web search'),
} }
name_for = NAMES.get name_for = NAMES.get