google-books-downloader icon indicating copy to clipboard operation
google-books-downloader copied to clipboard

Books with an id containing a hyphen/dash/underscore are not handled properly

Open Eddict opened this issue 3 years ago • 0 comments

eg. https://books.google.nl/books?id=S-Fu4fGHnlAC eg. https://books.google.nl/books?id=J2jC7gH_4xAC

can be solved by correcting the regex

def get_book_url():
    
    if re.findall(r"id=[A-Za-z0-9-_]+", url):
        id_part = re.findall(r"id=[A-Za-z0-9-_]+", url)[-1]

Eddict avatar Apr 17 '21 19:04 Eddict