summaryrefslogtreecommitdiff
path: root/getabook.c
diff options
context:
space:
mode:
Diffstat (limited to 'getabook.c')
-rw-r--r--getabook.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/getabook.c b/getabook.c
index db4ca96..5f85143 100644
--- a/getabook.c
+++ b/getabook.c
@@ -15,6 +15,7 @@
" -n download pages from numbers in stdin\n" \
" otherwise, all available pages will be downloaded\n"
+#define USESSL 0
#define URLMAX 1024
#define STRMAX 1024
#define MAXPAGES 9999
@@ -74,7 +75,7 @@ int getpagelist()
snprintf(url, URLMAX, "/gp/search-inside/service-data?method=getBookData&asin=%s", bookid);
- if(!get("www.amazon.com", url, NULL, NULL, &buf, 1))
+ if(!get("www.amazon.com", USESSL, url, NULL, NULL, &buf, 1))
return 1;
/* amazon have a canonical asin, which is needed to get all available pages */
@@ -132,7 +133,7 @@ int getpageurls(int pagenum)
strncpy(url, "/gp/search-inside/service-data", URLMAX);
snprintf(query, URLMAX, "method=goToPage&asin=%s&page=%d", bookid, pagenum);
- if(!post("www.amazon.com", url, NULL, NULL, query, &buf, 1))
+ if(!post("www.amazon.com", USESSL, url, NULL, NULL, query, &buf, 1))
return 1;
fillurls(buf);
@@ -158,7 +159,7 @@ int getpage(Page *page)
return 1;
}
- if(gettofile(host, page->url, NULL, NULL, path, 0)) {
+ if(gettofile(host, USESSL, page->url, NULL, NULL, path, 0)) {
fprintf(stderr, "%d failed\n", page->num);
return 1;
}