summaryrefslogtreecommitdiff
path: root/getgbook.c
diff options
context:
space:
mode:
authorNick White <hg@njw.me.uk>2011-08-07 12:46:52 +0100
committerNick White <hg@njw.me.uk>2011-08-07 12:46:52 +0100
commit62563596f477238d480fe4a701544413b6c722f5 (patch)
tree91379e6c654e9e9ff47793a892aa990e737e85dc /getgbook.c
parent3d08e78700331588f6d43db725cc361f841c012d (diff)
Abide by google's robots.txt, and lay out legal issues
Diffstat (limited to 'getgbook.c')
-rw-r--r--getgbook.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/getgbook.c b/getgbook.c
index b4a23af..5f0a0ae 100644
--- a/getgbook.c
+++ b/getgbook.c
@@ -29,7 +29,7 @@ Page *getpagedetail(char *bookid, char *pg, char *cookie)
char *c, *d, *p, *buf = NULL;
Page *page;
- snprintf(url, URLMAX, "/books?id=%s&pg=%s&jscmd=click3", bookid, pg);
+ snprintf(url, URLMAX, "/books?id=%s&pg=%s&jscmd=click3&q=subject:a", bookid, pg);
if(!get("books.google.com", url, cookie, NULL, &buf))
return NULL;
@@ -51,7 +51,7 @@ Page *getpagedetail(char *bookid, char *pg, char *cookie)
} else
*p = *d;
}
- *p = '\0';
+ strncpy(p, "&q=subject:a", 12);
} else
d=c;