# -*- coding: utf-8 -*-
"""
Created on Tue Dec  4 16:23:48 2018

@author: fangyucheng
"""

# import configparser
#
# config = configparser.ConfigParser()
# config.read('/home/hanye/crawlerNEW/crawler/crawler_sys/framework/config/search_keywords.ini')
# -*- coding:utf-8 -*-
# @Time : 2019/9/4 18:01
# @Author : litao
import requests
import json
import datetime
import elasticsearch
from write_data_into_es.func_cal_doc_id import *
import urllib
from urllib.parse import parse_qs, urlparse
# from func_get_releaser_id import *
# hosts = '172.16.32.37'
# port = 9200
# user = 'zhouyujiang'
# passwd = '8tM9JDN2LVxM'
# http_auth = (user, passwd)
# es = elasticsearch.Elasticsearch(hosts=hosts, port=port)
#
#
# def write_es(target_index,platform="short_video"):
#     count = 0
#     bulk_all_body = ""
#
#     if True:
#         dic = {
#             'platform': 'toutiao', 'title': '45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看',
#              'url': 'http://toutiao.com/group/6851819988165394958/?iid=0&app=news_article', 'duration': 0,
#              'releaser': '盖饭娱乐官方号', 'play_count': 14350, 'favorite_count': 43, 'comment_count': 131, 'repost_count': 2,
#              'data_provider': 'gengmei',
#              'releaserUrl': 'https://profile.zjurl.cn/rogue/ugc/profile/?version_code=7.7.9&version_name=70709&user_id=103497952048&media_id=1609675594821640&request_source=1&active_tab=dongtai&device_id=65&app_name=news_article',
#              'release_time': 1595315782000, 'fetch_time': 1595384097955,
#              'abstract': '《这街》由王嘉尔、钟汉良、王一博、张艺兴四位男艺人担当导师，首期节目四人带来个人开场秀进行Battle，用来确定到手毛巾数。',
#              'article_id': 6851819988165394958, 'releaser_id_str': 'toutiao_103497952048',
#              'video_img': 'http://p26-tt.byteimg.com/img/pgc-image/7448338f2712460d968e65062b249a40~720x380_cs.webp',
#              'aid': 'toutiao_6851819988165394958', 'high_quality_flag': 0, 'releaser_followers_count': 264759,
#              'content': '<h1 class="pgc-h-arrow-right">饿了吗？戳右边关注我们，每天给您送上最新出炉的娱乐硬核大餐！</h1><p>上周六（7月18日）《这就是街舞》火热开播，引来无数热爱街舞的小伙伴前来观看，除了选手们精彩的表演，最令人期待的还是四位导师的表现。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/1cde4effb617411fb66467228f5fc20e" img_width="494" img_height="585" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>《这街》由王嘉尔、钟汉良、王一博、张艺兴四位男艺人担当导师，首期节目四人带来个人开场秀进行Battle，用来确定到手毛巾数（选手晋级票）。</p><p>最终，张艺兴以第一名的成绩拿到最多毛巾，而45岁的钟汉良力压90后王一博成为倒数第二。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/f7d980bc497a4f98963d76dbd5ec08cc" img_width="1582" img_height="887" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>7月21日，有网友发帖质疑，是因为王一博年纪最小，红的时间最短所以用他挽尊吗？并质疑钟汉良是否暗箱操作。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/ba8cd99c5cb2429aa46d99c5a5f62918" img_width="636" img_height="126" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>该网友提出两个疑点，一是投票阶段的视频虽然经过剪辑，却能看出最开始的时候都没人投钟汉良，最后是怎么比王一博多的？</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/e0a38a7a89bc4763b551b5011def58f1" img_width="619" img_height="403" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>二是投票结束时钟汉良表情凝重，而王一博表情轻松，看起来很有信心。钟汉良有在节目里说能用耳朵听见有多少人投自己。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/546810450d7b4f0c929479eea207b3ad" img_width="855" img_height="465" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>其实网友有这样的猜想并不奇怪，在节目播出时便有圈内人发博表示搞不懂为什么王一博会垫底。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/0eca18a8e15243e0b03ff1e8cd90f0af" img_width="919" img_height="384" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>而对钟汉良是否能胜任《这街》导师身份的话题也持续讨论未断过。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/8831a69ccbef4b8fae65497356fedfcb" img_width="775" img_height="323" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>在大多数人心中，张艺兴、王嘉尔、王一博三个年轻人都是在街舞方面有所造诣的唱跳艺人。</p><p>钟汉良不是演员吗？</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/f55235255cee43dd8fce9f091f987176" img_width="879" img_height="518" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>诚然，如今已有45岁的钟汉良在跳舞方面已经不如年轻人有爆发力，但节目中也可以看出他有跳街舞的基础。</p><p>许多人不知道的是，他出道前其实是无线的舞蹈艺人，没靠脸吃饭的时候，他也是拥有一身舞艺，不一定比王一博差。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/7448338f2712460d968e65062b249a40" img_width="759" img_height="502" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>1993年钟汉良加入TVB的舞蹈艺员训练班，学习现代舞、民族舞、芭蕾舞，而他最擅长的是拉丁舞，当时曾为梅艳芳、张国荣等天王巨星担任伴舞，更有一个当芭蕾舞者的梦想。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/a5d6f1c59bad422eb4631b5d6a8feadc" img_width="506" img_height="281" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>但因为他生的白净，身高183cm，长相帅气，于是很快被调至艺员部拍电视剧。那段时间他连续出演《少年五虎》、《刑事侦缉档案》、《第三类法庭》为自己积累了不少观众缘。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/a05a5086d9164c909058276ce4a9f3f5" img_width="594" img_height="281" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>1995年，他获台湾唱作人邰正宵发掘，赴台湾发展并成为唱跳歌手，并出了自己的首张专辑《OREA》。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/59f1d258c5274cfebe109a2917d4b2e8" img_width="400" img_height="262" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>钟汉良当了5年的歌手都没有什么水花，直到2000年后，他开始转向内地拍剧，才开始小有名气。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/73663a4cf05841d694c42b3cb9d91be3" img_width="524" img_height="345" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>其实这期间他并不是没有尝试再回到舞台上，2006年他就参加了《舞林大会》，但这时候大家已经开始淡忘他曾是一位唱跳歌手。</p><div class="pgc-img"><img src="https://p3.pstatp.com/large/pgc-image/dcc4137db0a24d28b5595ca771a2e8f5" img_width="1311" img_height="684" inline="0" alt="45岁钟汉良Battle战胜王一博，两个细节被疑是暗箱操作？你怎么看" onerror="javascript:errorimg.call(this);"><p class="pgc-img-caption"></p></div><p>直到2015年，他成立自己的工作室，再次重拾歌手的身份，除了出个人音乐专辑外，还开过演唱会，如今加盟《这就是街舞》，可以尽情展示他的舞技，也算是一场多年来当舞者的夙愿。</p><p>他在街舞也确实玩的很开心。虽然依然有质疑的声音出现，但相信在后面的节目中能在他身上看到更多惊喜。</p><p>#钟汉良暗箱操作#、#钟汉良跳舞#、#钟汉良王一博#</p><p>作者：每天都想吃榴莲</p><p>责编：阿叉</p>'}
#
#         _id = "test0"
#         bulk_head = '{"index": {"_id":"%s"}}' % _id
#         data_str = json.dumps(dic, ensure_ascii=False)
#         bulk_one_body = bulk_head + '\n' + data_str + '\n'
#         bulk_all_body += bulk_one_body
#         count += 1
#         if count % 500 == 0:
#             eror_dic = es.bulk(index=target_index,
#                                body=bulk_all_body, request_timeout=500)
#             bulk_all_body = ''
#             if eror_dic['errors'] is True:
#                 print(eror_dic['items'])
#                 print(bulk_all_body)
#             print(count)
#
#     if bulk_all_body != '':
#         eror_dic = es.bulk(body=bulk_all_body,
#                            index=target_index,
#                            request_timeout=500)
#         print(eror_dic)
#         if eror_dic['errors'] is True:
#             print(eror_dic)
#             bulk_all_body = ''
#             # print(platform, releaser, 'end_have:', len(wirte_set), 'add:', len(set_url))
#
#
# write_es("crawler-data-raw_v1")
# import pymysql
#
# conn = pymysql.connect(host='bj-cdb-6slgqwlc.sql.tencentcdb.com', port=62120, user='work', passwd='Gengmei1',
#                        db='mimas_test', charset='utf8')
# cur = conn.cursor()
# res_data = {'release_time': 1595952088000, 'fetch_time': 1595989493952,
#             'url': 'https://www.douban.com/group/topic/186708104/', 'releaser': '易燃易暴食', 'repost_count': 6,
#             'comment_count': 153, 'favorite_count': 27, 'title': '李子柒明明就又黑又糙',
#             'releaserUrl': 'https://www.douban.com/people/129156222', 'releaser_id_str': 'douban_129156222',
#             'video_img': 'https://img3.doubanio.com/view/group_topic/sqxs/public/p317684400.webp', 'mid': '186708104',
#             'platform': 'douban', 'doc_id': 'douban_186708104',
#             'content': '<div><div><div><img src="https://img3.doubanio.com/view/group_topic/l/public/p317684400.webp"></div></div><div><div><img src="https://img1.doubanio.com/view/group_topic/l/public/p317684407.webp"></div></div><div><div><img src="https://img1.doubanio.com/view/group_topic/l/public/p317684397.webp"></div></div><div><div><img src="https://img9.doubanio.com/view/group_topic/l/public/p317684404.webp"></div></div><div><div><img src="https://img1.doubanio.com/view/group_topic/l/public/p317684409.webp"></div></div><div><div><img src="https://img3.doubanio.com/view/group_topic/l/public/p317684401.webp"></div></div></div>',
#             'collection_count': 8,
#             'img_list': ['img src="https://img3.doubanio.com/view/group_topic/l/public/p317684400.webp"',
#                          'img src="https://img1.doubanio.com/view/group_topic/l/public/p317684407.webp"',
#                          'img src="https://img1.doubanio.com/view/group_topic/l/public/p317684397.webp"',
#                          'img src="https://img9.doubanio.com/view/group_topic/l/public/p317684404.webp"',
#                          'img src="https://img1.doubanio.com/view/group_topic/l/public/p317684409.webp"',
#                          'img src="https://img3.doubanio.com/view/group_topic/l/public/p317684401.webp"']}
# sql_query = """insert into api_tractate
#         (user_id,content,is_online,status,platform,content_level,is_excellent,create_time,last_modified,user_del,low_quality,low_quality_deal,platform_id,pgc_type)
#         values ({user_id},'{content}',{is_online},{status},{platform},{content_level},{is_excellent},'{create_time}','{last_modified}',{user_del},{low_quality},{low_quality_deal},'{platform_id}',{pgc_type});""".format(user_id=33524706, content=res_data["content"], is_online=1, status=2, platform=3, content_level=3,
#                    is_excellent=0, create_time=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
#                    last_modified=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"), user_del=0,
#                    low_quality=0, low_quality_deal=0, platform_id=res_data["doc_id"], pgc_type=1)
# res = cur.execute(sql_query)
# # print("最新ID为", int(cur.lastrowid))
# print("插入数据的ID", int(conn.insert_id()))
# # conn.commit()
# conn.commit()
# print(conn)

