We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Openlibrary connector not loading isbn sometimes, when it appears to be available
an example: https://openlibrary.org/books/OL27222321M.json

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `bookwyrm/connectors/openlibrary.py`
Content:
```
1 ''' openlibrary data connector '''
2 import re
3 
4 from bookwyrm import models
5 from .abstract_connector import AbstractConnector, SearchResult, Mapping
6 from .abstract_connector import get_data
7 from .connector_manager import ConnectorException
8 from .openlibrary_languages import languages
9 
10 
11 class Connector(AbstractConnector):
12     ''' instantiate a connector for OL '''
13     def __init__(self, identifier):
14         super().__init__(identifier)
15 
16         get_first = lambda a: a[0]
17         get_remote_id = lambda a: self.base_url + a
18         self.book_mappings = [
19             Mapping('title'),
20             Mapping('id', remote_field='key', formatter=get_remote_id),
21             Mapping(
22                 'cover', remote_field='covers', formatter=self.get_cover_url),
23             Mapping('sortTitle', remote_field='sort_title'),
24             Mapping('subtitle'),
25             Mapping('description', formatter=get_description),
26             Mapping('languages', formatter=get_languages),
27             Mapping('series', formatter=get_first),
28             Mapping('seriesNumber', remote_field='series_number'),
29             Mapping('subjects'),
30             Mapping('subjectPlaces'),
31             Mapping('isbn13', formatter=get_first),
32             Mapping('isbn10', formatter=get_first),
33             Mapping('lccn', formatter=get_first),
34             Mapping(
35                 'oclcNumber', remote_field='oclc_numbers',
36                 formatter=get_first
37             ),
38             Mapping(
39                 'openlibraryKey', remote_field='key',
40                 formatter=get_openlibrary_key
41             ),
42             Mapping('goodreadsKey', remote_field='goodreads_key'),
43             Mapping('asin'),
44             Mapping(
45                 'firstPublishedDate', remote_field='first_publish_date',
46             ),
47             Mapping('publishedDate', remote_field='publish_date'),
48             Mapping('pages', remote_field='number_of_pages'),
49             Mapping('physicalFormat', remote_field='physical_format'),
50             Mapping('publishers'),
51         ]
52 
53         self.author_mappings = [
54             Mapping('id', remote_field='key', formatter=get_remote_id),
55             Mapping('name'),
56             Mapping(
57                 'openlibraryKey', remote_field='key',
58                 formatter=get_openlibrary_key
59             ),
60             Mapping('born', remote_field='birth_date'),
61             Mapping('died', remote_field='death_date'),
62             Mapping('bio', formatter=get_description),
63         ]
64 
65 
66     def get_remote_id_from_data(self, data):
67         ''' format a url from an openlibrary id field '''
68         try:
69             key = data['key']
70         except KeyError:
71             raise ConnectorException('Invalid book data')
72         return '%s%s' % (self.books_url, key)
73 
74 
75     def is_work_data(self, data):
76         return bool(re.match(r'^[\/\w]+OL\d+W$', data['key']))
77 
78 
79     def get_edition_from_work_data(self, data):
80         try:
81             key = data['key']
82         except KeyError:
83             raise ConnectorException('Invalid book data')
84         url = '%s%s/editions' % (self.books_url, key)
85         data = get_data(url)
86         return pick_default_edition(data['entries'])
87 
88 
89     def get_work_from_edition_data(self, data):
90         try:
91             key = data['works'][0]['key']
92         except (IndexError, KeyError):
93             raise ConnectorException('No work found for edition')
94         url = '%s%s' % (self.books_url, key)
95         return get_data(url)
96 
97 
98     def get_authors_from_data(self, data):
99         ''' parse author json and load or create authors '''
100         for author_blob in data.get('authors', []):
101             author_blob = author_blob.get('author', author_blob)
102             # this id is "/authors/OL1234567A"
103             author_id = author_blob['key']
104             url = '%s%s' % (self.base_url, author_id)
105             yield self.get_or_create_author(url)
106 
107 
108     def get_cover_url(self, cover_blob):
109         ''' ask openlibrary for the cover '''
110         cover_id = cover_blob[0]
111         image_name = '%s-L.jpg' % cover_id
112         return '%s/b/id/%s' % (self.covers_url, image_name)
113 
114 
115     def parse_search_data(self, data):
116         return data.get('docs')
117 
118 
119     def format_search_result(self, search_result):
120         # build the remote id from the openlibrary key
121         key = self.books_url + search_result['key']
122         author = search_result.get('author_name') or ['Unknown']
123         return SearchResult(
124             title=search_result.get('title'),
125             key=key,
126             author=', '.join(author),
127             connector=self,
128             year=search_result.get('first_publish_year'),
129         )
130 
131 
132     def load_edition_data(self, olkey):
133         ''' query openlibrary for editions of a work '''
134         url = '%s/works/%s/editions' % (self.books_url, olkey)
135         return get_data(url)
136 
137 
138     def expand_book_data(self, book):
139         work = book
140         # go from the edition to the work, if necessary
141         if isinstance(book, models.Edition):
142             work = book.parent_work
143 
144         # we can mass download edition data from OL to avoid repeatedly querying
145         edition_options = self.load_edition_data(work.openlibrary_key)
146         for edition_data in edition_options.get('entries'):
147             self.create_edition_from_data(work, edition_data)
148 
149 
150 def get_description(description_blob):
151     ''' descriptions can be a string or a dict '''
152     if isinstance(description_blob, dict):
153         return description_blob.get('value')
154     return description_blob
155 
156 
157 def get_openlibrary_key(key):
158     ''' convert /books/OL27320736M into OL27320736M '''
159     return key.split('/')[-1]
160 
161 
162 def get_languages(language_blob):
163     ''' /language/eng -> English '''
164     langs = []
165     for lang in language_blob:
166         langs.append(
167             languages.get(lang.get('key', ''), None)
168         )
169     return langs
170 
171 
172 def pick_default_edition(options):
173     ''' favor physical copies with covers in english '''
174     if not options:
175         return None
176     if len(options) == 1:
177         return options[0]
178 
179     options = [e for e in options if e.get('covers')] or options
180     options = [e for e in options if \
181         '/languages/eng' in str(e.get('languages'))] or options
182     formats = ['paperback', 'hardcover', 'mass market paperback']
183     options = [e for e in options if \
184         str(e.get('physical_format')).lower() in formats] or options
185     options = [e for e in options if e.get('isbn_13')] or options
186     options = [e for e in options if e.get('ocaid')] or options
187     return options[0]
188
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/bookwyrm/connectors/openlibrary.py b/bookwyrm/connectors/openlibrary.py
--- a/bookwyrm/connectors/openlibrary.py
+++ b/bookwyrm/connectors/openlibrary.py
@@ -27,9 +27,9 @@
             Mapping('series', formatter=get_first),
             Mapping('seriesNumber', remote_field='series_number'),
             Mapping('subjects'),
-            Mapping('subjectPlaces'),
-            Mapping('isbn13', formatter=get_first),
-            Mapping('isbn10', formatter=get_first),
+            Mapping('subjectPlaces', remote_field='subject_places'),
+            Mapping('isbn13', remote_field='isbn_13', formatter=get_first),
+            Mapping('isbn10', remote_field='isbn_10', formatter=get_first),
             Mapping('lccn', formatter=get_first),
             Mapping(
                 'oclcNumber', remote_field='oclc_numbers',
@@ -144,9 +144,34 @@
         # we can mass download edition data from OL to avoid repeatedly querying
         edition_options = self.load_edition_data(work.openlibrary_key)
         for edition_data in edition_options.get('entries'):
+            # does this edition have ANY interesting data?
+            if ignore_edition(edition_data):
+                continue
             self.create_edition_from_data(work, edition_data)
 
 
+def ignore_edition(edition_data):
+    ''' don't load a million editions that have no metadata '''
+    # an isbn, we love to see it
+    if edition_data.get('isbn_13') or edition_data.get('isbn_10'):
+        print(edition_data.get('isbn_10'))
+        return False
+    # grudgingly, oclc can stay
+    if edition_data.get('oclc_numbers'):
+        print(edition_data.get('oclc_numbers'))
+        return False
+    # if it has a cover it can stay
+    if edition_data.get('covers'):
+        print(edition_data.get('covers'))
+        return False
+    # keep non-english editions
+    if edition_data.get('languages') and \
+            'languages/eng' not in str(edition_data.get('languages')):
+        print(edition_data.get('languages'))
+        return False
+    return True
+
+
 def get_description(description_blob):
     ''' descriptions can be a string or a dict '''
     if isinstance(description_blob, dict):

{"golden_diff": "diff --git a/bookwyrm/connectors/openlibrary.py b/bookwyrm/connectors/openlibrary.py\n--- a/bookwyrm/connectors/openlibrary.py\n+++ b/bookwyrm/connectors/openlibrary.py\n@@ -27,9 +27,9 @@\n             Mapping('series', formatter=get_first),\n             Mapping('seriesNumber', remote_field='series_number'),\n             Mapping('subjects'),\n-            Mapping('subjectPlaces'),\n-            Mapping('isbn13', formatter=get_first),\n-            Mapping('isbn10', formatter=get_first),\n+            Mapping('subjectPlaces', remote_field='subject_places'),\n+            Mapping('isbn13', remote_field='isbn_13', formatter=get_first),\n+            Mapping('isbn10', remote_field='isbn_10', formatter=get_first),\n             Mapping('lccn', formatter=get_first),\n             Mapping(\n                 'oclcNumber', remote_field='oclc_numbers',\n@@ -144,9 +144,34 @@\n         # we can mass download edition data from OL to avoid repeatedly querying\n         edition_options = self.load_edition_data(work.openlibrary_key)\n         for edition_data in edition_options.get('entries'):\n+            # does this edition have ANY interesting data?\n+            if ignore_edition(edition_data):\n+                continue\n             self.create_edition_from_data(work, edition_data)\n \n \n+def ignore_edition(edition_data):\n+    ''' don't load a million editions that have no metadata '''\n+    # an isbn, we love to see it\n+    if edition_data.get('isbn_13') or edition_data.get('isbn_10'):\n+        print(edition_data.get('isbn_10'))\n+        return False\n+    # grudgingly, oclc can stay\n+    if edition_data.get('oclc_numbers'):\n+        print(edition_data.get('oclc_numbers'))\n+        return False\n+    # if it has a cover it can stay\n+    if edition_data.get('covers'):\n+        print(edition_data.get('covers'))\n+        return False\n+    # keep non-english editions\n+    if edition_data.get('languages') and \\\n+            'languages/eng' not in str(edition_data.get('languages')):\n+        print(edition_data.get('languages'))\n+        return False\n+    return True\n+\n+\n def get_description(description_blob):\n     ''' descriptions can be a string or a dict '''\n     if isinstance(description_blob, dict):\n", "issue": "Openlibrary connector not loading isbn sometimes, when it appears to be available\nan example: https://openlibrary.org/books/OL27222321M.json\n", "before_files": [{"content": "''' openlibrary data connector '''\nimport re\n\nfrom bookwyrm import models\nfrom .abstract_connector import AbstractConnector, SearchResult, Mapping\nfrom .abstract_connector import get_data\nfrom .connector_manager import ConnectorException\nfrom .openlibrary_languages import languages\n\n\nclass Connector(AbstractConnector):\n    ''' instantiate a connector for OL '''\n    def __init__(self, identifier):\n        super().__init__(identifier)\n\n        get_first = lambda a: a[0]\n        get_remote_id = lambda a: self.base_url + a\n        self.book_mappings = [\n            Mapping('title'),\n            Mapping('id', remote_field='key', formatter=get_remote_id),\n            Mapping(\n                'cover', remote_field='covers', formatter=self.get_cover_url),\n            Mapping('sortTitle', remote_field='sort_title'),\n            Mapping('subtitle'),\n            Mapping('description', formatter=get_description),\n            Mapping('languages', formatter=get_languages),\n            Mapping('series', formatter=get_first),\n            Mapping('seriesNumber', remote_field='series_number'),\n            Mapping('subjects'),\n            Mapping('subjectPlaces'),\n            Mapping('isbn13', formatter=get_first),\n            Mapping('isbn10', formatter=get_first),\n            Mapping('lccn', formatter=get_first),\n            Mapping(\n                'oclcNumber', remote_field='oclc_numbers',\n                formatter=get_first\n            ),\n            Mapping(\n                'openlibraryKey', remote_field='key',\n                formatter=get_openlibrary_key\n            ),\n            Mapping('goodreadsKey', remote_field='goodreads_key'),\n            Mapping('asin'),\n            Mapping(\n                'firstPublishedDate', remote_field='first_publish_date',\n            ),\n            Mapping('publishedDate', remote_field='publish_date'),\n            Mapping('pages', remote_field='number_of_pages'),\n            Mapping('physicalFormat', remote_field='physical_format'),\n            Mapping('publishers'),\n        ]\n\n        self.author_mappings = [\n            Mapping('id', remote_field='key', formatter=get_remote_id),\n            Mapping('name'),\n            Mapping(\n                'openlibraryKey', remote_field='key',\n                formatter=get_openlibrary_key\n            ),\n            Mapping('born', remote_field='birth_date'),\n            Mapping('died', remote_field='death_date'),\n            Mapping('bio', formatter=get_description),\n        ]\n\n\n    def get_remote_id_from_data(self, data):\n        ''' format a url from an openlibrary id field '''\n        try:\n            key = data['key']\n        except KeyError:\n            raise ConnectorException('Invalid book data')\n        return '%s%s' % (self.books_url, key)\n\n\n    def is_work_data(self, data):\n        return bool(re.match(r'^[\\/\\w]+OL\\d+W$', data['key']))\n\n\n    def get_edition_from_work_data(self, data):\n        try:\n            key = data['key']\n        except KeyError:\n            raise ConnectorException('Invalid book data')\n        url = '%s%s/editions' % (self.books_url, key)\n        data = get_data(url)\n        return pick_default_edition(data['entries'])\n\n\n    def get_work_from_edition_data(self, data):\n        try:\n            key = data['works'][0]['key']\n        except (IndexError, KeyError):\n            raise ConnectorException('No work found for edition')\n        url = '%s%s' % (self.books_url, key)\n        return get_data(url)\n\n\n    def get_authors_from_data(self, data):\n        ''' parse author json and load or create authors '''\n        for author_blob in data.get('authors', []):\n            author_blob = author_blob.get('author', author_blob)\n            # this id is \"/authors/OL1234567A\"\n            author_id = author_blob['key']\n            url = '%s%s' % (self.base_url, author_id)\n            yield self.get_or_create_author(url)\n\n\n    def get_cover_url(self, cover_blob):\n        ''' ask openlibrary for the cover '''\n        cover_id = cover_blob[0]\n        image_name = '%s-L.jpg' % cover_id\n        return '%s/b/id/%s' % (self.covers_url, image_name)\n\n\n    def parse_search_data(self, data):\n        return data.get('docs')\n\n\n    def format_search_result(self, search_result):\n        # build the remote id from the openlibrary key\n        key = self.books_url + search_result['key']\n        author = search_result.get('author_name') or ['Unknown']\n        return SearchResult(\n            title=search_result.get('title'),\n            key=key,\n            author=', '.join(author),\n            connector=self,\n            year=search_result.get('first_publish_year'),\n        )\n\n\n    def load_edition_data(self, olkey):\n        ''' query openlibrary for editions of a work '''\n        url = '%s/works/%s/editions' % (self.books_url, olkey)\n        return get_data(url)\n\n\n    def expand_book_data(self, book):\n        work = book\n        # go from the edition to the work, if necessary\n        if isinstance(book, models.Edition):\n            work = book.parent_work\n\n        # we can mass download edition data from OL to avoid repeatedly querying\n        edition_options = self.load_edition_data(work.openlibrary_key)\n        for edition_data in edition_options.get('entries'):\n            self.create_edition_from_data(work, edition_data)\n\n\ndef get_description(description_blob):\n    ''' descriptions can be a string or a dict '''\n    if isinstance(description_blob, dict):\n        return description_blob.get('value')\n    return description_blob\n\n\ndef get_openlibrary_key(key):\n    ''' convert /books/OL27320736M into OL27320736M '''\n    return key.split('/')[-1]\n\n\ndef get_languages(language_blob):\n    ''' /language/eng -> English '''\n    langs = []\n    for lang in language_blob:\n        langs.append(\n            languages.get(lang.get('key', ''), None)\n        )\n    return langs\n\n\ndef pick_default_edition(options):\n    ''' favor physical copies with covers in english '''\n    if not options:\n        return None\n    if len(options) == 1:\n        return options[0]\n\n    options = [e for e in options if e.get('covers')] or options\n    options = [e for e in options if \\\n        '/languages/eng' in str(e.get('languages'))] or options\n    formats = ['paperback', 'hardcover', 'mass market paperback']\n    options = [e for e in options if \\\n        str(e.get('physical_format')).lower() in formats] or options\n    options = [e for e in options if e.get('isbn_13')] or options\n    options = [e for e in options if e.get('ocaid')] or options\n    return options[0]\n", "path": "bookwyrm/connectors/openlibrary.py"}], "after_files": [{"content": "''' openlibrary data connector '''\nimport re\n\nfrom bookwyrm import models\nfrom .abstract_connector import AbstractConnector, SearchResult, Mapping\nfrom .abstract_connector import get_data\nfrom .connector_manager import ConnectorException\nfrom .openlibrary_languages import languages\n\n\nclass Connector(AbstractConnector):\n    ''' instantiate a connector for OL '''\n    def __init__(self, identifier):\n        super().__init__(identifier)\n\n        get_first = lambda a: a[0]\n        get_remote_id = lambda a: self.base_url + a\n        self.book_mappings = [\n            Mapping('title'),\n            Mapping('id', remote_field='key', formatter=get_remote_id),\n            Mapping(\n                'cover', remote_field='covers', formatter=self.get_cover_url),\n            Mapping('sortTitle', remote_field='sort_title'),\n            Mapping('subtitle'),\n            Mapping('description', formatter=get_description),\n            Mapping('languages', formatter=get_languages),\n            Mapping('series', formatter=get_first),\n            Mapping('seriesNumber', remote_field='series_number'),\n            Mapping('subjects'),\n            Mapping('subjectPlaces', remote_field='subject_places'),\n            Mapping('isbn13', remote_field='isbn_13', formatter=get_first),\n            Mapping('isbn10', remote_field='isbn_10', formatter=get_first),\n            Mapping('lccn', formatter=get_first),\n            Mapping(\n                'oclcNumber', remote_field='oclc_numbers',\n                formatter=get_first\n            ),\n            Mapping(\n                'openlibraryKey', remote_field='key',\n                formatter=get_openlibrary_key\n            ),\n            Mapping('goodreadsKey', remote_field='goodreads_key'),\n            Mapping('asin'),\n            Mapping(\n                'firstPublishedDate', remote_field='first_publish_date',\n            ),\n            Mapping('publishedDate', remote_field='publish_date'),\n            Mapping('pages', remote_field='number_of_pages'),\n            Mapping('physicalFormat', remote_field='physical_format'),\n            Mapping('publishers'),\n        ]\n\n        self.author_mappings = [\n            Mapping('id', remote_field='key', formatter=get_remote_id),\n            Mapping('name'),\n            Mapping(\n                'openlibraryKey', remote_field='key',\n                formatter=get_openlibrary_key\n            ),\n            Mapping('born', remote_field='birth_date'),\n            Mapping('died', remote_field='death_date'),\n            Mapping('bio', formatter=get_description),\n        ]\n\n\n    def get_remote_id_from_data(self, data):\n        ''' format a url from an openlibrary id field '''\n        try:\n            key = data['key']\n        except KeyError:\n            raise ConnectorException('Invalid book data')\n        return '%s%s' % (self.books_url, key)\n\n\n    def is_work_data(self, data):\n        return bool(re.match(r'^[\\/\\w]+OL\\d+W$', data['key']))\n\n\n    def get_edition_from_work_data(self, data):\n        try:\n            key = data['key']\n        except KeyError:\n            raise ConnectorException('Invalid book data')\n        url = '%s%s/editions' % (self.books_url, key)\n        data = get_data(url)\n        return pick_default_edition(data['entries'])\n\n\n    def get_work_from_edition_data(self, data):\n        try:\n            key = data['works'][0]['key']\n        except (IndexError, KeyError):\n            raise ConnectorException('No work found for edition')\n        url = '%s%s' % (self.books_url, key)\n        return get_data(url)\n\n\n    def get_authors_from_data(self, data):\n        ''' parse author json and load or create authors '''\n        for author_blob in data.get('authors', []):\n            author_blob = author_blob.get('author', author_blob)\n            # this id is \"/authors/OL1234567A\"\n            author_id = author_blob['key']\n            url = '%s%s' % (self.base_url, author_id)\n            yield self.get_or_create_author(url)\n\n\n    def get_cover_url(self, cover_blob):\n        ''' ask openlibrary for the cover '''\n        cover_id = cover_blob[0]\n        image_name = '%s-L.jpg' % cover_id\n        return '%s/b/id/%s' % (self.covers_url, image_name)\n\n\n    def parse_search_data(self, data):\n        return data.get('docs')\n\n\n    def format_search_result(self, search_result):\n        # build the remote id from the openlibrary key\n        key = self.books_url + search_result['key']\n        author = search_result.get('author_name') or ['Unknown']\n        return SearchResult(\n            title=search_result.get('title'),\n            key=key,\n            author=', '.join(author),\n            connector=self,\n            year=search_result.get('first_publish_year'),\n        )\n\n\n    def load_edition_data(self, olkey):\n        ''' query openlibrary for editions of a work '''\n        url = '%s/works/%s/editions' % (self.books_url, olkey)\n        return get_data(url)\n\n\n    def expand_book_data(self, book):\n        work = book\n        # go from the edition to the work, if necessary\n        if isinstance(book, models.Edition):\n            work = book.parent_work\n\n        # we can mass download edition data from OL to avoid repeatedly querying\n        edition_options = self.load_edition_data(work.openlibrary_key)\n        for edition_data in edition_options.get('entries'):\n            # does this edition have ANY interesting data?\n            if ignore_edition(edition_data):\n                continue\n            self.create_edition_from_data(work, edition_data)\n\n\ndef ignore_edition(edition_data):\n    ''' don't load a million editions that have no metadata '''\n    # an isbn, we love to see it\n    if edition_data.get('isbn_13') or edition_data.get('isbn_10'):\n        print(edition_data.get('isbn_10'))\n        return False\n    # grudgingly, oclc can stay\n    if edition_data.get('oclc_numbers'):\n        print(edition_data.get('oclc_numbers'))\n        return False\n    # if it has a cover it can stay\n    if edition_data.get('covers'):\n        print(edition_data.get('covers'))\n        return False\n    # keep non-english editions\n    if edition_data.get('languages') and \\\n            'languages/eng' not in str(edition_data.get('languages')):\n        print(edition_data.get('languages'))\n        return False\n    return True\n\n\ndef get_description(description_blob):\n    ''' descriptions can be a string or a dict '''\n    if isinstance(description_blob, dict):\n        return description_blob.get('value')\n    return description_blob\n\n\ndef get_openlibrary_key(key):\n    ''' convert /books/OL27320736M into OL27320736M '''\n    return key.split('/')[-1]\n\n\ndef get_languages(language_blob):\n    ''' /language/eng -> English '''\n    langs = []\n    for lang in language_blob:\n        langs.append(\n            languages.get(lang.get('key', ''), None)\n        )\n    return langs\n\n\ndef pick_default_edition(options):\n    ''' favor physical copies with covers in english '''\n    if not options:\n        return None\n    if len(options) == 1:\n        return options[0]\n\n    options = [e for e in options if e.get('covers')] or options\n    options = [e for e in options if \\\n        '/languages/eng' in str(e.get('languages'))] or options\n    formats = ['paperback', 'hardcover', 'mass market paperback']\n    options = [e for e in options if \\\n        str(e.get('physical_format')).lower() in formats] or options\n    options = [e for e in options if e.get('isbn_13')] or options\n    options = [e for e in options if e.get('ocaid')] or options\n    return options[0]\n", "path": "bookwyrm/connectors/openlibrary.py"}]}