Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/GetIABooksActivity.py
diff options
context:
space:
mode:
authorJames Simmons <jim@olpc.simmons>2009-06-27 17:03:56 (GMT)
committer James Simmons <jim@olpc.simmons>2009-06-27 17:03:56 (GMT)
commit09f8f734f5d248006292f38d63a137fa027956fd (patch)
tree95a2349fb11d33b918b6a52a7f3be30ab57c66bb /GetIABooksActivity.py
parent5cb8ccc3e7e95f8d5fc54cdc1cd7a57ebee5e56d (diff)
modified: GetIABooksActivity.py
Refine search criteria.
Diffstat (limited to 'GetIABooksActivity.py')
-rwxr-xr-xGetIABooksActivity.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/GetIABooksActivity.py b/GetIABooksActivity.py
index d8eb708..0a8864f 100755
--- a/GetIABooksActivity.py
+++ b/GetIABooksActivity.py
@@ -221,7 +221,7 @@ class GetIABooksActivity(activity.Activity):
FL = urllib.quote('fl[]')
SORT = urllib.quote('sort[]')
search_url = 'http://www.archive.org/advancedsearch.php?q=' + \
- urllib.quote('(' + search_text.lower() + ') AND format:(DJVU)')
+ urllib.quote('(title:(' + search_text.lower() + ') OR creator:(' + search_text.lower() +')) AND format:(DJVU)')
search_url += '&' + FL + '=creator&' + FL + '=description&' + FL + '=format&' + FL + '=identifier&' + FL + '=language'
search_url += '&' + FL + '=publicdate&' + FL + '=publisher&' + FL + '=subject&' + FL + '=title&' + FL + '=volume'
search_url += '&' + SORT + '=title&' + SORT + '&' + SORT + '=&rows=500&save=yes&fmt=csv&xmlsearch=Search'
@@ -284,6 +284,7 @@ class GetIABooksActivity(activity.Activity):
6, row[6], 7, row[7], 8, row[8], 9, row[9], \
COLUMN_TITLE_TRUNC, self.truncate(row[COLUMN_TITLE], 75), \
COLUMN_CREATOR_TRUNC, self.truncate(row[COLUMN_CREATOR], 40))
+ os.remove(tempfile)
def truncate(self, str, length):
if len(str) > length: