~submarine/ubuntu-scopes/gallica-25-limit

« back to all changes in this revision

Viewing changes to src/unity_gallica_daemon.py

  • Committer: David Callé
  • Date: 2013-03-22 10:42:04 UTC
  • Revision ID: davidc@framli.eu-20130322104204-a2nskzd9gomgaifm
Don't fetch more than 25 results from the API for speed and ease of exploration

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
        return results
67
67
    search = search.replace(' ', ' AND ')
68
68
    search = urllib.parse.quote(search)
69
 
    uri = ('%sSRU?operation=searchRetrieve&version=1.2&maximumRecords=100&startRecord=1&query=%s' % (SEARCH_URI, search))
 
69
    uri = ('%sSRU?operation=searchRetrieve&version=1.2&maximumRecords=25&startRecord=1&query=%s' % (SEARCH_URI, search))
70
70
    print (uri)
71
71
    try:
72
72
        response = urllib.request.urlopen(uri).read()