summaryrefslogtreecommitdiff
path: root/getabook.c
diff options
context:
space:
mode:
Diffstat (limited to 'getabook.c')
-rw-r--r--getabook.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/getabook.c b/getabook.c
index 03552a7..ac88f6d 100644
--- a/getabook.c
+++ b/getabook.c
@@ -91,11 +91,13 @@ int getpagelist()
int getpageurls(int pagenum) {
char url[URLMAX];
+ char query[URLMAX];
char *buf = NULL;
- snprintf(url, URLMAX, "/gp/search-inside/service-data?method=goToPage&asin=%s&page=%d", bookid, pagenum);
+ strncpy(url, "/gp/search-inside/service-data", URLMAX);
+ snprintf(query, URLMAX, "method=goToPage&asin=%s&page=%d", bookid, pagenum);
- if(!get("www.amazon.com", url, NULL, NULL, &buf))
+ if(!post("www.amazon.com", url, query, &buf))
return 1;
fillurls(buf);