diff --git a/src/calibre/gui2/store/ebooks_com_plugin.py b/src/calibre/gui2/store/ebooks_com_plugin.py index 85176c10d7..341d08abac 100644 --- a/src/calibre/gui2/store/ebooks_com_plugin.py +++ b/src/calibre/gui2/store/ebooks_com_plugin.py @@ -59,9 +59,10 @@ class EbookscomStore(BasicStoreConfig, StorePlugin): break id = ''.join(data.xpath('.//a[1]/@href')) - id = id.split('=')[-1] - if not id: + mo = re.search('\d+', id) + if not mo: continue + id = mo.group() cover_url = ''.join(data.xpath('.//img[1]/@src'))