2.分析Ajax请求并抓取今日头条街拍美图
import requests from urllib.parse import urlencode # 引入异常类 from requests.exceptions import RequestException # 保存文件时用到json格式 import json # 正则表达式 import re def get_page_index(offset,keyword): data = { 'autoload':'true', 'count':'20', 'cur_tab':1, 'format':'json', 'from':'search_tab', 'keyword':keyword, 'offset':offset } url = 'https://www.toutiao.com/search_content/?'+ urlencode(data) try: response = requests.get(url) if response.status_code == 200: return response.text return None except RequestException: print('请求索引页出错') return None
def parse_page_index(html):
data = json.loads(html)
if data and 'data' in data.keys():
for item in data.get('data'):
yield item.get('article_url')
def get_page_detail(url):
try:
response = requests.get(url)
if response.status_code == 200:
return response.text
return None
except RequestException:
print('请求详情页出错',url)
return None
def parse_page_detail(html):
soup = bs(html,'lxml')
title = soup.select('title')[0].get_text()
print(title)
images_pattern = re.compile('gallery: JSON.parse("(.*?);',re.S)
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 BASE_DATA.galleryInfo = { 2 title: '路人街拍,个子不高,穿得却很有范,而且时尚潮流', 3 isOriginal: false, 4 mediaInfo: BASE_DATA.mediaInfo, 5 gallery: JSON.parse( 6 "{\"count\":5,\"sub_images\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/15324800265505b953ab972\",\"width\":640,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/15324800265505b953ab972\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/pgc-image\\/15324800265505b953ab972\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/pgc-image\\/15324800265505b953ab972\"}],\"uri\":\"origin\\/pgc-image\\/15324800265505b953ab972\",\"height\":959},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/1532480004156480c21a63e\",\"width\":640,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/1532480004156480c21a63e\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/pgc-image\\/1532480004156480c21a63e\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/pgc-image\\/1532480004156480c21a63e\"}],\"uri\":\"origin\\/pgc-image\\/1532480004156480c21a63e\",\"height\":1011},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/1532480016958bdc65dea62\",\"width\":640,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/1532480016958bdc65dea62\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/pgc-image\\/1532480016958bdc65dea62\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/pgc-image\\/1532480016958bdc65dea62\"}],\"uri\":\"origin\\/pgc-image\\/1532480016958bdc65dea62\",\"height\":929},{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/pgc-image\\/15324800362354f9d1c3ec1\",\"width\":640,\"url_list\":[{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/pgc-image\\/15324800362354f9d1c3ec1\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/pgc-image\\/15324800362354f9d1c3ec1\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/pgc-image\\/15324800362354f9d1c3ec1\"}],\"uri\":\"origin\\/pgc-image\\/15324800362354f9d1c3ec1\",\"height\":960},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/15324800476353e6c3e0c25\",\"width\":640,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/15324800476353e6c3e0c25\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/pgc-image\\/15324800476353e6c3e0c25\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/pgc-image\\/15324800476353e6c3e0c25\"}],\"uri\":\"origin\\/pgc-image\\/15324800476353e6c3e0c25\",\"height\":986}],\"max_img_width\":640,\"labels\":[\"\\u65f6\\u88c5\\u642d\\u914d\"],\"sub_abstracts\":[\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\",\" \",\" \",\" \",\" \"],\"sub_titles\":[\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\",\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\",\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\",\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\",\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\"]}"), 7 siblingList: [{"comments_count": 72, "media_avatar_url": "//p3.pstatp.com/large/8b6000041e42267916a3", 8 "is_feed_ad": false, "is_diversion_page": false, "title": "街拍路人,高跟控的时尚穿搭参考,让你展现与众不同的时尚个性", 9 "single_mode": true, "gallary_image_count": 7, "middle_mode": false, "has_video": false, 10 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6577212971246682628/", 11 "source": "时尚街拍Dog", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 12 "video_play_count": 0, 13 "image_url": "//p9.pstatp.com/list/300x170/pgc-image/1531376421040010f39e595", 14 "group_id": "6577212971246682628", "is_related": true, "media_url": "/c/user/5441627343/"}, 15 {"comments_count": 36, "media_avatar_url": "//p6.pstatp.com/large/382f0005b0e7dbc47d8d", 16 "is_feed_ad": false, "is_diversion_page": false, "title": "北京街拍,都是乱穿衣的时候,怎么好看就怎么穿", 17 "single_mode": true, "gallary_image_count": 10, "middle_mode": false, "has_video": false, 18 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6562767784663581191/", 19 "source": "海玲时尚", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 20 "video_play_count": 0, 21 "image_url": "//p1.pstatp.com/list/300x170/pgc-image/1528013395598fac4c4efe1", 22 "group_id": "6562767784663581191", "is_related": true, "media_url": "/c/user/58444595361/"}, 23 {"comments_count": 9, "media_avatar_url": "//p3.pstatp.com/large/8b6000041e42267916a3", 24 "is_feed_ad": false, "is_diversion_page": false, "title": "街拍路人,高贵洋气的潮流穿搭参考,让你展现高贵女神气质", 25 "single_mode": true, "gallary_image_count": 7, "middle_mode": false, "has_video": false, 26 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6570846557128622600/", 27 "source": "时尚街拍Dog", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 28 "video_play_count": 0, 29 "image_url": "//p3.pstatp.com/list/300x170/pgc-image/1529894002540131cde7818", 30 "group_id": "6570846557128622600", "is_related": true, "media_url": "/c/user/5441627343/"}, 31 {"comments_count": 16, "media_avatar_url": "//p1.pstatp.com/large/6c310002c52d08feb562", 32 "is_feed_ad": false, "is_diversion_page": false, "title": "街拍路人,时尚又洋气的穿搭参考,让你气场变大气质飙升", 33 "single_mode": true, "gallary_image_count": 7, "middle_mode": false, "has_video": false, 34 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6570524966184288776/", 35 "source": "六六大顺1286", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 36 "video_play_count": 0, 37 "image_url": "//p3.pstatp.com/list/300x170/pgc-image/152981831396458c08bc0c3", 38 "group_id": "6570524966184288776", "is_related": true, "media_url": "/c/user/81174905516/"}, 39 {"comments_count": 8, "media_avatar_url": "//p1.pstatp.com/large/6c310002c52d08feb562", 40 "is_feed_ad": false, "is_diversion_page": false, "title": "街拍路人,时尚又减龄的穿搭参考,让你看起来至少年轻好几岁", 41 "single_mode": true, "gallary_image_count": 8, "middle_mode": false, "has_video": false, 42 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6566070892542034445/", 43 "source": "六六大顺1286", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 44 "video_play_count": 0, 45 "image_url": "//p1.pstatp.com/list/300x170/pgc-image/1528782064341c24abc274f", 46 "group_id": "6566070892542034445", "is_related": true, "media_url": "/c/user/81174905516/"}, 47 {"comments_count": 15, "media_avatar_url": "//p3.pstatp.com/large/6eed0004f9299624bf43", 48 "is_feed_ad": false, "is_diversion_page": false, "title": "路人街拍,美如花开的时尚穿搭参考,让你美如鲜花盛开!", 49 "single_mode": true, "gallary_image_count": 5, "middle_mode": false, "has_video": false, 50 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6576006257222615556/", 51 "source": "天天美女图", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 52 "video_play_count": 0, 53 "image_url": "//p9.pstatp.com/list/300x170/pgc-image/1531095687103b57abfdf57", 54 "group_id": "6576006257222615556", "is_related": true, "media_url": "/c/user/98918905833/"}, 55 {"comments_count": 12, "media_avatar_url": "//p1.pstatp.com/large/6c310002c52d08feb562", 56 "is_feed_ad": false, "is_diversion_page": false, "title": "街拍路人,时下最新潮的穿搭参考,让你穿出超越女神的气质", 57 "single_mode": true, "gallary_image_count": 7, "middle_mode": false, "has_video": false, 58 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6577224195824943620/", 59 "source": "六六大顺1286", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 60 "video_play_count": 0, 61 "image_url": "//p3.pstatp.com/list/300x170/pgc-image/1531378675945f7e5f3dc4e", 62 "group_id": "6577224195824943620", "is_related": true, "media_url": "/c/user/81174905516/"}, 63 {"comments_count": 23, "media_avatar_url": "//p6.pstatp.com/large/382f0005b0e7dbc47d8d", 64 "is_feed_ad": false, "is_diversion_page": false, "title": "北京街拍,不对称西服外套与白衬衣的叠穿,更显层次感", 65 "single_mode": true, "gallary_image_count": 10, "middle_mode": false, "has_video": false, 66 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6552352941250970126/", 67 "source": "海玲时尚", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 68 "video_play_count": 0, 69 "image_url": "//p3.pstatp.com/list/300x170/pgc-image/1525588437307f582c869c9", 70 "group_id": "6552352941250970126", "is_related": true, "media_url": "/c/user/58444595361/"}, 71 {"comments_count": 8, "media_avatar_url": "//p1.pstatp.com/large/8b610003fea5104fa804", 72 "is_feed_ad": false, "is_diversion_page": false, "title": "街拍路人,黑色T永不过时的穿搭参考,让你穿出迷人青春范", 73 "single_mode": true, "gallary_image_count": 7, "middle_mode": false, "has_video": false, 74 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6572015578561643012/", 75 "source": "每日分享社", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 76 "video_play_count": 0, 77 "image_url": "//p9.pstatp.com/list/300x170/pgc-image/1530166166448957eb30a67", 78 "group_id": "6572015578561643012", "is_related": true, "media_url": "/c/user/52415621433/"}, 79 {"comments_count": 14, "media_avatar_url": "//p3.pstatp.com/large/6eed0004f5928763adad", 80 "is_feed_ad": false, "is_diversion_page": false, "title": "路人街拍,时尚大气的休闲穿搭参考,让你够酷,够美,够大气!", 81 "single_mode": true, "gallary_image_count": 6, "middle_mode": false, "has_video": false, 82 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6575640177157341699/", 83 "source": "天天美女照", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 84 "video_play_count": 0, 85 "image_url": "//p9.pstatp.com/list/300x170/pgc-image/1531010389181b3166e603a", 86 "group_id": "6575640177157341699", "is_related": true, "media_url": "/c/user/6686213364/"}, 87 {"comments_count": 42, "media_avatar_url": "//p3.pstatp.com/large/6eed0002747fdb857784", 88 "is_feed_ad": false, "is_diversion_page": false, "title": "街拍北京:个子高挑,衣品时尚,搭配潮流,长得好看!", 89 "single_mode": true, "gallary_image_count": 6, "middle_mode": false, "has_video": false, 90 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6581196161003029000/", 91 "source": "时尚好看19", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 92 "video_play_count": 0, 93 "image_url": "//p1.pstatp.com/list/300x170/pgc-image/1532304059555dc3da79df0", 94 "group_id": "6581196161003029000", "is_related": true, "media_url": "/c/user/98512844552/"}, 95 {"comments_count": 7, "media_avatar_url": "//p3.pstatp.com/large/5e7c0000cc291f5e42d3", 96 "is_feed_ad": false, "is_diversion_page": false, "title": "路人街拍:约会简约搭配方式,纯色连衣裙搭配平底尖脚鞋气质出众", 97 "single_mode": true, "gallary_image_count": 7, "middle_mode": false, "has_video": false, 98 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6577348572038038019/", 99 "source": "Fashion第六感", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 100 "video_play_count": 0, 101 "image_url": "//p3.pstatp.com/list/300x170/pgc-image/1531408080685595da561c6", 102 "group_id": "6577348572038038019", "is_related": true, "media_url": "/c/user/6236329656/"}, 103 {"comments_count": 17, "media_avatar_url": "//p3.pstatp.com/large/6eed0004f9299624bf43", 104 "is_feed_ad": false, "is_diversion_page": false, "title": "路人街拍,真心养眼的时尚穿搭参考,让你穿的好看,美的养眼!", 105 "single_mode": true, "gallary_image_count": 5, "middle_mode": false, "has_video": false, 106 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6575811480208278030/", 107 "source": "天天美女图", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 108 "video_play_count": 0, 109 "image_url": "//p3.pstatp.com/list/300x170/pgc-image/1531050304667eb82ae53fb", 110 "group_id": "6575811480208278030", "is_related": true, "media_url": "/c/user/98918905833/"}, 111 {"comments_count": 2, "media_avatar_url": "//p3.pstatp.com/large/6eed0004f5928763adad", 112 "is_feed_ad": false, "is_diversion_page": false, "title": "路人街拍,一身优雅的穿搭,穿出女人端庄的气质", 113 "single_mode": true, "gallary_image_count": 6, "middle_mode": false, "has_video": false, 114 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6579159866898645507/", 115 "source": "天天美女照", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 116 "video_play_count": 0, 117 "image_url": "//p3.pstatp.com/list/300x170/pgc-image/1531829948291cec7f1e419", 118 "group_id": "6579159866898645507", "is_related": true, "media_url": "/c/user/6686213364/"}, 119 {"comments_count": 2, "media_avatar_url": "//p3.pstatp.com/large/6eed0004f9299624bf43", 120 "is_feed_ad": false, "is_diversion_page": false, "title": "路人街拍,尽显优雅绝伦的时尚穿搭参考,让你美的令人一见倾心", 121 "single_mode": true, "gallary_image_count": 5, "middle_mode": false, "has_video": false, 122 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6575441122204582404/", 123 "source": "天天美女图", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 124 "video_play_count": 0, 125 "image_url": "//p1.pstatp.com/list/300x170/pgc-image/1530964112002b59991e98e", 126 "group_id": "6575441122204582404", "is_related": true, "media_url": "/c/user/98918905833/"}, 127 {"comments_count": 9, "media_avatar_url": "//p1.pstatp.com/large/888e0001ca2d8afc54d4", 128 "is_feed_ad": false, "is_diversion_page": false, "title": "街拍,休闲+减龄的气质女生夏天穿衣搭配,日常穿搭秒杀路人", 129 "single_mode": true, "gallary_image_count": 5, "middle_mode": false, "has_video": false, 130 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6579356829992616455/", 131 "source": "街拍美女图", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 132 "video_play_count": 0, 133 "image_url": "//p9.pstatp.com/list/300x170/pgc-image/1531875794891cbda4529a6", 134 "group_id": "6579356829992616455", "is_related": true, "media_url": "/c/user/98867532852/"}, 135 {"comments_count": 32, "media_avatar_url": "//p3.pstatp.com/large/6eea0002dbb5ffffa1f1", 136 "is_feed_ad": false, "is_diversion_page": false, "title": "女生街拍,黄金比例闺蜜,穿黑色凉鞋气质真好!", 137 "single_mode": true, "gallary_image_count": 10, "middle_mode": false, "has_video": false, 138 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6580886941489693191/", 139 "source": "kk潮品街拍", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 140 "video_play_count": 0, 141 "image_url": "//p3.pstatp.com/list/300x170/pgc-image/15322320709553059d33c7c", 142 "group_id": "6580886941489693191", "is_related": true, "media_url": "/c/user/98013496587/"}, 143 {"comments_count": 22, "media_avatar_url": "//p3.pstatp.com/large/8b61000302495b74702e", 144 "is_feed_ad": false, "is_diversion_page": false, "title": "路人街拍,年轻就是本钱,穿什么都充满时尚美!", 145 "single_mode": true, "gallary_image_count": 5, "middle_mode": false, "has_video": false, 146 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6577151772521923086/", 147 "source": "天天街拍图", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 148 "video_play_count": 0, 149 "image_url": "//p9.pstatp.com/list/300x170/pgc-image/1531362350533dbf5878e98", 150 "group_id": "6577151772521923086", "is_related": true, "media_url": "/c/user/100250154069/"}, 151 {"comments_count": 7, "media_avatar_url": "//p3.pstatp.com/large/6eed0004f9299624bf43", 152 "is_feed_ad": false, "is_diversion_page": false, "title": "路人街拍,女人要会穿才显漂亮,夏季这样穿搭让你尽显迷人气质美", 153 "single_mode": true, "gallary_image_count": 5, "middle_mode": false, "has_video": false, 154 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6578614959142339075/", 155 "source": "天天美女图", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 156 "video_play_count": 0, 157 "image_url": "//p3.pstatp.com/list/300x170/pgc-image/1531702883449de4a8be734", 158 "group_id": "6578614959142339075", "is_related": true, "media_url": "/c/user/98918905833/"}, 159 {"comments_count": 7, "media_avatar_url": "//p3.pstatp.com/large/6eed0004f5928763adad", 160 "is_feed_ad": false, "is_diversion_page": false, "title": "路人街拍,好身材也要会穿搭,这样穿让你气质迷人", 161 "single_mode": true, "gallary_image_count": 5, "middle_mode": false, "has_video": false, 162 "video_duration_str": null, "source_url": "https://www.toutiao.com/group/6575273365118910983/", 163 "source": "天天美女照", "more_mode": null, "article_genre": "gallery", "has_gallery": false, 164 "video_play_count": 0, 165 "image_url": "//p1.pstatp.com/list/300x170/pgc-image/153092495402580bddfcc1d", 166 "group_id": "6575273365118910983", "is_related": true, "media_url": "/c/user/6686213364/"}], 167 publish_time: '2018-07-25 08:55:51', 168 group_id: '6581952133069799949', 169 item_id: '6581952133069799949', 170 share_url: 'https://m.toutiao.com/group/6581952133069799949/', 171 abstract: ''.replace( / < br \ / > / ig, ''), 172 repin: 0 173 }
def main():
html = get_page_index(0,'街拍')
# print(html)
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
{ "count":20, "action_label":"click_search", "return_count":20, "has_more":1, "page_id":"/search/", "request_id":"20180725214120172016032036766212", "cur_tab":1, "tokens":[ "街拍" ], "tab":{ "tab_list":[ { "tab_name":"综合", "tab_id":1, "tab_code":"news" }, { "tab_name":"视频", "tab_id":2, "tab_code":"video" }, { "tab_name":"图集", "tab_id":3, "tab_code":"gallery" }, { "tab_name":"用户", "tab_id":4, "tab_code":"pgc" }, { "tab_name":"问答", "tab_id":5, "tab_code":"wenda" } ], "cur_tab":1 }, "offset":20, "action_label_web":"click_search", "show_tabs":1, "data":[ { "merge_user":[ { "screen_name":"她街拍", "verified_content":"", "media_id":"1583556350618637", "description":"全国时尚女性的聚集地。", "user_id":"75166641448", "gender":"2", "follow_count":50336, "user_verified":"0", "user_type":"1", "is_pgc":1, "user_auth_info":{ "auth_type":2, "auth_info":"四川数赢信息技术有限公司官方头条号" }, "avatar_url":"http://p3.pstatp.com/medium/83500012b978513e79a4", "create_time":"1510196395", "user_decoration":{ }, "highlight":{ "name":[ [ 1, 2 ] ] }, "source_url":"http://www.toutiao.com/c/user/75166641448/", "verify_content":"四川数赢信息技术有限公司官方头条号", "id":"75166641448", "name":"她街拍" }, { "screen_name":"街拍滚叔", "verified_content":"", "media_id":"5909205287", "description":"分享每日杭州街拍及全球时尚资讯。", "user_id":"5909205287", "gender":"1", "follow_count":284367, "user_verified":"0", "user_type":"1", "is_pgc":1, "user_auth_info":{ "auth_type":"0", "auth_info":"时尚达人" }, "avatar_url":"http://p3.pstatp.com/medium/12236/4694012685", "create_time":"1452827046", "user_decoration":{ }, "highlight":{ "name":[ [ 0, 2 ] ] }, "source_url":"http://www.toutiao.com/c/user/5909205287/", "verify_content":"时尚达人", "id":"5909205287", "name":"街拍滚叔" }, { "screen_name":"暴走街拍", "verified_content":"", "media_id":"5826291222", "description":"暴走街拍主要以采访高颜值对象为主,风格青春向上,话题有趣贴近生活。", "user_id":"5826291222", "gender":"0", "follow_count":3276997, "user_verified":"0", "user_type":"1", "is_pgc":1, "user_auth_info":{ "auth_type":"0", "auth_info":"搞笑自媒体" }, "avatar_url":"http://p1.pstatp.com/medium/10687/2312895944", "create_time":"1450370560", "user_decoration":{ }, "highlight":{ "name":[ [ 2, 2 ] ] }, "source_url":"http://www.toutiao.com/c/user/5826291222/", "verify_content":"搞笑自媒体", "id":"5826291222", "name":"暴走街拍" }, { "screen_name":"皇城根五爷原创街拍", "verified_content":"", "media_id":"6682998606", "description":"人像捉影 人文纪实 旅游风光 徐飞原创街拍", "user_id":"6685177416", "gender":"1", "follow_count":26649, "user_verified":"0", "user_type":"1", "is_pgc":1, "user_auth_info":{ "auth_type":"0", "auth_info":"街拍达人" }, "avatar_url":"http://p3.pstatp.com/medium/6cb000fd8de5eec5814", "create_time":"1465346690", "user_decoration":{ }, "highlight":{ "name":[ [ 7, 2 ] ] }, "source_url":"http://www.toutiao.com/c/user/6685177416/", "verify_content":"街拍达人", "id":"6685177416", "name":"皇城根五爷原创街拍" }, { "screen_name":"3A街拍", "verified_content":"", "media_id":"1570911765335041", "description":"", "user_id":"62376452948", "gender":"2", "follow_count":38868, "no_display_pgc_icon":"0", "user_type":"1", "is_pgc":1, "user_auth_info":{ "auth_type":"0", "auth_info":"摄影达人" }, "avatar_url":"http://p1.pstatp.com/medium/289a001a1b2868d356ea", "create_time":"1498137829", "user_decoration":{ }, "highlight":{ "name":[ [ 2, 2 ] ] }, "source_url":"http://www.toutiao.com/c/user/62376452948/", "verify_content":"摄影达人", "id":"62376452948", "user_verified":"0", "name":"3A街拍" }, { "screen_name":"粤B街拍", "verified_content":"", "media_id":"6212033896", "description":"大帅比和小美腻の聚集地。", "user_id":"6203908847", "gender":"0", "follow_count":127757, "user_verified":"0", "user_type":"1", "is_pgc":1, "user_auth_info":{ "auth_type":"0", "other_auth":{ "pgc":"头条摄影原创作者" }, "auth_info":"头条摄影原创作者" }, "avatar_url":"http://p3.pstatp.com/medium/2b7002107206ebc4a7e", "create_time":"1459130707", "user_decoration":{ }, "highlight":{ "name":[ [ 2, 2 ] ] }, "source_url":"http://www.toutiao.com/c/user/6203908847/", "verify_content":"头条摄影原创作者", "id":"6203908847", "name":"粤B街拍" }, { "screen_name":"街拍潮流", "media_id":"6933588826", "description":"推送最新的街拍,引领时尚潮流!", "user_id":"6933678811", "gender":"0", "follow_count":13881, "no_display_pgc_icon":"0", "user_type":"1", "is_pgc":1, "verified_content":"", "avatar_url":"http://p1.pstatp.com/medium/97e000cd69a309bbb59", "create_time":"1468561349", "user_decoration":{ }, "highlight":{ "name":[ [ 0, 2 ] ] }, "source_url":"http://www.toutiao.com/c/user/6933678811/", "id":"6933678811", "user_verified":"0", "name":"街拍潮流" }, { "screen_name":"街拍天下", "media_id":"51026951312", "description":"资深街拍,专注街拍,分享街拍之美!", "user_id":"50965704962", "gender":"1", "follow_count":17097, "user_verified":"0", "user_type":"1", "is_pgc":1, "verified_content":"", "avatar_url":"http://p1.pstatp.com/medium/e580006e8cd68515a95", "create_time":"1474249162", "user_decoration":{ }, "highlight":{ "name":[ [ 0, 2 ] ] }, "source_url":"http://www.toutiao.com/c/user/50965704962/", "id":"50965704962", "name":"街拍天下" }, { "screen_name":"街拍美女", "media_id":"50015024950", "description":"爱街拍,展现时尚自然美!", "user_id":"50018626654", "gender":"0", "follow_count":31361, "user_verified":"0", "user_type":"1", "is_pgc":1, "verified_content":"", "avatar_url":"http://p3.pstatp.com/medium/97e0016cb071b0c0037", "create_time":"1470016231", "user_decoration":{ }, "highlight":{ "name":[ [ 0, 2 ] ] }, "source_url":"http://www.toutiao.com/c/user/50018626654/", "id":"50018626654", "name":"街拍美女" }, { "screen_name":"街拍福利", "media_id":"50020881456", "description":"把每日的所见所闻,街拍分享给大家。", "user_id":"50020731766", "gender":"0", "follow_count":28449, "user_verified":"0", "user_type":"1", "is_pgc":1, "verified_content":"", "avatar_url":"http://p1.pstatp.com/medium/97e001712c15b762881", "create_time":"1470041090", "user_decoration":{ }, "highlight":{ "name":[ [ 0, 2 ] ] }, "source_url":"http://www.toutiao.com/c/user/50020731766/", "id":"50020731766", "name":"街拍福利" } ], "cell_type":58, "id":"75166641448", "keyword":"街拍" }, { "cell_type":26, "key_info":{ "keyword":"街拍" }, "keyinfo":{ "keyword":"街拍" }, "display":{ "hits":[ { "video_url":"https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200fbd0000bcbi802iv570552f3phg&line=0&app_id=13", "title":"重庆街拍,最新的小仙女合集来了,双击支持下❤️~", "detail_schema":"sslocal://awemevideo?group_id=6563754566444125447&group_source=19&item_id=6563754566444125447&request_id=1532526080.86&log_pb=%7B%22impr_id%22%3A%221532526080.86%22%7D&gd_ext_json=%7B%22impr_id%22%3A%221532526080.86%22%7D&category_name=__search__&load_more=7&keyword=%E8%A1%97%E6%8B%8D&size=10&offset=0&from_req_id=20180725214120172016032036766212", "digg_count":7376, "large_thumbnail_url":"http://sf6-ttcdn-tos.pstatp.com/img/mosaic-legacy/8abd00042f56be143308~375x375.jpeg", "play_count":303884, "thumbnail_url":"http://sf6-ttcdn-tos.pstatp.com/img/mosaic-legacy/8abd00042f56be143308~240x240.jpeg", "group_id":"6563754566444125447" }, { "video_url":"https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200fd30000bbnrni8ckqbvir0trn40&line=0&app_id=13", "title":"街拍", "detail_schema":"sslocal://awemevideo?group_id=6552662565971823876&group_source=19&item_id=6552662565971823876&request_id=1532526080.86&log_pb=%7B%22impr_id%22%3A%221532526080.86%22%7D&gd_ext_json=%7B%22impr_id%22%3A%221532526080.86%22%7D&category_name=__search__&load_more=7&keyword=%E8%A1%97%E6%8B%8D&size=10&offset=1&from_req_id=20180725214120172016032036766212", "digg_count":2660, "large_thumbnail_url":"http://sf6-ttcdn-tos.pstatp.com/img/mosaic-legacy/815f0004cf3441b51aaa~375x375.jpeg", "play_count":144648, "thumbnail_url":"http://sf6-ttcdn-tos.pstatp.com/img/mosaic-legacy/815f0004cf3441b51aaa~240x240.jpeg", "group_id":"6552662565971823876" }, { "video_url":"https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200fbd0000bc3d9q4thbi90j746ctg&line=0&app_id=13", "title":"重庆街拍,小伙伴们睡前养养眼,明早起来希望看到各位的小心心❤️❤️ 晚安😴", "detail_schema":"sslocal://awemevideo?group_id=6559164001383615757&group_source=19&item_id=6559164001383615757&request_id=1532526080.86&log_pb=%7B%22impr_id%22%3A%221532526080.86%22%7D&gd_ext_json=%7B%22impr_id%22%3A%221532526080.86%22%7D&category_name=__search__&load_more=7&keyword=%E8%A1%97%E6%8B%8D&size=10&offset=2&from_req_id=20180725214120172016032036766212", "digg_count":501, "large_thumbnail_url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/87060010d428daf6007b~375x375.jpeg", "play_count":21221, "thumbnail_url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/87060010d428daf6007b~240x240.jpeg", "group_id":"6559164001383615757" }, { "video_url":"https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200ff50000bcj70e2mac2us6qr9ntg&line=0&app_id=13", "title":"重庆街拍,感觉这期街拍小仙女的腿,比我的胳膊还细,这可咋整?@抖音小助手", "detail_schema":"sslocal://awemevideo?group_id=6568060494089817348&group_source=19&item_id=6568060494089817348&request_id=1532526080.86&log_pb=%7B%22impr_id%22%3A%221532526080.86%22%7D&gd_ext_json=%7B%22impr_id%22%3A%221532526080.86%22%7D&category_name=__search__&load_more=7&keyword=%E8%A1%97%E6%8B%8D&size=10&offset=3&from_req_id=20180725214120172016032036766212", "digg_count":773, "large_thumbnail_url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/8f53000bf7768bb6154b~375x375.jpeg", "play_count":58644, "thumbnail_url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/8f53000bf7768bb6154b~240x240.jpeg", "group_id":"6568060494089817348" }, { "video_url":"https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200f450000bbtgee3rh3pfnk78m7vg&line=0&app_id=13", "title":"街拍51期", "detail_schema":"sslocal://awemevideo?group_id=6555841644409654541&group_source=19&item_id=6555841644409654541&request_id=1532526080.86&log_pb=%7B%22impr_id%22%3A%221532526080.86%22%7D&gd_ext_json=%7B%22impr_id%22%3A%221532526080.86%22%7D&category_name=__search__&load_more=7&keyword=%E8%A1%97%E6%8B%8D&size=10&offset=4&from_req_id=20180725214120172016032036766212", "digg_count":119, "large_thumbnail_url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/8422000e582f9b77e8e7~375x375.jpeg", "play_count":5288, "thumbnail_url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/8422000e582f9b77e8e7~240x240.jpeg", "group_id":"6555841644409654541" }, { "video_url":"https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200f190000bbu2c5d9688r6fua5opg&line=0&app_id=13", "title":"重庆街拍 ,小伙伴们了解并用小心心支持下❤️❤️❤️", "detail_schema":"sslocal://awemevideo?group_id=6556157032070647047&group_source=19&item_id=6556157032070647047&request_id=1532526080.86&log_pb=%7B%22impr_id%22%3A%221532526080.86%22%7D&gd_ext_json=%7B%22impr_id%22%3A%221532526080.86%22%7D&category_name=__search__&load_more=7&keyword=%E8%A1%97%E6%8B%8D&size=10&offset=5&from_req_id=20180725214120172016032036766212", "digg_count":2436, "large_thumbnail_url":"http://sf6-ttcdn-tos.pstatp.com/img/mosaic-legacy/845200006b91ba06b2fd~375x375.jpeg", "play_count":110408, "thumbnail_url":"http://sf6-ttcdn-tos.pstatp.com/img/mosaic-legacy/845200006b91ba06b2fd~240x240.jpeg", "group_id":"6556157032070647047" }, { "video_url":"https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200ff00000bbleuoniv420lsq92ahg&line=0&app_id=13", "title":"成都街拍", "detail_schema":"sslocal://awemevideo?group_id=6551311814016109831&group_source=19&item_id=6551311814016109831&request_id=1532526080.86&log_pb=%7B%22impr_id%22%3A%221532526080.86%22%7D&gd_ext_json=%7B%22impr_id%22%3A%221532526080.86%22%7D&category_name=__search__&load_more=7&keyword=%E8%A1%97%E6%8B%8D&size=10&offset=6&from_req_id=20180725214120172016032036766212", "digg_count":1110, "large_thumbnail_url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/800100137382ae577717~375x375.jpeg", "play_count":89039, "thumbnail_url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/800100137382ae577717~240x240.jpeg", "group_id":"6551311814016109831" }, { "video_url":"https://aweme.snssdk.com/aweme/v1/play/?video_id=56a08b51ce6f4c749450f4a5bb589c58&line=0&app_id=13", "title":"北京街拍", "detail_schema":"sslocal://awemevideo?group_id=6550081176025959694&group_source=19&item_id=6550081176025959694&request_id=1532526080.86&log_pb=%7B%22impr_id%22%3A%221532526080.86%22%7D&gd_ext_json=%7B%22impr_id%22%3A%221532526080.86%22%7D&category_name=__search__&load_more=7&keyword=%E8%A1%97%E6%8B%8D&size=10&offset=7&from_req_id=20180725214120172016032036766212", "digg_count":3478, "large_thumbnail_url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/7f300009943b81aac2c4~375x375.jpeg", "play_count":284760, "thumbnail_url":"http://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/7f300009943b81aac2c4~240x240.jpeg", "group_id":"6550081176025959694" }, { "video_url":"https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200ff00000bbte5152v325q7m38f30&line=0&app_id=13", "title":"2016年的哈尔滨街拍", "detail_schema":"sslocal://awemevideo?group_id=6555801264217656579&group_source=19&item_id=6555801264217656579&request_id=1532526080.86&log_pb=%7B%22impr_id%22%3A%221532526080.86%22%7D&gd_ext_json=%7B%22impr_id%22%3A%221532526080.86%22%7D&category_name=__search__&load_more=7&keyword=%E8%A1%97%E6%8B%8D&size=10&offset=8&from_req_id=20180725214120172016032036766212", "digg_count":5302, "large_thumbnail_url":"http://sf6-ttcdn-tos.pstatp.com/img/mosaic-legacy/841a000e7b7024ea99bf~375x375.jpeg", "play_count":286113, "thumbnail_url":"http://sf6-ttcdn-tos.pstatp.com/img/mosaic-legacy/841a000e7b7024ea99bf~240x240.jpeg", "group_id":"6555801264217656579" }, { "video_url":"https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200ff70000bc71sb6gnco3genbr5jg&line=0&app_id=13", "title":"爱笑的女生都 都 都好漂亮!穿搭也是非常好看!第6个漂亮的小姐姐@SEVEN @抖音小助手", "detail_schema":"sslocal://awemevideo?group_id=6561214882266483971&group_source=19&item_id=6561214882266483971&request_id=1532526080.86&log_pb=%7B%22impr_id%22%3A%221532526080.86%22%7D&gd_ext_json=%7B%22impr_id%22%3A%221532526080.86%22%7D&category_name=__search__&load_more=7&keyword=%E8%A1%97%E6%8B%8D&size=10&offset=9&from_req_id=20180725214120172016032036766212", "digg_count":8, "large_thumbnail_url":"http://sf6-ttcdn-tos.pstatp.com/img/mosaic-legacy/88ef000313839927b43a~375x375.jpeg", "play_count":162, "thumbnail_url":"http://sf6-ttcdn-tos.pstatp.com/img/mosaic-legacy/88ef000313839927b43a~240x240.jpeg", "group_id":"6561214882266483971" } ], "abtest":-1, "fromIndex":0, "headers":{ }, "statusCodeValue":200, "hitCount":10, "query":"街拍", "total":39596, "statusCode":"OK" }, "tokens":[ "街拍" ], "id_str":"3991405962", "ala_src":"hotsoon_video", "id":3991405962 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6581952133069799949%2C%22source%22%3A%22%E5%A4%A9%E5%A4%A9%E7%BE%8E%E5%A5%B3%E5%9B%BE%22%7D&gd_label=click_search&groupid=6581952133069799949&item_id=6581952133069799949", "media_name":"天天美女图", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1601401729340423/", "item_source_url":"/group/6581952133069799949/", "labels":[ ], "image_list":[ { "url":"//p3.pstatp.com/list/pgc-image/15324800265505b953ab972" }, { "url":"//p3.pstatp.com/list/pgc-image/1532480004156480c21a63e" }, { "url":"//p1.pstatp.com/list/pgc-image/1532480016958bdc65dea62" }, { "url":"//p3.pstatp.com/list/pgc-image/15324800362354f9d1c3ec1" } ], "media_avatar_url":"//p3.pstatp.com/medium/6eed0004f9299624bf43", "datetime":"2018-07-25 08:55:51", "more_mode":true, "create_time":"1532480151", "has_gallery":true, "id":6581952133069799949, "user_id":98918905833, "title":"路人街拍,个子不高,穿得却很有范,而且时尚潮流", "has_video":false, "share_url":"http://toutiao.com/group/6581952133069799949/", "source":"天天美女图", "comment_count":5, "article_url":"http://toutiao.com/group/6581952133069799949/", "comments_count":5, "large_mode":false, "abstract":"", "large_image_url":"http://p1.pstatp.com/large/pgc-image/15324800265505b953ab972", "display_time":"1532480151", "publish_time":"1532480151", "middle_mode":false, "gallary_image_count":5, "media_creator_id":98918905833, "tag_id":6581952133069799949, "source_url":"/group/6581952133069799949/", "item_id":6581952133069799949, "user_auth_info":{ }, "seo_url":"/group/6581952133069799949/", "keyword":"街拍", "middle_image_url":"http://p1.pstatp.com/list/300x196/pgc-image/15324800265505b953ab972", "behot_time":"1532480151", "tag":"news_fashion", "image_url":"//p1.pstatp.com/list/pgc-image/15324800265505b953ab972", "has_image":true, "highlight":{ "source":[ ], "abstract":[ ], "title":[ [ 2, 2 ] ] }, "group_id":6581952133069799949, "image_count":5 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6581984163740516867%2C%22source%22%3A%22Amy%E6%80%9D%E5%BF%86%22%7D&gd_label=click_search&groupid=6581984163740516867&item_id=6581984163740516867", "media_name":"Amy思忆", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1586397713313806/", "item_source_url":"/group/6581984163740516867/", "labels":[ ], "image_list":[ { "url":"//p1.pstatp.com/list/pgc-image/153248760488808a2aa4065" }, { "url":"//p1.pstatp.com/list/pgc-image/1532487605479d07d1a159a" }, { "url":"//p3.pstatp.com/list/pgc-image/153248760665909c6347378" }, { "url":"//p3.pstatp.com/list/pgc-image/1532487607113f7039f5691" } ], "media_avatar_url":"//p1.pstatp.com/medium/6ee8000083be1a84342b", "datetime":"2018-07-25 11:00:09", "more_mode":true, "create_time":"1532487609", "has_gallery":true, "id":6581984163740516867, "user_id":79961365340, "title":"街拍路人,夏日获得回头率爆表的穿搭参考,让你彻底满足虚荣心", "has_video":false, "share_url":"http://toutiao.com/group/6581984163740516867/", "source":"Amy思忆", "comment_count":2, "article_url":"http://toutiao.com/group/6581984163740516867/", "comments_count":2, "large_mode":false, "abstract":"", "large_image_url":"http://p3.pstatp.com/large/pgc-image/153248760488808a2aa4065", "display_time":"1532487609", "publish_time":"1532487609", "middle_mode":false, "gallary_image_count":7, "media_creator_id":79961365340, "tag_id":6581984163740516867, "source_url":"/group/6581984163740516867/", "item_id":6581984163740516867, "user_auth_info":{ }, "seo_url":"/group/6581984163740516867/", "keyword":"街拍", "middle_image_url":"http://p1.pstatp.com/list/300x196/pgc-image/153248760488808a2aa4065", "behot_time":"1532487609", "tag":"news_fashion", "image_url":"//p1.pstatp.com/list/pgc-image/153248760488808a2aa4065", "has_image":true, "highlight":{ "source":[ ], "abstract":[ ], "title":[ [ 0, 2 ] ] }, "group_id":6581984163740516867, "image_count":7 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6581673508466590221%2C%22source%22%3A%22%E6%97%B6%E5%B0%9A%E5%A5%BD%E7%9C%8B19%22%7D&gd_label=click_search&groupid=6581673508466590221&item_id=6581673508466590221", "media_name":"时尚好看19", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1600606970177550/", "item_source_url":"/group/6581673508466590221/", "labels":[ ], "image_list":[ { "url":"//p3.pstatp.com/list/pgc-image/153241523225325b966de34" }, { "url":"//p3.pstatp.com/list/pgc-image/153241523258783b196104f" }, { "url":"//p1.pstatp.com/list/pgc-image/153241523289997307fc088" }, { "url":"//p3.pstatp.com/list/pgc-image/1532415232452b9e4f09f9b" } ], "media_avatar_url":"//p3.pstatp.com/medium/6eed0002747fdb857784", "datetime":"2018-07-24 14:54:39", "more_mode":true, "create_time":"1532415279", "has_gallery":true, "id":6581673508466590221, "user_id":98512844552, "title":"街拍成都:颜值高,还会穿搭,简直就是倾国倾城!", "has_video":false, "share_url":"http://toutiao.com/group/6581673508466590221/", "source":"时尚好看19", "comment_count":13, "article_url":"http://toutiao.com/group/6581673508466590221/", "comments_count":13, "large_mode":false, "abstract":"", "large_image_url":"http://p1.pstatp.com/large/pgc-image/153241523258783b196104f", "display_time":"1532415279", "publish_time":"1532415279", "middle_mode":false, "gallary_image_count":6, "media_creator_id":98512844552, "tag_id":6581673508466590221, "source_url":"/group/6581673508466590221/", "item_id":6581673508466590221, "user_auth_info":{ }, "seo_url":"/group/6581673508466590221/", "keyword":"街拍", "middle_image_url":"http://p1.pstatp.com/list/300x196/pgc-image/153241523258783b196104f", "behot_time":"1532415279", "tag":"news_photography", "image_url":"//p3.pstatp.com/list/pgc-image/153241523258783b196104f", "has_image":true, "highlight":{ "source":[ ], "abstract":[ ], "title":[ [ 0, 2 ] ] }, "group_id":6581673508466590221, "image_count":6 }, { "cell_type":26, "key_info":{ "keyword":"街拍" }, "keyinfo":{ "keyword":"街拍" }, "display":{ "items":[ { "reason":"美国新生代模特", "name":"gigi hadid", "img":"http://p1.pstatp.com/large/5e3c001cc5114318f04e" }, { "reason":"90后新锐时尚造型师", "name":"颜思诗", "img":"http://p1.pstatp.com/large/5e3d0019e9b77a3b1894" }, { "reason":"艾滋女事件当事人", "name":"闫德利", "img":"http://p1.pstatp.com/large/5e400003edc5a9661321" }, { "reason":"内地新四小花旦之一", "name":"倪妮", "img":"http://p1.pstatp.com/large/5e3700181a5e1b2d1d2d" }, { "reason":"维秘大秀的东方超模", "name":"何穗", "img":"http://p1.pstatp.com/large/5e43000444218771d3b6" }, { "reason":"四大时装周的明星", "name":"nick wooster", "img":"http://p1.pstatp.com/large/5e36001581e3bb2192da" }, { "reason":"米兰时尚博主", "name":"chiara ferragni", "img":"http://p1.pstatp.com/large/5e41000661e67cbab87f" }, { "reason":"90后匈牙利模特演员", "name":"芭芭拉·帕尔文", "img":"http://p1.pstatp.com/large/5e410000605c0acde5b0" }, { "reason":"曾是全球超级名模之一", "name":"米兰达·可儿", "img":"http://p1.pstatp.com/large/5e3c0006a46d74739566" }, { "reason":"最难被忘记初恋女偶像", "name":"林允儿", "img":"http://p1.pstatp.com/large/5e420001e907713d2f36" } ], "rank":11, "title":"街拍-相关人物" }, "tokens":[ "街拍" ], "id_str":"2302784324", "ala_src":"knowledge_graph", "highlight":{ "title":[ [ 0, 2 ] ] }, "id":2302784324 }, { "cell_type":51, "key_info":{ }, "keyinfo":{ }, "display":{ "status":1, "term":"街拍", "search_url":"https://image.toutiao.com/toutiao/search?&term=%E8%A1%97%E6%8B%8D&search_from=toutiaosearch&search_id=20180725190058172018097002588465", "title":"街拍美女紧身裤凹凸 街拍牛仔裤凹凸囧图 -街拍牛仔裤凹凸囧图,街拍... 街拍:30岁少妇绿绿的紧身裙出门,气质十足 街上碰到一人丰满的紧身牛仔裤美女 简约版型设计,显高更帅气,不仅是美丽时尚。上身效果满满的少女感,精细做工品质保障!这是一款卷边的破洞九分牛仔裤,弹力高腰,舒适度大大提升,给人特别热情活泼的感觉,搭配舒适的哈伦裤时尚又尽显潮流气息感,修身版型。 6、街拍:低腰紧身牛仔裤的美女", "total_count":1000000, "abtest":-1, "queryLabel":"", "results":[ { "original_image_url":"http://images.ccoo.cn/bbs/20120514/20120514205648303.jpg", "original_page_url":"http://www.ysjj88.com/c-241410.html", "img":"https://sf6-ttcdn-tos.pstatp.com/img/labis/65343258711ecdab7bc2cd24b1e111f2~640x640.jpeg", "extra":"{"iid":"279560151469578478"}", "text":"街拍美女紧身裤凹凸 街拍牛仔裤凹凸囧图 -街拍牛仔裤凹凸囧图,街拍...", "thumbnail":"https://sf6-ttcdn-tos.pstatp.com/img/labis/65343258711ecdab7bc2cd24b1e111f2~320x320.jpeg", "iid":"279560151469578478", "label":"站外", "width":750, "score":31.80224, "height":1000, "img_url":"https://sf6-ttcdn-tos.pstatp.com/img/labis/65343258711ecdab7bc2cd24b1e111f2~320x320.jpeg", "id":"65343258711ecdab7bc2cd24b1e111f2", "page_url":"https://image.toutiao.com/toutiao/search?&term=%E8%A1%97%E6%8B%8D&search_from=toutiaosearch&search_id=20180725190058172018097002588465&from_img_id=65343258711ecdab7bc2cd24b1e111f2" }, { "original_image_url":"", "original_page_url":"http://www.toutiao.com/a6423347280150397186", "img":"https://p3.pstatp.com/w640/22cc0002516654f4f3dc", "extra":"{"iid":"779598215570475315"}", "text":"街拍:30岁少妇绿绿的紧身裙出门,气质十足", "thumbnail":"https://p3.pstatp.com/w240/22cc0002516654f4f3dc", "iid":"779598215570475315", "label":"", "width":641, "score":28.819574, "height":831, "img_url":"https://p3.pstatp.com/w240/22cc0002516654f4f3dc", "id":"22cc0002516654f4f3dc", "page_url":"https://image.toutiao.com/toutiao/search?&term=%E8%A1%97%E6%8B%8D&search_from=toutiaosearch&search_id=20180725190058172018097002588465&from_img_id=22cc0002516654f4f3dc" }, { "original_image_url":"", "original_page_url":"http://www.toutiao.com/a6439254911418597634", "img":"https://p3.pstatp.com/w640/2c3c0001c2cf46c58105", "extra":"{"iid":"784845092936837603"}", "text":"街上碰到一人丰满的紧身牛仔裤美女", "thumbnail":"https://p3.pstatp.com/w240/2c3c0001c2cf46c58105", "iid":"784845092936837603", "label":"", "width":711, "score":29.577126, "height":1101, "img_url":"https://p3.pstatp.com/w240/2c3c0001c2cf46c58105", "id":"2c3c0001c2cf46c58105", "page_url":"https://image.toutiao.com/toutiao/search?&term=%E8%A1%97%E6%8B%8D&search_from=toutiaosearch&search_id=20180725190058172018097002588465&from_img_id=2c3c0001c2cf46c58105" }, { "original_image_url":"", "original_page_url":"http://www.toutiao.com/a6447399635949486350", "img":"https://p3.pstatp.com/w640/31d500053a0dbb14ad81", "extra":"{"iid":"234994875712793152"}", "text":"简约版型设计,显高更帅气,不仅是美丽时尚。上身效果满满的少女感,精细做工品质保障!这是一款卷边的破洞九分牛仔裤,弹力高腰,舒适度大大提升,给人特别热情活泼的感觉,搭配舒适的哈伦裤时尚又尽显潮流气息感,修身版型。", "thumbnail":"https://p3.pstatp.com/w240/31d500053a0dbb14ad81", "iid":"234994875712793152", "label":"", "width":640, "score":28.132195, "height":1013, "img_url":"https://p3.pstatp.com/w240/31d500053a0dbb14ad81", "id":"31d500053a0dbb14ad81", "page_url":"https://image.toutiao.com/toutiao/search?&term=%E8%A1%97%E6%8B%8D&search_from=toutiaosearch&search_id=20180725190058172018097002588465&from_img_id=31d500053a0dbb14ad81" }, { "original_image_url":"", "original_page_url":"http://www.toutiao.com/a6445786720785383694", "img":"https://p3.pstatp.com/w640/31be00025333f80b55d5", "extra":"{"iid":"181036299931204207"}", "text":"6、街拍:低腰紧身牛仔裤的美女", "thumbnail":"https://p3.pstatp.com/w240/31be00025333f80b55d5", "iid":"181036299931204207", "label":"", "width":960, "score":28.874035, "height":1450, "img_url":"https://p3.pstatp.com/w240/31be00025333f80b55d5", "id":"31be00025333f80b55d5", "page_url":"https://image.toutiao.com/toutiao/search?&term=%E8%A1%97%E6%8B%8D&search_from=toutiaosearch&search_id=20180725190058172018097002588465&from_img_id=31be00025333f80b55d5" } ], "intention":-1, "queryLabelVector":null, "queryLabelID":-1, "message":"" }, "tokens":[ "街拍" ], "id_str":"1914010784", "ala_src":"image", "id":1914010784 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6581917968358179336%2C%22source%22%3A%22%E6%9A%97%E6%81%8B%E6%9C%AA%E9%81%82%E5%BF%83%E4%B8%8D%E7%94%98%22%7D&gd_label=click_search&groupid=6581917968358179336&item_id=6581917968358179336", "media_name":"暗恋未遂心不甘", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1602709709575171/", "item_source_url":"/group/6581917968358179336/", "labels":[ ], "image_list":[ { "url":"//p1.pstatp.com/list/pgc-image/15324720535779fbcdee28c" }, { "url":"//p9.pstatp.com/list/pgc-image/15324720535889fd8588c45" }, { "url":"//p1.pstatp.com/list/pgc-image/1532472053613aba86fa408" }, { "url":"//p1.pstatp.com/list/pgc-image/153247205361498fd9ed76e" } ], "media_avatar_url":"//p1.pstatp.com/medium/888d000408e81609a1d9", "datetime":"2018-07-25 06:43:17", "more_mode":true, "create_time":"1532472197", "has_gallery":true, "id":6581917968358179336, "user_id":99760023327, "title":"街拍!颜色的夏季!但也有亮丽的风景!", "has_video":false, "share_url":"http://toutiao.com/group/6581917968358179336/", "source":"暗恋未遂心不甘", "comment_count":22, "article_url":"http://toutiao.com/group/6581917968358179336/", "comments_count":22, "large_mode":false, "abstract":"", "large_image_url":"http://p9.pstatp.com/large/pgc-image/15324720535779fbcdee28c", "display_time":"1532472197", "publish_time":"1532472197", "middle_mode":false, "gallary_image_count":8, "media_creator_id":99760023327, "tag_id":6581917968358179336, "source_url":"/group/6581917968358179336/", "item_id":6581917968358179336, "user_auth_info":{ }, "seo_url":"/group/6581917968358179336/", "keyword":"街拍", "middle_image_url":"http://p3.pstatp.com/list/300x196/pgc-image/15324720535779fbcdee28c", "behot_time":"1532472197", "tag":"news_photography", "image_url":"//p3.pstatp.com/list/pgc-image/15324720535779fbcdee28c", "has_image":true, "highlight":{ "source":[ ], "abstract":[ ], "title":[ [ 0, 2 ] ] }, "group_id":6581917968358179336, "image_count":8 }, { "cell_type":26, "key_info":{ "keyword":"街拍" }, "keyinfo":{ "keyword":"街拍" }, "display":{ "items":[ { "reason":"治丝的妇女", "name":"丝妇", "img":"http://p1.pstatp.com/large/5e3f0007808fb3fd0c16" }, { "reason":"臀部向下后腿支撑身体", "name":"蹲姿", "img":"http://p1.pstatp.com/large/5e370017d309b83397b4" }, { "reason":"成为真人玩偶", "name":"橡胶衣", "img":"http://p1.pstatp.com/large/5e3e001afbdd06924b76" }, { "reason":"有实地察看之意", "name":"踩踏", "img":"http://p1.pstatp.com/large/5e3e00173747021aa4cc" }, { "reason":"中国旅游协会主办刊物", "name":"时尚", "img":"http://p1.pstatp.com/large/5e4100005a3e52e846e8" }, { "reason":"款式新时代感强的服装", "name":"时装", "img":"http://p1.pstatp.com/large/5e38000836d826ff2113" } ], "rank":12, "title":"街拍-相关词汇" }, "tokens":[ "街拍" ], "id_str":"4126479797", "ala_src":"knowledge_graph", "highlight":{ "title":[ [ 0, 2 ] ] }, "id":4126479797 }, { "cell_type":20, "queries":[ { "url":"/search/keyword=%E8%A1%97%E6%8B%8D%E4%BD%8E%E8%85%B0%E8%A3%A4", "text":"街拍低腰裤" }, { "url":"/search/keyword=%E4%B8%9D%E8%A2%9C%E7%BE%8E%E8%85%BF%E8%A1%97%E6%8B%8D", "text":"丝袜美腿街拍" }, { "url":"/search/keyword=%E8%A1%97%E6%8B%8D%E4%B8%80%E6%AD%A5%E8%A3%99", "text":"街拍一步裙" }, { "url":"/search/keyword=%E8%A1%97%E6%8B%8D%E7%86%9F%E4%B8%9D", "text":"街拍熟丝" }, { "url":"/search/keyword=%E6%80%A7%E6%84%9F%E7%BE%8E%E5%A5%B3%E8%A1%97%E6%8B%8D", "text":"性感美女街拍" }, { "url":"/search/keyword=%E5%A4%8F%E5%AD%A3%E8%A1%97%E6%8B%8D", "text":"夏季街拍" }, { "url":"/search/keyword=%E8%A1%97%E6%8B%8D+%E8%87%80", "text":"街拍 臀" }, { "url":"/search/keyword=%E4%B8%89%E9%87%8C%E5%B1%AF%E8%A1%97%E6%8B%8D", "text":"三里屯街拍" }, { "url":"/search/keyword=%E8%A1%97%E6%8B%8D%E7%94%B7%E5%A4%8F%E5%AD%A3", "text":"街拍男夏季" }, { "url":"/search/keyword=%E6%88%90%E9%83%BD%E8%A1%97%E6%8B%8D", "text":"成都街拍" } ] }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6575128377458426371%2C%22source%22%3A%22%E8%A1%97%E5%A4%B4%E4%B9%8B%E7%BE%8E%22%7D&gd_label=click_search&groupid=6575128377458426371&item_id=6575128377458426371", "media_name":"街头之美", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1589012569581572/", "item_source_url":"/group/6575128377458426371/", "labels":[ ], "image_list":[ { "url":"//p3.pstatp.com/list/pgc-image/15308911861360624e6e374" }, { "url":"//p9.pstatp.com/list/pgc-image/1530891187640293d64a75b" }, { "url":"//p3.pstatp.com/list/pgc-image/15308911869350d7e224617" }, { "url":"//p3.pstatp.com/list/pgc-image/1530891187266752e4a248a" } ], "media_avatar_url":"//p3.pstatp.com/medium/568700016f687f48619c", "datetime":"2018-07-06 23:36:12", "more_mode":true, "create_time":"1530891372", "has_gallery":true, "id":6575128377458426371, "user_id":84914772586, "title":"街拍北京,真实的三里屯街拍,有你喜欢的吗?", "has_video":false, "share_url":"http://toutiao.com/group/6575128377458426371/", "source":"街头之美", "comment_count":39, "article_url":"http://toutiao.com/group/6575128377458426371/", "comments_count":39, "large_mode":false, "abstract":"", "large_image_url":"http://p9.pstatp.com/large/pgc-image/15308913419144ed8193605", "display_time":"1530891372", "publish_time":"1530891372", "middle_mode":false, "gallary_image_count":9, "media_creator_id":84914772586, "tag_id":6575128377458426371, "source_url":"/group/6575128377458426371/", "item_id":6575128377458426371, "user_auth_info":{ }, "seo_url":"/group/6575128377458426371/", "keyword":"街拍", "middle_image_url":"http://p9.pstatp.com/list/300x196/pgc-image/15308913419144ed8193605", "behot_time":"1530891372", "tag":"news", "image_url":"//p1.pstatp.com/list/pgc-image/15308913419144ed8193605", "has_image":true, "highlight":{ "source":[ ], "abstract":[ ], "title":[ [ 0, 2 ], [ 11, 2 ] ] }, "group_id":6575128377458426371, "image_count":9 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6582006694723715588%2C%22source%22%3A%22%E6%97%B6%E5%B0%9A%E8%A1%97%E6%8B%8DDog%22%7D&gd_label=click_search&groupid=6582006694723715588&item_id=6582006694723715588", "media_name":"时尚街拍Dog", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1592563374988295/", "item_source_url":"/group/6582006694723715588/", "labels":[ ], "image_list":[ { "url":"//p3.pstatp.com/list/pgc-image/1532492670937f47fcac184" }, { "url":"//p1.pstatp.com/list/pgc-image/15324926715074dd92a7255" }, { "url":"//p1.pstatp.com/list/pgc-image/153249267098289704b6705" }, { "url":"//p3.pstatp.com/list/pgc-image/1532492671014147db144b7" } ], "media_avatar_url":"//p3.pstatp.com/medium/8b6000041e42267916a3", "datetime":"2018-07-25 12:27:35", "more_mode":true, "create_time":"1532492855", "has_gallery":true, "id":6582006694723715588, "user_id":5441627343, "title":"街拍路人,在夏天的街头,寻找时尚好看的穿搭", "has_video":false, "share_url":"http://toutiao.com/group/6582006694723715588/", "source":"时尚街拍Dog", "comment_count":7, "article_url":"http://toutiao.com/group/6582006694723715588/", "comments_count":7, "large_mode":false, "abstract":"", "large_image_url":"http://p3.pstatp.com/large/pgc-image/15324926929165c799d7991", "display_time":"1532492855", "publish_time":"1532492855", "middle_mode":false, "gallary_image_count":7, "media_creator_id":5441627343, "tag_id":6582006694723715588, "source_url":"/group/6582006694723715588/", "item_id":6582006694723715588, "user_auth_info":{ }, "seo_url":"/group/6582006694723715588/", "keyword":"街拍", "middle_image_url":"http://p3.pstatp.com/list/300x196/pgc-image/15324926929165c799d7991", "behot_time":"1532492855", "tag":"news_fashion", "image_url":"//p1.pstatp.com/list/pgc-image/15324926929165c799d7991", "has_image":true, "highlight":{ "source":[ [ 2, 2 ] ], "abstract":[ ], "title":[ [ 0, 2 ] ] }, "group_id":6582006694723715588, "image_count":7 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6581765451573887502%2C%22source%22%3A%22%E8%A1%97%E6%8B%8D%E7%BE%8E%E5%A5%B3%E5%9B%BE%22%7D&gd_label=click_search&groupid=6581765451573887502&item_id=6581765451573887502", "media_name":"街拍美女图", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1601945960894478/", "item_source_url":"/group/6581765451573887502/", "labels":[ ], "image_list":[ { "url":"//p3.pstatp.com/list/pgc-image/15324366427545983baa56d" }, { "url":"//p3.pstatp.com/list/pgc-image/15324366426646ca95867d1" }, { "url":"//p3.pstatp.com/list/pgc-image/153243664268262771db06a" }, { "url":"//p3.pstatp.com/list/pgc-image/1532436643006a08e341b99" } ], "media_avatar_url":"//p1.pstatp.com/medium/888e0001ca2d8afc54d4", "datetime":"2018-07-24 20:51:26", "more_mode":true, "create_time":"1532436686", "has_gallery":true, "id":6581765451573887502, "user_id":98867532852, "title":"街拍,2018夏季最新潮流,你不来看看?", "has_video":false, "share_url":"http://toutiao.com/group/6581765451573887502/", "source":"街拍美女图", "comment_count":1, "article_url":"http://toutiao.com/group/6581765451573887502/", "comments_count":1, "large_mode":false, "abstract":"", "large_image_url":"http://p9.pstatp.com/large/pgc-image/15324366427545983baa56d", "display_time":"1532436686", "publish_time":"1532436686", "middle_mode":false, "gallary_image_count":5, "media_creator_id":98867532852, "tag_id":6581765451573887502, "source_url":"/group/6581765451573887502/", "item_id":6581765451573887502, "user_auth_info":{ }, "seo_url":"/group/6581765451573887502/", "keyword":"街拍", "middle_image_url":"http://p1.pstatp.com/list/300x196/pgc-image/15324366427545983baa56d", "behot_time":"1532436686", "tag":"news_fashion", "image_url":"//p3.pstatp.com/list/pgc-image/15324366427545983baa56d", "has_image":true, "highlight":{ "source":[ [ 0, 2 ] ], "abstract":[ ], "title":[ [ 0, 2 ] ] }, "group_id":6581765451573887502, "image_count":5 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6582111493955781123%2C%22source%22%3A%22%E6%9A%97%E6%81%8B%E6%9C%AA%E9%81%82%E5%BF%83%E4%B8%8D%E7%94%98%22%7D&gd_label=click_search&groupid=6582111493955781123&item_id=6582111493955781123", "media_name":"暗恋未遂心不甘", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1602709709575171/", "item_source_url":"/group/6582111493955781123/", "labels":[ ], "image_list":[ { "url":"//p3.pstatp.com/list/pgc-image/1532517097270d0f52aef5c" }, { "url":"//p3.pstatp.com/list/pgc-image/15325170953372197108dea" }, { "url":"//p3.pstatp.com/list/pgc-image/1532517096163fead828a32" }, { "url":"//p3.pstatp.com/list/pgc-image/153251709656723ce7388af" } ], "media_avatar_url":"//p1.pstatp.com/medium/888d000408e81609a1d9", "datetime":"2018-07-25 19:14:15", "more_mode":true, "create_time":"1532517255", "has_gallery":true, "id":6582111493955781123, "user_id":99760023327, "title":"街拍!这些引领时尚潮流的装扮!这个夏季你的美一直被模仿!", "has_video":false, "share_url":"http://toutiao.com/group/6582111493955781123/", "source":"暗恋未遂心不甘", "comment_count":0, "article_url":"http://toutiao.com/group/6582111493955781123/", "comments_count":0, "large_mode":false, "abstract":"", "large_image_url":"http://p9.pstatp.com/large/pgc-image/1532517097270d0f52aef5c", "display_time":"1532517255", "publish_time":"1532517255", "middle_mode":false, "gallary_image_count":8, "media_creator_id":99760023327, "tag_id":6582111493955781123, "source_url":"/group/6582111493955781123/", "item_id":6582111493955781123, "user_auth_info":{ }, "seo_url":"/group/6582111493955781123/", "keyword":"街拍", "middle_image_url":"http://p3.pstatp.com/list/300x196/pgc-image/1532517097270d0f52aef5c", "behot_time":"1532517255", "tag":"news_fashion", "image_url":"//p1.pstatp.com/list/pgc-image/1532517097270d0f52aef5c", "has_image":true, "highlight":{ "source":[ ], "abstract":[ ], "title":[ [ 0, 2 ] ] }, "group_id":6582111493955781123, "image_count":8 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6581997033534521869%2C%22source%22%3A%22%E7%9A%87%E5%9F%8E%E6%A0%B9%E4%BA%94%E7%88%B7%E5%8E%9F%E5%88%9B%E8%A1%97%E6%8B%8D%22%7D&gd_label=click_search&groupid=6581997033534521869&item_id=6581997033534521869", "media_name":"皇城根五爷原创街拍", "show_play_effective_count":0, "media_url":"http://toutiao.com/m6682998606/", "item_source_url":"/group/6581997033534521869/", "labels":[ ], "image_list":[ { "url":"//p9.pstatp.com/list/pgc-image/1532488976573b0337527d2" }, { "url":"//p9.pstatp.com/list/pgc-image/1532488976668e640a16e81" }, { "url":"//p9.pstatp.com/list/pgc-image/1532488976775205f66d504" }, { "url":"//p9.pstatp.com/list/pgc-image/153248897668803f72dc547" } ], "media_avatar_url":"//p3.pstatp.com/medium/6cb000fd8de5eec5814", "datetime":"2018-07-25 11:50:05", "more_mode":true, "create_time":"1532490605", "has_gallery":true, "id":6581997033534521869, "user_id":6685177416, "title":"街拍:燥热的三伏天也挡不住女人一颗爱美追求时尚的心", "has_video":false, "share_url":"http://toutiao.com/group/6581997033534521869/", "source":"皇城根五爷原创街拍", "comment_count":1, "article_url":"http://toutiao.com/group/6581997033534521869/", "comments_count":1, "large_mode":false, "abstract":"", "large_image_url":"http://p1.pstatp.com/large/pgc-image/1532488976573b0337527d2", "display_time":"1532490605", "publish_time":"1532490605", "middle_mode":false, "gallary_image_count":9, "media_creator_id":6685177416, "tag_id":6581997033534521869, "source_url":"/group/6581997033534521869/", "item_id":6581997033534521869, "user_auth_info":{ "auth_type":"0", "auth_info":"街拍达人" }, "seo_url":"/group/6581997033534521869/", "keyword":"街拍", "middle_image_url":"http://p1.pstatp.com/list/300x196/pgc-image/1532488976573b0337527d2", "behot_time":"1532490605", "tag":"news_fashion", "image_url":"//p3.pstatp.com/list/pgc-image/1532488976573b0337527d2", "has_image":true, "highlight":{ "source":[ [ 7, 2 ] ], "abstract":[ ], "title":[ [ 0, 2 ] ] }, "group_id":6581997033534521869, "image_count":9 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6582132151376937480%2C%22source%22%3A%22%E6%97%B6%E5%B0%9A%E5%A5%BD%E7%9C%8B19%22%7D&gd_label=click_search&groupid=6582132151376937480&item_id=6582132151376937480", "media_name":"时尚好看19", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1600606970177550/", "item_source_url":"/group/6582132151376937480/", "labels":[ ], "image_list":[ { "url":"//p3.pstatp.com/list/pgc-image/1532522029762bf3a6a87cd" }, { "url":"//p3.pstatp.com/list/pgc-image/15325220290298efa777ca4" }, { "url":"//p3.pstatp.com/list/pgc-image/1532522030786e25b83a898" }, { "url":"//p1.pstatp.com/list/pgc-image/1532522030836a6d6df9a59" } ], "media_avatar_url":"//p3.pstatp.com/medium/6eed0002747fdb857784", "datetime":"2018-07-25 20:34:25", "more_mode":true, "create_time":"1532522065", "has_gallery":true, "id":6582132151376937480, "user_id":98512844552, "title":"街拍杭州:穿衣时尚,走的是端庄优雅的风格,很迷人!", "has_video":false, "share_url":"http://toutiao.com/group/6582132151376937480/", "source":"时尚好看19", "comment_count":0, "article_url":"http://toutiao.com/group/6582132151376937480/", "comments_count":0, "large_mode":false, "abstract":"", "large_image_url":"http://p1.pstatp.com/large/pgc-image/1532522029762bf3a6a87cd", "display_time":"1532522065", "publish_time":"1532522065", "middle_mode":false, "gallary_image_count":6, "media_creator_id":98512844552, "tag_id":6582132151376937480, "source_url":"/group/6582132151376937480/", "item_id":6582132151376937480, "user_auth_info":{ }, "seo_url":"/group/6582132151376937480/", "keyword":"街拍", "middle_image_url":"http://p1.pstatp.com/list/300x196/pgc-image/1532522029762bf3a6a87cd", "behot_time":"1532522065", "tag":"news_fashion", "image_url":"//p3.pstatp.com/list/pgc-image/1532522029762bf3a6a87cd", "has_image":true, "highlight":{ "source":[ ], "abstract":[ ], "title":[ [ 0, 2 ] ] }, "group_id":6582132151376937480, "image_count":6 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6581676939176575502%2C%22source%22%3A%22%E6%97%B6%E5%B0%9A%E5%A5%BD%E7%9C%8B19%22%7D&gd_label=click_search&groupid=6581676939176575502&item_id=6581676939176575502", "media_name":"时尚好看19", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1600606970177550/", "item_source_url":"/group/6581676939176575502/", "labels":[ ], "image_list":[ { "url":"//p1.pstatp.com/list/pgc-image/1532416009424d12eee1e90" }, { "url":"//p9.pstatp.com/list/pgc-image/1532416009912d7c9d13a9b" }, { "url":"//p1.pstatp.com/list/pgc-image/15324160096254692a775d2" }, { "url":"//p3.pstatp.com/list/pgc-image/15324160089181712ab8bfc" } ], "media_avatar_url":"//p3.pstatp.com/medium/6eed0002747fdb857784", "datetime":"2018-07-24 15:07:58", "more_mode":true, "create_time":"1532416078", "has_gallery":true, "id":6581676939176575502, "user_id":98512844552, "title":"街拍重庆:几套轻熟的穿搭,讲究端庄大方优雅美!", "has_video":false, "share_url":"http://toutiao.com/group/6581676939176575502/", "source":"时尚好看19", "comment_count":8, "article_url":"http://toutiao.com/group/6581676939176575502/", "comments_count":8, "large_mode":false, "abstract":"", "large_image_url":"http://p1.pstatp.com/large/pgc-image/1532416009424d12eee1e90", "display_time":"1532416078", "publish_time":"1532416078", "middle_mode":false, "gallary_image_count":6, "media_creator_id":98512844552, "tag_id":6581676939176575502, "source_url":"/group/6581676939176575502/", "item_id":6581676939176575502, "user_auth_info":{ }, "seo_url":"/group/6581676939176575502/", "keyword":"街拍", "middle_image_url":"http://p1.pstatp.com/list/300x196/pgc-image/1532416009424d12eee1e90", "behot_time":"1532416078", "tag":"news_fashion", "image_url":"//p1.pstatp.com/list/pgc-image/1532416009424d12eee1e90", "has_image":true, "highlight":{ "source":[ ], "abstract":[ ], "title":[ [ 0, 2 ] ] }, "group_id":6581676939176575502, "image_count":6 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6582122688460882446%2C%22source%22%3A%22%E6%97%B6%E5%B0%9A%E5%A5%BD%E7%9C%8B19%22%7D&gd_label=click_search&groupid=6582122688460882446&item_id=6582122688460882446", "media_name":"时尚好看19", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1600606970177550/", "item_source_url":"/group/6582122688460882446/", "labels":[ ], "image_list":[ { "url":"//p1.pstatp.com/list/pgc-image/15325197861665ce3323e52" }, { "url":"//p1.pstatp.com/list/pgc-image/1532519785665a94c4ee360" }, { "url":"//p3.pstatp.com/list/pgc-image/1532519786475b9da78cef0" }, { "url":"//p3.pstatp.com/list/pgc-image/1532519785553527c138327" } ], "media_avatar_url":"//p3.pstatp.com/medium/6eed0002747fdb857784", "datetime":"2018-07-25 19:57:42", "more_mode":true, "create_time":"1532519862", "has_gallery":true, "id":6582122688460882446, "user_id":98512844552, "title":"街拍成都:参考她们的时尚穿搭,你会变的更美!", "has_video":false, "share_url":"http://toutiao.com/group/6582122688460882446/", "source":"时尚好看19", "comment_count":6, "article_url":"http://toutiao.com/group/6582122688460882446/", "comments_count":6, "large_mode":false, "abstract":"", "large_image_url":"http://p1.pstatp.com/large/pgc-image/15325197861665ce3323e52", "display_time":"1532519862", "publish_time":"1532519862", "middle_mode":false, "gallary_image_count":6, "media_creator_id":98512844552, "tag_id":6582122688460882446, "source_url":"/group/6582122688460882446/", "item_id":6582122688460882446, "user_auth_info":{ }, "seo_url":"/group/6582122688460882446/", "keyword":"街拍", "middle_image_url":"http://p3.pstatp.com/list/300x196/pgc-image/15325197861665ce3323e52", "behot_time":"1532519862", "tag":"news_fashion", "image_url":"//p3.pstatp.com/list/pgc-image/15325197861665ce3323e52", "has_image":true, "highlight":{ "source":[ ], "abstract":[ ], "title":[ [ 0, 2 ] ] }, "group_id":6582122688460882446, "image_count":6 }, { "open_url":"sslocal://detail?aggr_type=0&article_type=0&gd_ext_json=%7B%22city%22%3A%22%22%2C%22log_pb%22%3A%7B%22impr_id%22%3A%2220180725214120172016032036766212%22%7D%2C%22query%22%3A%22%E8%A1%97%E6%8B%8D%22%2C%22search_result_id%22%3A6581764175733719555%2C%22source%22%3A%22%E8%A1%97%E6%8B%8D%E7%BE%8E%E5%A5%B3%E5%9B%BE%22%7D&gd_label=click_search&groupid=6581764175733719555&item_id=6581764175733719555", "media_name":"街拍美女图", "show_play_effective_count":0, "media_url":"http://toutiao.com/m1601945960894478/", "item_source_url":"/group/6581764175733719555/", "labels":[ ], "image_list":[ { "url":"//p3.pstatp.com/list/pgc-image/153243632337253a39946a2" }, { "url":"//p1.pstatp.com/list/pgc-image/1532436323338f843a5db65" }, { "url":"//p1.pstatp.com/list/pgc-image/15324363235229ac3301a14" }, { "url":"//p9.pstatp.com/list/pgc-image/1532436323536a33cf8528a" } ], "media_avatar_url":"//p1.pstatp.com/medium/888e0001ca2d8afc54d4", "datetime":"2018-07-24 20:46:29", "more_mode":true, "create_time":"1532436389", "has_gallery":true, "id":6581764175733719555, "user_id":98867532852, "title":"街拍,连衣裙一直都是减龄,显可爱的标配啊!", "has_video":false, "share_url":"http://toutiao.com/group/6581764175733719555/", "source":"街拍美女图", "comment_count":9, "article_url":"http://toutiao.com/group/6581764175733719555/", "comments_count":9, "large_mode":false, "abstract":"", "large_image_url":"http://p3.pstatp.com/large/pgc-image/153243632337253a39946a2", "display_time":"1532436389", "publish_time":"1532436389", "middle_mode":false, "gallary_image_count":5, "media_creator_id":98867532852, "tag_id":6581764175733719555, "source_url":"/group/6581764175733719555/", "item_id":6581764175733719555, "user_auth_info":{ }, "seo_url":"/group/6581764175733719555/", "keyword":"街拍", "middle_image_url":"http://p3.pstatp.com/list/300x196/pgc-image/153243632337253a39946a2", "behot_time":"1532436389", "tag":"news_fashion", "image_url":"//p1.pstatp.com/list/pgc-image/153243632337253a39946a2", "has_image":true, "highlight":{ "source":[ [ 0, 2 ] ], "abstract":[ ], "title":[ [ 0, 2 ] ] }, "group_id":6581764175733719555, "image_count":5 }, { "cell_type":20, "queries":[ { "url":"/search/keyword=%E8%A1%97%E6%8B%8D%E4%BD%8E%E8%85%B0%E8%A3%A4", "text":"街拍低腰裤" }, { "url":"/search/keyword=%E4%B8%9D%E8%A2%9C%E7%BE%8E%E8%85%BF%E8%A1%97%E6%8B%8D", "text":"丝袜美腿街拍" }, { "url":"/search/keyword=%E8%A1%97%E6%8B%8D%E4%B8%80%E6%AD%A5%E8%A3%99", "text":"街拍一步裙" }, { "url":"/search/keyword=%E8%A1%97%E6%8B%8D%E7%86%9F%E4%B8%9D", "text":"街拍熟丝" }, { "url":"/search/keyword=%E6%80%A7%E6%84%9F%E7%BE%8E%E5%A5%B3%E8%A1%97%E6%8B%8D", "text":"性感美女街拍" }, { "url":"/search/keyword=%E5%A4%8F%E5%AD%A3%E8%A1%97%E6%8B%8D", "text":"夏季街拍" }, { "url":"/search/keyword=%E8%A1%97%E6%8B%8D+%E8%87%80", "text":"街拍 臀" }, { "url":"/search/keyword=%E4%B8%89%E9%87%8C%E5%B1%AF%E8%A1%97%E6%8B%8D", "text":"三里屯街拍" }, { "url":"/search/keyword=%E8%A1%97%E6%8B%8D%E7%94%B7%E5%A4%8F%E5%AD%A3", "text":"街拍男夏季" }, { "url":"/search/keyword=%E6%88%90%E9%83%BD%E8%A1%97%E6%8B%8D", "text":"成都街拍" } ] } ], "message":"success", "action_label_pgc":"click_search" }
for url in parse_page_index(html):
# print(url)
# None
# None
# http: // toutiao.com / group / 6581952133069799949 /
# http: // toutiao.com / group / 6581984163740516867 /
# http: // toutiao.com / group / 6581673508466590221 /
# None
# http: // toutiao.com / group / 6581917968358179336 /
# None
# None
# None
# http: // toutiao.com / group / 6575128377458426371 /
# http: // toutiao.com / group / 6582006694723715588 /
# http: // toutiao.com / group / 6581765451573887502 /
# http: // toutiao.com / group / 6582111493955781123 /
# http: // toutiao.com / group / 6581997033534521869 /
# http: // toutiao.com / group / 6581676939176575502 /
# http: // toutiao.com / group / 6581962096009806350 /
# http: // toutiao.com / group / 6582123909108204040 /
# http: // toutiao.com / group / 6581764175733719555 /
# None
html = get_page_detail(url)
if html:
parse_page_detail(html)
if __name__ == '__main__':
main()
街拍爬虫完整代码
/www/python3/maoyantop100/config.py
MONGO_URL='192.168.33.12:27017' MONGO_DB='toutiao' MONGO_TABLE='toutiao' GROUP_START=1 GROUP_END=20 KEYWORD='街拍'
/www/python3/maoyantop100/jiepai.py
import requests from urllib.parse import urlencode # 引入异常类 from requests.exceptions import RequestException # 保存文件时用到json格式 import json # 正则表达式 import re from bs4 import BeautifulSoup import pymongo import os from hashlib import md5 from config import * from multiprocessing import Pool from json import JSONDecodeError from pathlib import * client = pymongo.MongoClient(MONGO_URL) # client = pymongo.MongoClient(host='192.168.33.12', port=27017) db = client[MONGO_DB] def get_page_index(offset,keyword): data = { 'autoload':'true', 'count':'20', 'cur_tab':1, 'format':'json', 'from':'search_tab', 'keyword':keyword, 'offset':offset } url = 'https://www.toutiao.com/search_content/?'+ urlencode(data) try: response = requests.get(url) if response.status_code == 200: return response.text return None except RequestException: print('请求索引页出错') return None # 获得图集的url def parse_page_index(html): try: data = json.loads(html) if data and 'data' in data.keys(): for item in data.get('data'): yield item.get('article_url') except JSONDecodeError: pass # 获得页面的详细内容 def get_page_detail(url): try: headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' } response = requests.get(url, headers=headers) if response.status_code == 200: return response.text return None except RequestException: print('请求详情页出错',url) return None # 解析详情页 def parse_page_detail(html,url): soup = BeautifulSoup(html,'lxml') title = soup.select('title')[0].get_text() # print(title) # 路人街拍,个子不高,穿得却很有范,而且时尚潮流 # 这里一定要加r,表示不转义 # image_pattren = re.search(r'gallery:.*?parse\("(.*?)"\),', html, re.S) # < _sre.SRE_Match object; span = (4956, 8371), match = 'gallery: JSON.parse("{\\"count\\":5,\\"sub_images> # group(0)就是匹配正则表达式整体结果 # group(1) 列出第一个括号匹配部分 # print(image_pattren.group(1)) # {\"count\":5,\"sub_images\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/15324800265505b953ab972\",\"width\":640,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/15324800265505b953ab972\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/pgc-image\\/15324800265505b953ab972\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/pgc-image\\/15324800265505b953ab972\"}],\"uri\":\"origin\\/pgc-image\\/15324800265505b953ab972\",\"height\":959},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/1532480004156480c21a63e\",\"width\":640,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/1532480004156480c21a63e\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/pgc-image\\/1532480004156480c21a63e\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/pgc-image\\/1532480004156480c21a63e\"}],\"uri\":\"origin\\/pgc-image\\/1532480004156480c21a63e\",\"height\":1011},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/1532480016958bdc65dea62\",\"width\":640,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/1532480016958bdc65dea62\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/pgc-image\\/1532480016958bdc65dea62\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/pgc-image\\/1532480016958bdc65dea62\"}],\"uri\":\"origin\\/pgc-image\\/1532480016958bdc65dea62\",\"height\":929},{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/pgc-image\\/15324800362354f9d1c3ec1\",\"width\":640,\"url_list\":[{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/pgc-image\\/15324800362354f9d1c3ec1\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/pgc-image\\/15324800362354f9d1c3ec1\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/pgc-image\\/15324800362354f9d1c3ec1\"}],\"uri\":\"origin\\/pgc-image\\/15324800362354f9d1c3ec1\",\"height\":960},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/15324800476353e6c3e0c25\",\"width\":640,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/pgc-image\\/15324800476353e6c3e0c25\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/pgc-image\\/15324800476353e6c3e0c25\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/pgc-image\\/15324800476353e6c3e0c25\"}],\"uri\":\"origin\\/pgc-image\\/15324800476353e6c3e0c25\",\"height\":986}],\"max_img_width\":640,\"labels\":[\"\\u65f6\\u88c5\\u642d\\u914d\"],\"sub_abstracts\":[\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\",\" \",\" \",\" \",\" \"],\"sub_titles\":[\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\",\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\",\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\",\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\",\"\\u8def\\u4eba\\u8857\\u62cd\\uff0c\\u4e2a\\u5b50\\u4e0d\\u9ad8\\uff0c\\u7a7f\\u5f97\\u5374\\u5f88\\u6709\\u8303\\uff0c\\u800c\\u4e14\\u65f6\\u5c1a\\u6f6e\\u6d41\"]} # 对于一个输入的字符串,利用正则表达式,来实现字符串替换处理的功能返回处理后的字符串 # if image_pattren.group(1) != NoneType: # result = re.sub(r'\\', '', image_pattren.group(1)) # 有些链接匹配报错: AttributeError: 'NoneType' object has no attribute 'group' # 解决方法 try: image_pattren = re.search(r'gallery:.*?parse\("(.*?)"\),', html, re.S) result = re.sub(r'\\', '', image_pattren.group(1)) except: # 有些json需要修复 try: result = "{" + re.search(r'("sub_images":\[\{.*?\}\]),"max', image_pattren).group(1) + "}" except: return None # data = json.loads(image_pattren) # { # "count": 5, # "sub_images": [ # { # "url": "http://p3.pstatp.com/origin/pgc-image/15324800265505b953ab972", # "width": 640, # "url_list": [ # { # "url": "http://p3.pstatp.com/origin/pgc-image/15324800265505b953ab972" # }, # { # "url": "http://pb9.pstatp.com/origin/pgc-image/15324800265505b953ab972" # }, # { # "url": "http://pb1.pstatp.com/origin/pgc-image/15324800265505b953ab972" # } # ], # "uri": "origin/pgc-image/15324800265505b953ab972", # "height": 959 # }, # { # "url": "http://p3.pstatp.com/origin/pgc-image/1532480004156480c21a63e", # "width": 640, # "url_list": [ # { # "url": "http://p3.pstatp.com/origin/pgc-image/1532480004156480c21a63e" # }, # { # "url": "http://pb9.pstatp.com/origin/pgc-image/1532480004156480c21a63e" # }, # { # "url": "http://pb1.pstatp.com/origin/pgc-image/1532480004156480c21a63e" # } # ], # "uri": "origin/pgc-image/1532480004156480c21a63e", # "height": 1011 # }, # { # "url": "http://p3.pstatp.com/origin/pgc-image/1532480016958bdc65dea62", # "width": 640, # "url_list": [ # { # "url": "http://p3.pstatp.com/origin/pgc-image/1532480016958bdc65dea62" # }, # { # "url": "http://pb9.pstatp.com/origin/pgc-image/1532480016958bdc65dea62" # }, # { # "url": "http://pb1.pstatp.com/origin/pgc-image/1532480016958bdc65dea62" # } # ], # "uri": "origin/pgc-image/1532480016958bdc65dea62", # "height": 929 # }, # { # "url": "http://p9.pstatp.com/origin/pgc-image/15324800362354f9d1c3ec1", # "width": 640, # "url_list": [ # { # "url": "http://p9.pstatp.com/origin/pgc-image/15324800362354f9d1c3ec1" # }, # { # "url": "http://pb1.pstatp.com/origin/pgc-image/15324800362354f9d1c3ec1" # }, # { # "url": "http://pb3.pstatp.com/origin/pgc-image/15324800362354f9d1c3ec1" # } # ], # "uri": "origin/pgc-image/15324800362354f9d1c3ec1", # "height": 960 # }, # { # "url": "http://p3.pstatp.com/origin/pgc-image/15324800476353e6c3e0c25", # "width": 640, # "url_list": [ # { # "url": "http://p3.pstatp.com/origin/pgc-image/15324800476353e6c3e0c25" # }, # { # "url": "http://pb9.pstatp.com/origin/pgc-image/15324800476353e6c3e0c25" # }, # { # "url": "http://pb1.pstatp.com/origin/pgc-image/15324800476353e6c3e0c25" # } # ], # "uri": "origin/pgc-image/15324800476353e6c3e0c25", # "height": 986 # } # ], # "max_img_width": 640, # "labels": [ # "u65f6u88c5u642du914d" # ], # "sub_abstracts": [ # "u8defu4ebau8857u62cduff0cu4e2au5b50u4e0du9ad8uff0cu7a7fu5f97u5374u5f88u6709u8303uff0cu800cu4e14u65f6u5c1au6f6eu6d41", # " ", # " ", # " ", # " " # ], # "sub_titles": [ # "u8defu4ebau8857u62cduff0cu4e2au5b50u4e0du9ad8uff0cu7a7fu5f97u5374u5f88u6709u8303uff0cu800cu4e14u65f6u5c1au6f6eu6d41", # "u8defu4ebau8857u62cduff0cu4e2au5b50u4e0du9ad8uff0cu7a7fu5f97u5374u5f88u6709u8303uff0cu800cu4e14u65f6u5c1au6f6eu6d41", # "u8defu4ebau8857u62cduff0cu4e2au5b50u4e0du9ad8uff0cu7a7fu5f97u5374u5f88u6709u8303uff0cu800cu4e14u65f6u5c1au6f6eu6d41", # "u8defu4ebau8857u62cduff0cu4e2au5b50u4e0du9ad8uff0cu7a7fu5f97u5374u5f88u6709u8303uff0cu800cu4e14u65f6u5c1au6f6eu6d41", # "u8defu4ebau8857u62cduff0cu4e2au5b50u4e0du9ad8uff0cu7a7fu5f97u5374u5f88u6709u8303uff0cu800cu4e14u65f6u5c1au6f6eu6d41" # ] # } data = json.loads(result) if data: if data and 'sub_images' in data.keys(): sub_images = data.get('sub_images') # print(sub_images) # [{'url': 'http://p3.pstatp.com/origin/pgc-image/15324797266414994fe0c29', 'width': 640, # 'url_list': [{'url': 'http://p3.pstatp.com/origin/pgc-image/15324797266414994fe0c29'}, # {'url': 'http://pb9.pstatp.com/origin/pgc-image/15324797266414994fe0c29'}, # {'url': 'http://pb1.pstatp.com/origin/pgc-image/15324797266414994fe0c29'}], # 'uri': 'origin/pgc-image/15324797266414994fe0c29', 'height': 1024}, # {'url': 'http://p9.pstatp.com/origin/pgc-image/153247973590013e70c2a38', 'width': 640, # 'url_list': [{'url': 'http://p9.pstatp.com/origin/pgc-image/153247973590013e70c2a38'}, # {'url': 'http://pb1.pstatp.com/origin/pgc-image/153247973590013e70c2a38'}, # {'url': 'http://pb3.pstatp.com/origin/pgc-image/153247973590013e70c2a38'}], # 'uri': 'origin/pgc-image/153247973590013e70c2a38', 'height': 959}, # {'url': 'http://p3.pstatp.com/origin/pgc-image/1532479751908bed79d4f72', 'width': 640, # 'url_list': [{'url': 'http://p3.pstatp.com/origin/pgc-image/1532479751908bed79d4f72'}, # {'url': 'http://pb9.pstatp.com/origin/pgc-image/1532479751908bed79d4f72'}, # {'url': 'http://pb1.pstatp.com/origin/pgc-image/1532479751908bed79d4f72'}], # 'uri': 'origin/pgc-image/1532479751908bed79d4f72', 'height': 959}, # {'url': 'http://p9.pstatp.com/origin/pgc-image/1532479760753c3d36e0148', 'width': 640, # 'url_list': [{'url': 'http://p9.pstatp.com/origin/pgc-image/1532479760753c3d36e0148'}, # {'url': 'http://pb1.pstatp.com/origin/pgc-image/1532479760753c3d36e0148'}, # {'url': 'http://pb3.pstatp.com/origin/pgc-image/1532479760753c3d36e0148'}], # 'uri': 'origin/pgc-image/1532479760753c3d36e0148', 'height': 1024}, # {'url': 'http://p3.pstatp.com/origin/pgc-image/15324797433230a3c07d03a', 'width': 640, # 'url_list': [{'url': 'http://p3.pstatp.com/origin/pgc-image/15324797433230a3c07d03a'}, # {'url': 'http://pb9.pstatp.com/origin/pgc-image/15324797433230a3c07d03a'}, # {'url': 'http://pb1.pstatp.com/origin/pgc-image/15324797433230a3c07d03a'}], # 'uri': 'origin/pgc-image/15324797433230a3c07d03a', 'height': 960}] images = [item.get('url') for item in sub_images] # print(images) # ['http://p3.pstatp.com/origin/pgc-image/15324797266414994fe0c29', # 'http://p9.pstatp.com/origin/pgc-image/153247973590013e70c2a38', # 'http://p3.pstatp.com/origin/pgc-image/1532479751908bed79d4f72', # 'http://p9.pstatp.com/origin/pgc-image/1532479760753c3d36e0148', # 'http://p3.pstatp.com/origin/pgc-image/15324797433230a3c07d03a'] # 保存图片的根目录 root_dir = create_dir('/www/python3/') # 根据每组图片的title标题名创建目录 download_dir = create_dir(root_dir / title) # 下载图片 for image in images:download_image(download_dir,image) return { 'title':title, 'images':images, 'url':url } # 存储到MongoDB数据库中 def save_to_mongo(result): if db[MONGO_TABLE].insert(result): print('存储到MongoDB成功',result) return True return False # 下载图片 def download_image(save_dir,url): print('正在下载',url) try: headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' } response = requests.get(url, headers=headers) if response.status_code == 200: # 调用存储图片函数,返回二进制 save_image(save_dir,response.content) return response.text return None except RequestException: print('请求图片出错',url) return None # 保存图片到本地 def save_image(save_dir,content): # 把文件保存到本地,文件有三部分内容(路径)/(文件名).(后缀) # 用format构造字符串(项目路径,文件名,格式),md5文件名可以避免重复 # os.getcwd()程序同目录 # file_path = '{0}/{1}.{2}'.format(os.getcwd(), md5(content).hexdigest(), 'jpg') # 自定义保存目录 file_path = '{0}/{1}.{2}'.format(save_dir, md5(content).hexdigest(),'jpg') # 如果文件不存在,开始存入 if not os.path.exists(file_path): with open(file_path,'wb') as f: f.write(content) f.close() # 利用pathlib库根据传入的目录名创建一个文件目录 def create_dir(name): #根据传入的目录名创建一个目录,这里用到了 python3.4 引入的 pathlib 。 directory = Path(name) if not directory.exists(): directory.mkdir() return directory def main(offset): html = get_page_index(offset,KEYWORD) # print(html) for url in parse_page_index(html): # print(url) # http://toutiao.com/group/6581952133069799949/ html = get_page_detail(url) # print(html) if html: result = parse_page_detail(html,url) print(result) # {'title': '路人街拍,个子不高,穿得却很有范,而且时尚潮流', # 'images': ['http://p3.pstatp.com/origin/pgc-image/15324800265505b953ab972', # 'http://p3.pstatp.com/origin/pgc-image/1532480004156480c21a63e', # 'http://p3.pstatp.com/origin/pgc-image/1532480016958bdc65dea62', # 'http://p9.pstatp.com/origin/pgc-image/15324800362354f9d1c3ec1', # 'http://p3.pstatp.com/origin/pgc-image/15324800476353e6c3e0c25'], # 'url': 'http://toutiao.com/group/6581952133069799949/'} if result: save_to_mongo(result) if __name__ == '__main__': # main(20) groups = [x*20 for x in range(GROUP_START,GROUP_END+1)] pool = Pool() pool.map(main,groups)