Skip to content

Commit

Permalink
Merge pull request #9968 from cdrini/disable-failing-http-reqs
Browse files Browse the repository at this point in the history
Temporarily disable erroring network requests
  • Loading branch information
jimchamp authored Oct 30, 2024
2 parents 377be25 + a20bd2f commit 3ad0911
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
1 change: 1 addition & 0 deletions openlibrary/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@ def get_url_suffix(self):
def wikidata(
self, bust_cache: bool = False, fetch_missing: bool = False
) -> WikidataEntity | None:
return None
if wd_id := self.remote_ids.get("wikidata"):
return get_wikidata_entity(
qid=wd_id, bust_cache=bust_cache, fetch_missing=fetch_missing
Expand Down
6 changes: 1 addition & 5 deletions openlibrary/i18n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,7 @@ msgstr ""

#: admin/imports-add.html admin/inspect/store.html admin/ip/view.html
#: admin/people/edits.html admin/permissions.html check_ins/check_in_form.html
#: check_ins/reading_goal_form.html covers/add.html
#: check_ins/reading_goal_form.html
msgid "Submit"
msgstr ""

Expand Down Expand Up @@ -4322,10 +4322,6 @@ msgstr ""
msgid "Upload"
msgstr ""

#: covers/add.html
msgid "Or, paste in the image URL if it's on the web"
msgstr ""

#: covers/add.html
msgid "Or, use the the cover from Internet Archive"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion openlibrary/macros/AffiliateLinks.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
} if isbn else None

# Fetch price data
if not is_bot() and prices and isbn:
if False and not is_bot() and prices and isbn:
bwb_metadata = get_betterworldbooks_metadata(isbn)
bwb['price'] = bwb_metadata and bwb_metadata.get('price')
if amazon:
Expand Down
18 changes: 9 additions & 9 deletions openlibrary/templates/covers/add.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
</div>
</form>

<form class="ol-cover-form ol-cover-form--url" method="post" enctype="multipart/form-data" action="$action">
<div class="label">
<label id="imageWeb" for="imageUrl">$_("Or, paste in the image URL if it's on the web")</label>
</div>
<div class="input">
<input type="url" name="url" id="imageUrl" value="$data.get('url', '')" placeholder="https://..." required />
<button type="submit" class="cta-btn cta-btn--vanilla">$_("Submit")</button>
</div>
</form>
$#<form class="ol-cover-form ol-cover-form--url" method="post" enctype="multipart/form-data" action="$action">
$# <div class="label">
$# <label id="imageWeb" for="imageUrl">$_("Or, paste in the image URL if it's on the web")</label>
$# </div>
$# <div class="input">
$# <input type="url" name="url" id="imageUrl" value="$data.get('url', '')" placeholder="https://..." required />
$# <button type="submit" class="cta-btn cta-btn--vanilla">$_("Submit")</button>
$# </div>
$#</form>

$if doc.type.key == "/type/edition" and doc.ocaid:
$ img_url = "https://archive.org/services/img/%s/full/pct:600/0/default.jpg" % doc.ocaid
Expand Down

0 comments on commit 3ad0911

Please sign in to comment.