爬虫Android app(做过app的应该知道,基本使用json传递数据)
1、通过fiddler 找到对应的响应请求的url 和返回的JSON
2、requests 写代码,for循环进行网络请求,保存图片
未解决的问题:
绘本多多这个应用的图片能够直接拿到,也尝试过《咔哒故事》,图片地址不能直接返回图片放弃了;
# -*- coiding:UTF-8 -*-
import requests
import json
from contextlib import closing
import os
class get_photos(object):
"""docstring for get_photos"""
def __init__(self):
self.books_list_ids = []
self.book_pic_list_ids = []
self.download_book_list_server = 'http://book.ergeduoduo.com/baby/bbpic.php?&pg=0&act=booklist&ps=600&pid=0'
self.download_book_pic_list_server = 'http://book.ergeduoduo.com/baby/bbpic.php?&act=bookdetail&page=0&rid=ssss'
self.download_book_pic = 'http://cdnbbbd.shoujiduoduo.com/bb/book/xxxx/zzzz.jpg'
def download(se