diff options
author | Nick White <git@njw.me.uk> | 2011-09-29 19:13:27 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2011-09-29 19:13:27 +0100 |
commit | 399438e4a78777db9230968ef5902915b4c814ce (patch) | |
tree | da8fd7f49970b3afd3afb5a7f5a07bef3eb4856b /getabook.c | |
parent | a8400b4837f67b2e0ab7fbf5bdd12545c9bac390 (diff) |
Post to goToPage amazon url; more reliable for some reason
Diffstat (limited to 'getabook.c')
-rw-r--r-- | getabook.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |