summaryrefslogtreecommitdiff
path: root/getbnbook.c
diff options
context:
space:
mode:
Diffstat (limited to 'getbnbook.c')
-rw-r--r--getbnbook.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/getbnbook.c b/getbnbook.c
index 6fa247f..a63416d 100644
--- a/getbnbook.c
+++ b/getbnbook.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
@@ -38,7 +39,7 @@ int getpagelist()
snprintf(url, URLMAX, "/DigBooks/viewer/bookviewmanager.aspx?op=getbookinfo&ean=%s", bookid);
- if(!get("search2.barnesandnoble.com", url, cookies, NULL, &buf, 1))
+ if(!get("search2.barnesandnoble.com", USESSL, url, cookies, NULL, &buf, 1))
return 1;
/* find page url structure */
@@ -81,7 +82,7 @@ int getpage(int pagenum)
s=strchr(urlpath+7, '/');
snprintf(pageurl, STRMAX, s, pagenum);
- if(gettofile("search2.barnesandnoble.com", pageurl, cookies, NULL, path, 0)) {
+ if(gettofile("search2.barnesandnoble.com", USESSL, pageurl, cookies, NULL, path, 0)) {
fprintf(stderr, "%d failed\n", pagenum);
return 1;
}
@@ -113,7 +114,7 @@ int main(int argc, char *argv[])
bookdir = argv[argc-1];
/* get cookie */
- if(get("www.barnesandnoble.com", "/", NULL, cookies, &tmp, 0))
+ if(get("www.barnesandnoble.com", USESSL, "/", NULL, cookies, &tmp, 0))
free(tmp);
if(getpagelist()) {