1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| import requests import re
sl = 0 dz = '/storage/emulated/0/葫芦侠美腿图片/图片/' url = "http://floor.huluxia.com/post/list/ANDROID/2.1?platform=2&gkey=000000&app_version=4.0.0.6&versioncode=20141431&market_id=floor_web&_key=2A081AA21B3979E8EE8E65E8519FF5C67AEBBF1CAFE645A87A80D1BC5399EB34B4AAA5A4E7A640A011F61B881190444A886CD5F8ADBAD7B1&device_code=%5Bw%5D02%3A00%3A00%3A00%3A00%3A00%5Bd%5D4e91d752-d75d-4d56-b4e7-a7e55acfb724&start=0&count=20&cat_id=56&tag_id=0&sort_by=0" zz = requests.get(url).json() for sj in zz['posts']: for lj in sj['images']: mc = lj[47:] tp = requests.get(lj) tpdz = dz + mc print(lj) with open(tpdz,'wb') as f: f.write(tp.content)
|