我在我的Android应用程序中使用IT-Ebooks Open Api进行图书搜索。
当我通过以下网络服务电话请求书籍详情时:http://it-ebooks-api.info/v1/book/2279690981。它将返回ID为2279690981的该书的所有详细信息。
数据:
{"Error":"0","Time":0.0005,"ID":2279690981,"Title":"PHP & MySQL: The Missing Manual","SubTitle":"",
"Description":"If you can build websites with CSS and JavaScript, this book takes you to the next level-creating dynamic, database-driven websites with PHP and MySQL. Learn how to build a database, manage your content, and interact with users through queries and web forms. With step-by-step tutorials, real-world examples, and jargon-free explanations, you\u2019ll soon discover the power of server-side programming.",
"Author":"Brett McLaughlin","ISBN":"9780596515867",
"Year":"2011","Page":"498","Publisher":"O'Reilly Media","Image":"http ://s.it- ebooks-api.info/3/p hp__mysql_the_missing_manual.jpg",
"Download":"http ://filepi .com /i/qqkNNW2"}
但是当我尝试使用下载网址下载该图书时,它只下载了一个页面。我无法通过我的应用程序下载pdf文件。
是否有任何身体面对我现在面临的问题???
如果您有解决方案,请分享。请提前感谢。
答案 0 :(得分:0)
答案 1 :(得分:0)
您必须保存Cookie并将其与引荐链接结合使用。
wget --cookies=on --keep-session-cookies --save-cookies=cookie.txt MAIN_URL
wget -O ./OUTPUTFILE --referer=MAIN_URL --cookies=on --load cookies=cookie.txt --keep-session-cookies