# print(res)
# cur.ex
# result = cur.fetchall()
# print(result)

#
# sql_query = """
# insert into api_tractate_images (tractate_id,image_url,width,height,image_url_source,image_type,image_webp,create_time,update_time)
# values ({tractate_id},{image_url},{width},{height},{image_url_source},{image_type},{image_webp},{create_time},{update_time})
# """.format(tractate_id,image_url=,width=,height=,image_url_source=,image_type=,update_time=)
from gm_upload import upload, upload_file
dic = {'release_time': 1595998191000, 'fetch_time': 1596012907161, 'url': 'https://www.douban.com/group/topic/186761722/', 'releaser': '三郎', 'repost_count': 0, 'comment_count': 99, 'favorite_count': 99, 'title': '鹿晗的肖枫真的很有人格魅力，又帅又迷人', 'releaserUrl': 'https://www.douban.com/people/62595619', 'releaser_id_str': 'douban_62595619', 'video_img': 'https://img9.doubanio.com/view/group_topic/sqxs/public/p317873386.webp', 'mid': '186761722', 'platform': 'douban', 'doc_id': 'douban_186761722', 'content': '<div id=\'content\'><p data-align="">这个角色比鹿晗演过的任何角色都有魅力</p><p data-align="">玩枪的seven就是最屌的</p><div class="video-wrapper"><div class="video-player-iframe"><iframe allowFullScreen="allowfullscreen" frameBorder="0" height="500" scrolling="no" src="https://player.bilibili.com/player.html?bvid=BV1Hi4y137Em" width="620"></iframe><div class="video-title">【鹿晗】【网剧穿越火线】来自狙神肖枫的“98k”卡点_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili</div></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img9.doubanio.com/view/group_topic/raw/public/p317873386.jpg" data-render-type="gif" src="https://img9.doubanio.com/view/group_topic/l/public/p317873386.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img1.doubanio.com/view/group_topic/raw/public/p317903399.jpg" data-render-type="gif" src="https://img1.doubanio.com/view/group_topic/l/public/p317903399.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img3.doubanio.com/view/group_topic/raw/public/p317873571.jpg" data-render-type="gif" src="https://img3.doubanio.com/view/group_topic/l/public/p317873571.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img3.doubanio.com/view/group_topic/raw/public/p317873470.jpg" data-render-type="gif" src="https://img3.doubanio.com/view/group_topic/l/public/p317873470.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img3.doubanio.com/view/group_topic/raw/public/p317873333.jpg" data-render-type="gif" src="https://img3.doubanio.com/view/group_topic/l/public/p317873333.webp" width="393"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img3.doubanio.com/view/group_topic/raw/public/p317873650.jpg" data-render-type="gif" src="https://img3.doubanio.com/view/group_topic/l/public/p317873650.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img1.doubanio.com/view/group_topic/raw/public/p317873259.jpg" data-render-type="gif" src="https://img1.doubanio.com/view/group_topic/l/public/p317873259.webp" width="500"/></div></div><p data-align="">阿哥阿嫂太甜了</p><div class="video-wrapper"><div class="video-player-iframe"><iframe allowFullScreen="allowfullscreen" frameBorder="0" height="500" scrolling="no" src="https://player.bilibili.com/player.html?bvid=BV1Xf4y1R7ho" width="620"></iframe><div class="video-title">【那些你很冒险的梦】肖枫x安蓝 | 坚持你的梦想，我陪你去疯_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili</div></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img1.doubanio.com/view/group_topic/raw/public/p317879698.jpg" data-render-type="gif" src="https://img1.doubanio.com/view/group_topic/l/public/p317879698.webp" width="360"/></div></div><div class="image-container image-float-center"><div class="image-wrapper"><img src="https://img3.doubanio.com/view/group_topic/l/public/p317873492.webp" width="500"/></div></div><div class="image-container image-float-center"><div class="image-wrapper"><img src="https://img9.doubanio.com/view/group_topic/l/public/p317873485.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img3.doubanio.com/view/group_topic/raw/public/p317873440.jpg" data-render-type="gif" src="https://img3.doubanio.com/view/group_topic/l/public/p317873440.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img3.doubanio.com/view/group_topic/raw/public/p317873192.jpg" data-render-type="gif" src="https://img3.doubanio.com/view/group_topic/l/public/p317873192.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img3.doubanio.com/view/group_topic/raw/public/p317873662.jpg" data-render-type="gif" src="https://img3.doubanio.com/view/group_topic/l/public/p317873662.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img1.doubanio.com/view/group_topic/raw/public/p317873508.jpg" data-render-type="gif" src="https://img1.doubanio.com/view/group_topic/l/public/p317873508.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img1.doubanio.com/view/group_topic/raw/public/p317873588.jpg" data-render-type="gif" src="https://img1.doubanio.com/view/group_topic/l/public/p317873588.webp" width="500"/></div></div><p data-align="">游戏外也是颓废又迷人</p><p data-align="">带路小北踢球</p><p data-align=""><a class="link" href="https://v.douyin.com/J2shMhd/%20" rel="nofollow" target="_blank">【抖音短视频】记录美好生活-Douyin.com douyin.com</a></p><p data-align="">为阿嫂打架的肖枫<a class="link" href="https://m.weibo.cn/6868042261/4531755644095103" rel="nofollow" target="_blank">https://m.weibo.cn/6868042261/4531755644095103</a></p><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img3.doubanio.com/view/group_topic/raw/public/p317879723.jpg" data-render-type="gif" src="https://img3.doubanio.com/view/group_topic/l/public/p317879723.webp" width="500"/></div></div><p data-align="">惹阿嫂生气的肖枫</p><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img1.doubanio.com/view/group_topic/raw/public/p317881727.jpg" data-render-type="gif" src="https://img1.doubanio.com/view/group_topic/l/public/p317881727.webp" width="500"/></div></div><div class="image-container image-float-center"><div class="image-wrapper"><img src="https://img3.doubanio.com/view/group_topic/l/public/p317881761.webp" width="500"/></div></div><div class="image-container image-float-center"><div class="image-wrapper"><img src="https://img1.doubanio.com/view/group_topic/l/public/p317881709.webp" width="500"/></div></div><p data-align="">逗比枫<a class="link" href="https://m.weibo.cn/2819929303/4531402278702829" rel="nofollow" target="_blank">https://m.weibo.cn/2819929303/4531402278702829</a></p><div class="image-container image-float-center"><div class="image-wrapper"><img src="https://img9.doubanio.com/view/group_topic/l/public/p317911254.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img1.doubanio.com/view/group_topic/raw/public/p317911417.jpg" data-render-type="gif" src="https://img1.doubanio.com/view/group_topic/l/public/p317911417.webp" width="360"/></div></div><p data-align="">小人物肖枫</p><div class="image-container image-float-center"><div class="image-wrapper"><img src="https://img1.doubanio.com/view/group_topic/l/public/p317881748.webp" width="500"/></div></div><div class="image-container image-float-center"><div class="image-wrapper"><img src="https://img3.doubanio.com/view/group_topic/l/public/p317881751.webp" width="500"/></div></div><div class="image-container image-float-center"><div class="image-wrapper"><img src="https://img1.doubanio.com/view/group_topic/l/public/p317881757.webp" width="500"/></div></div><div class="image-container image-float-center"><div class="image-wrapper"><img src="https://img9.doubanio.com/view/group_topic/l/public/p317881744.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img9.doubanio.com/view/group_topic/raw/public/p317911344.jpg" data-render-type="gif" src="https://img9.doubanio.com/view/group_topic/l/public/p317911344.webp" width="500"/></div></div><div class="image-container image-float-center image-badge-gif"><div class="image-wrapper"><img data-original-url="https://img1.doubanio.com/view/group_topic/raw/public/p317911457.jpg" data-render-type="gif" src="https://img1.doubanio.com/view/group_topic/l/public/p317911457.webp" width="500"/></div></div><p></p></div>', 'collection_count': 11, 'img_list': ['https://player.bilibili.com/player.html?bvid=BV1Hi4y137Em" width="620"></iframe><div class="video-title', 'https://img9.doubanio.com/view/group_topic/raw/public/p317873386.jpg', 'https://img9.doubanio.com/view/group_topic/l/public/p317873386.webp', 'https://img1.doubanio.com/view/group_topic/raw/public/p317903399.jpg', 'https://img1.doubanio.com/view/group_topic/l/public/p317903399.webp', 'https://img3.doubanio.com/view/group_topic/raw/public/p317873571.jpg', 'https://img3.doubanio.com/view/group_topic/l/public/p317873571.webp', 'https://img3.doubanio.com/view/group_topic/raw/public/p317873470.jpg', 'https://img3.doubanio.com/view/group_topic/l/public/p317873470.webp', 'https://img3.doubanio.com/view/group_topic/raw/public/p317873333.jpg', 'https://img3.doubanio.com/view/group_topic/l/public/p317873333.webp', 'https://img3.doubanio.com/view/group_topic/raw/public/p317873650.jpg', 'https://img3.doubanio.com/view/group_topic/l/public/p317873650.webp', 'https://img1.doubanio.com/view/group_topic/raw/public/p317873259.jpg', 'https://img1.doubanio.com/view/group_topic/l/public/p317873259.webp', 'https://player.bilibili.com/player.html?bvid=BV1Xf4y1R7ho" width="620"></iframe><div class="video-title', 'https://img1.doubanio.com/view/group_topic/raw/public/p317879698.jpg', 'https://img1.doubanio.com/view/group_topic/l/public/p317879698.webp', 'https://img3.doubanio.com/view/group_topic/l/public/p317873492.webp', 'https://img9.doubanio.com/view/group_topic/l/public/p317873485.webp', 'https://img3.doubanio.com/view/group_topic/raw/public/p317873440.jpg', 'https://img3.doubanio.com/view/group_topic/l/public/p317873440.webp', 'https://img3.doubanio.com/view/group_topic/raw/public/p317873192.jpg', 'https://img3.doubanio.com/view/group_topic/l/public/p317873192.webp', 'https://img3.doubanio.com/view/group_topic/raw/public/p317873662.jpg', 'https://img3.doubanio.com/view/group_topic/l/public/p317873662.webp', 'https://img1.doubanio.com/view/group_topic/raw/public/p317873508.jpg', 'https://img1.doubanio.com/view/group_topic/l/public/p317873508.webp', 'https://img1.doubanio.com/view/group_topic/raw/public/p317873588.jpg', 'https://img1.doubanio.com/view/group_topic/l/public/p317873588.webp', 'https://v.douyin.com/J2shMhd/%20" rel="nofollow', 'https://m.weibo.cn/6868042261/4531755644095103" rel="nofollow', 'https://img3.doubanio.com/view/group_topic/raw/public/p317879723.jpg', 'https://img3.doubanio.com/view/group_topic/l/public/p317879723.webp', 'https://img1.doubanio.com/view/group_topic/raw/public/p317881727.jpg', 'https://img1.doubanio.com/view/group_topic/l/public/p317881727.webp', 'https://img3.doubanio.com/view/group_topic/l/public/p317881761.webp', 'https://img1.doubanio.com/view/group_topic/l/public/p317881709.webp', 'https://m.weibo.cn/2819929303/4531402278702829" rel="nofollow', 'https://img9.doubanio.com/view/group_topic/l/public/p317911254.webp', 'https://img1.doubanio.com/view/group_topic/raw/public/p317911417.jpg', 'https://img1.doubanio.com/view/group_topic/l/public/p317911417.webp', 'https://img1.doubanio.com/view/group_topic/l/public/p317881748.webp', 'https://img3.doubanio.com/view/group_topic/l/public/p317881751.webp', 'https://img1.doubanio.com/view/group_topic/l/public/p317881757.webp', 'https://img9.doubanio.com/view/group_topic/l/public/p317881744.webp', 'https://img9.doubanio.com/view/group_topic/raw/public/p317911344.jpg', 'https://img9.doubanio.com/view/group_topic/l/public/p317911344.webp', 'https://img1.doubanio.com/view/group_topic/raw/public/p317911457.jpg', 'https://img1.doubanio.com/view/group_topic/l/public/p317911457.webp'], 'level': 3}
dic = {"release_time": 1596000852000, "fetch_time": 1596012913346, "url": "https://www.douban.com/group/topic/186767781/", "releaser": "\\u6000\\u96ea", "repost_count": 8, "comment_count": 102, "favorite_count": 3, "title": "\\u4e00\\u7ebf\\u57ce\\u5e02\\u629a\\u517b\\u5c0f\\u5b69\\u81f322\\u5c81\\u9700\\u82b1\\u8d3996.8w(\\u4e0d\\u7b97\\u901a\\u80c0\\uff09", "releaserUrl": "https://www.douban.com/people/3355488", "releaser_id_str": "douban_3355488", "video_img": "https://img3.doubanio.com/view/group_topic/sqxs/public/p317893711.webp", "mid": "186767781", "platform": "douban", "doc_id": "douban_186767781", "content": """<div id=\'content\'><div class=\\"image-container image-float-center\\"><div class=\\"image-wrapper\\"><img src=\\"https://img3.doubanio.com/view/group_topic/l/public/p317893711.webp\\" width=\\"500\\"/></div><div class=\\"image-caption-wrapper\\"><div class=\\"image-caption\\">\\u5e73\\u5747\\u6570\\u636e</div></div></div><div class=\\"image-container image-float-center\\"><div class=\\"image-wrapper\\"><img src=\\"https://img1.doubanio.com/view/group_topic/l/public/p317906948.webp\\" width=\\"500\\"/></div><div class=\\"image-caption-wrapper\\"><div class=\\"image-caption\\">\\u4e3b\\u8981\\u6d88\\u8d39\\u7684\\u65b9\\u9762</div></div></div><p>\\u6d88\\u8d39\\u6570\\u636e\\u6765\\u6e90\\u4e8e\\u592e\\u89c6\\u8d22\\u7ecf\\u65b0\\u95fb\\uff0c2019\\u5e74\\u7684\\u6570\\u636e\\uff0c\\u4e0d\\u7b97\\u901a\\u80c0\\uff0c\\u4e00\\u7ebf\\u5e73\\u5747\\u629a\\u517b\\u5230\\u5927\\u5b66\\u6bd5\\u4e1a22\\u5468\\u5c81\\uff0c\\u5171\\u7ea696.8w\\u3002</p><p>2\\u7ebf 80.74w\\n3\\u7ebf 64.68w\\n\\u6d88\\u8d39\\u6295\\u5165\\u65b9\\u5411\\u4e3b\\u8981\\u662f\\u5403\\u7a7f\\u5174\\u8da3\\u4e66\\u7c4d\\u8865\\u4e60\\u3002</p><p>\\u8fd9\\u7b97\\u666e\\u901a\\u7a77\\u517b\\uff0c\\u6ca1\\u6709\\u7b9722\\u5e74\\u7684\\u901a\\u80c0\\u3002\\u622a\\u53d6\\u6570\\u636e\\u4e3b\\u8981\\u662f\\u7ed9\\u5927\\u5bb6\\u770b\\u770b\\u629a\\u517b\\u5c0f\\u670b\\u53cb\\u81f3\\u6210\\u4eba\\u7684\\u7ecf\\u6d4e\\u6210\\u672c\\uff0c\\u5982\\u679c\\u7b97\\u4e0a\\u901a\\u80c0\\uff0c\\u53ef\\u80fd\\u8981\\u4e58\\u4ee52\\u3002</p><p>\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\n</p><div class=\\"image-container image-float-center\\"><div class=\\"image-wrapper\\"><img src=\\"https://img1.doubanio.com/view/group_topic/l/public/p317943668.webp\\" width=\\"500\\"/></div><div class=\\"image-caption-wrapper\\"><div class=\\"image-caption\\">\\u7f51\\u4e0a\\u770b\\u5230\\u7684\\u8868\\u683c\\u53ef\\u4ee5\\u53c2\\u8003\\u4e00\\u4e0b</div></div></div></div>""", "collection_count": 42, "img_list": ["https://img3.doubanio.com/view/group_topic/l/public/p317893711.webp", "https://img1.doubanio.com/view/group_topic/l/public/p317906948.webp", "https://img1.doubanio.com/view/group_topic/l/public/p317943668.webp"]}', b'{"release_time": 1596000852000, "fetch_time": 1596012900029, "url": "https://www.douban.com/group/topic/186767781/", "releaser": "\\u6000\\u96ea", "repost_count": 8, "comment_count": 102, "favorite_count": 3, "title": "\\u4e00\\u7ebf\\u57ce\\u5e02\\u629a\\u517b\\u5c0f\\u5b69\\u81f322\\u5c81\\u9700\\u82b1\\u8d3996.8w(\\u4e0d\\u7b97\\u901a\\u80c0\\uff09", "releaserUrl": "https://www.douban.com/people/3355488", "releaser_id_str": "douban_3355488", "video_img": "https://img3.doubanio.com/view/group_topic/sqxs/public/p317893711.webp", "mid": "186767781", "platform": "douban", "doc_id": "douban_186767781", "content": "<div id=\'content\'><div class=\\"image-container image-float-center\\"><div class=\\"image-wrapper\\"><img src=\\"https://img3.doubanio.com/view/group_topic/l/public/p317893711.webp\\" width=\\"500\\"/></div><div class=\\"image-caption-wrapper\\"><div class=\\"image-caption\\">\\u5e73\\u5747\\u6570\\u636e</div></div></div><div class=\\"image-container image-float-center\\"><div class=\\"image-wrapper\\"><img src=\\"https://img1.doubanio.com/view/group_topic/l/public/p317906948.webp\\" width=\\"500\\"/></div><div class=\\"image-caption-wrapper\\"><div class=\\"image-caption\\">\\u4e3b\\u8981\\u6d88\\u8d39\\u7684\\u65b9\\u9762</div></div></div><p>\\u6d88\\u8d39\\u6570\\u636e\\u6765\\u6e90\\u4e8e\\u592e\\u89c6\\u8d22\\u7ecf\\u65b0\\u95fb\\uff0c2019\\u5e74\\u7684\\u6570\\u636e\\uff0c\\u4e0d\\u7b97\\u901a\\u80c0\\uff0c\\u4e00\\u7ebf\\u5e73\\u5747\\u629a\\u517b\\u5230\\u5927\\u5b66\\u6bd5\\u4e1a22\\u5468\\u5c81\\uff0c\\u5171\\u7ea696.8w\\u3002</p><p>2\\u7ebf 80.74w\\n3\\u7ebf 64.68w\\n\\u6d88\\u8d39\\u6295\\u5165\\u65b9\\u5411\\u4e3b\\u8981\\u662f\\u5403\\u7a7f\\u5174\\u8da3\\u4e66\\u7c4d\\u8865\\u4e60\\u3002</p><p>\\u8fd9\\u7b97\\u666e\\u901a\\u7a77\\u517b\\uff0c\\u6ca1\\u6709\\u7b9722\\u5e74\\u7684\\u901a\\u80c0\\u3002\\u622a\\u53d6\\u6570\\u636e\\u4e3b\\u8981\\u662f\\u7ed9\\u5927\\u5bb6\\u770b\\u770b\\u629a\\u517b\\u5c0f\\u670b\\u53cb\\u81f3\\u6210\\u4eba\\u7684\\u7ecf\\u6d4e\\u6210\\u672c\\uff0c\\u5982\\u679c\\u7b97\\u4e0a\\u901a\\u80c0\\uff0c\\u53ef\\u80fd\\u8981\\u4e58\\u4ee52\\u3002</p><p>\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\uff0d\\n</p><div class=\\"image-container image-float-center\\"><div class=\\"image-wrapper\\"><img src=\\"https://img1.doubanio.com/view/group_topic/l/public/p317943668.webp\\" width=\\"500\\"/></div><div class=\\"image-caption-wrapper\\"><div class=\\"image-caption\\">\\u7f51\\u4e0a\\u770b\\u5230\\u7684\\u8868\\u683c\\u53ef\\u4ee5\\u53c2\\u8003\\u4e00\\u4e0b</div></div></div></div>", "collection_count": 42, "img_list": ["https://img3.doubanio.com/view/group_topic/l/public/p317893711.webp", "https://img1.doubanio.com/view/group_topic/l/public/p317906948.webp", "https://img1.doubanio.com/view/group_topic/l/public/p317943668.webp"]}
res = upload_file("D:\lemo下载\p317377995.jpg")
print(res)