ddg
This commit is contained in:
parent
bceb5e6d4a
commit
ecf782af64
3 changed files with 45 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ def find(title, author=None, publisher=None, date=None):
|
|||
isbns = []
|
||||
for r in ox.web.google.find(query):
|
||||
isbns += find_isbns(' '.join(r))
|
||||
|
||||
print isbns, 'google'
|
||||
results = []
|
||||
done = set()
|
||||
for isbn in isbns:
|
||||
|
|
@ -35,4 +35,6 @@ def find(title, author=None, publisher=None, date=None):
|
|||
done.add(isbn)
|
||||
if len(isbn) == 10:
|
||||
done.add(stdnum.isbn.to_isbn13(isbn))
|
||||
if len(isbn) == 13:
|
||||
done.add(stdnum.isbn.to_isbn10(isbn))
|
||||
return results
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue