Skip to content
Permalink
Browse files

Merge pull request #2045 from internetarchive/hotfix/search-debugging

relax https->http for internal advancedsearch calls, enable debug
  • Loading branch information...
mekarpeles committed Apr 13, 2019
2 parents 50aec13 + ed92cac commit b7574c0438262c33b54390fbc6aa9debcbd74661
Showing with 2 additions and 2 deletions.
  1. +2 −2 openlibrary/core/lending.py
@@ -179,14 +179,14 @@ def compose_ia_url(limit=None, page=1, subject=None, query=None, work_id=None,
(sorts if sorts and isinstance(sorts, list)
else [''])]))
rows = limit or DEFAULT_IA_RESULTS
url = "https://%s/advancedsearch.php?q=%s&%s&%s&rows=%s&page=%s&output=json" % (
url = "http://%s/advancedsearch.php?q=%s&%s&%s&rows=%s&page=%s&output=json" % (
config_bookreader_host, q, encoded_fields, sort, str(rows), str(page))
return url

def get_random_available_ia_edition():
"""uses archive advancedsearch to raise a random book"""
try:
url=("https://%s/advancedsearch.php?q=_exists_:openlibrary_work"\
url=("http://%s/advancedsearch.php?q=_exists_:openlibrary_work"\
"+AND+loans__status__status:AVAILABLE"\
"&fl=identifier,openlibrary_edition,loans__status__status"\
"&output=json&rows=1&sort[]=random" % (config_bookreader_host))

0 comments on commit b7574c0

Please sign in to comment.
You can’t perform that action at this time.