gongzhonghao1_author.py 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. # -*- coding: utf-8 -*-
  2. # @Author: wangkun
  3. # @Time: 2023/3/28
  4. import datetime
  5. import json
  6. import os
  7. import shutil
  8. import sys
  9. import time
  10. from hashlib import md5
  11. import requests
  12. import urllib3
  13. from selenium.webdriver import DesiredCapabilities
  14. from selenium.webdriver.chrome.service import Service
  15. from selenium.webdriver.common.by import By
  16. from selenium import webdriver
  17. sys.path.append(os.getcwd())
  18. from common.common import Common
  19. from common.feishu import Feishu
  20. from common.publish import Publish
  21. # from common.getuser import getUser
  22. from common.scheduling_db import MysqlHelper
  23. from common.public import get_config_from_mysql, download_rule, title_like
  24. class GongzhonghaoAuthor1:
  25. platform = "公众号"
  26. # 获取 token
  27. @classmethod
  28. def get_token(cls, log_type, crawler, env):
  29. select_sql = f""" select * from crawler_config where source="{crawler}" and title LIKE "%公众号_1%";"""
  30. configs = MysqlHelper.get_values(log_type, crawler, select_sql, env, action="")
  31. if len(configs) == 0:
  32. Feishu.bot(log_type, crawler, "公众号_1:未配置token")
  33. time.sleep(60)
  34. return None
  35. token_dict = {
  36. "token_id": configs[0]["id"],
  37. "title": configs[0]["title"].strip(),
  38. "token": dict(eval(configs[0]["config"]))["token"].strip(),
  39. "cookie": dict(eval(configs[0]["config"]))["cookie"].strip(),
  40. "update_time": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(int(configs[0]["update_time"]/1000))),
  41. "operator": configs[0]["operator"].strip()
  42. }
  43. # for k, v in token_dict.items():
  44. # print(f"{k}:{type(v)}, {v}")
  45. return token_dict
  46. @classmethod
  47. def get_users(cls, log_type, crawler, user_sheet, sheetid, i, env):
  48. user_name = user_sheet[i][0]
  49. wechat_name = user_sheet[i][2]
  50. if wechat_name is None or wechat_name.strip() == "" or wechat_name.replace(" ", "") == "":
  51. wechat_name = user_name
  52. out_uid = user_sheet[i][3]
  53. avatar_url = user_sheet[i][4]
  54. if out_uid is None or out_uid.strip() == "" or out_uid.replace(" ", "") == "":
  55. user_info_dict = cls.get_user_info(log_type=log_type, crawler=crawler, wechat_name=wechat_name, env=env)
  56. out_uid = user_info_dict["user_id"]
  57. avatar_url = user_info_dict["avatar_url"]
  58. Feishu.update_values(log_type, crawler, sheetid, f'D{i + 1}:E{i + 1}', [[out_uid, avatar_url]])
  59. our_user_dict = {
  60. 'user_name': user_name,
  61. 'user_id': out_uid,
  62. 'wechat_name': wechat_name,
  63. 'avatar_url': avatar_url,
  64. }
  65. for k, v in our_user_dict.items():
  66. Common.logger(log_type, crawler).info(f"{k}:{v}")
  67. return our_user_dict
  68. # 获取用户 fakeid
  69. @classmethod
  70. def get_user_info(cls, log_type, crawler, wechat_name, env):
  71. Common.logger(log_type, crawler).info(f"获取站外用户信息:{wechat_name}")
  72. while True:
  73. token_dict = cls.get_token(log_type, crawler, env)
  74. url = "https://mp.weixin.qq.com/cgi-bin/searchbiz?"
  75. headers = {
  76. "accept": "*/*",
  77. "accept-encoding": "gzip, deflate, br",
  78. "accept-language": "zh-CN,zh;q=0.9",
  79. "referer": "https://mp.weixin.qq.com/cgi-bin/appmsg?"
  80. "t=media/appmsg_edit_v2&action=edit&isNew=1"
  81. "&type=77&createType=5&token=1011071554&lang=zh_CN",
  82. 'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100"',
  83. "sec-ch-ua-mobile": "?0",
  84. "sec-ch-ua-platform": '"Windows"',
  85. "sec-fetch-dest": "empty",
  86. "sec-fetch-mode": "cors",
  87. "sec-fetch-site": "same-origin",
  88. "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
  89. " (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36",
  90. "x-requested-with": "XMLHttpRequest",
  91. 'cookie': token_dict['cookie'],
  92. }
  93. params = {
  94. "action": "search_biz",
  95. "begin": "0",
  96. "count": "5",
  97. "query": str(wechat_name),
  98. "token": token_dict['token'],
  99. "lang": "zh_CN",
  100. "f": "json",
  101. "ajax": "1",
  102. }
  103. urllib3.disable_warnings()
  104. r = requests.get(url=url, headers=headers, params=params, verify=False)
  105. r.close()
  106. if r.json()["base_resp"]["err_msg"] == "invalid session":
  107. Common.logger(log_type, crawler).warning(f"status_code:{r.status_code}")
  108. Common.logger(log_type, crawler).warning(f"get_fakeid:{r.text}\n")
  109. if 20 >= datetime.datetime.now().hour >= 10:
  110. Feishu.bot(log_type, crawler, f"{token_dict['title']}\n操作人:{token_dict['operator']}\n更换日期:{token_dict['update_time']} \n过期啦,请扫码更换token\nhttps://mp.weixin.qq.com/")
  111. time.sleep(60 * 10)
  112. continue
  113. if r.json()["base_resp"]["err_msg"] == "freq control":
  114. Common.logger(log_type, crawler).warning(f"status_code:{r.status_code}")
  115. Common.logger(log_type, crawler).warning(f"get_fakeid:{r.text}\n")
  116. if 20 >= datetime.datetime.now().hour >= 10:
  117. Feishu.bot(log_type, crawler, f"{token_dict['title']}\n操作人:{token_dict['operator']}\n更换日期:{token_dict['update_time']} \n频控啦,请扫码更换其他公众号token\nhttps://mp.weixin.qq.com/")
  118. time.sleep(60 * 10)
  119. continue
  120. if "list" not in r.json() or len(r.json()["list"]) == 0:
  121. Common.logger(log_type, crawler).warning(f"status_code:{r.status_code}")
  122. Common.logger(log_type, crawler).warning(f"get_fakeid:{r.text}\n")
  123. if 20 >= datetime.datetime.now().hour >= 10:
  124. Feishu.bot(log_type, crawler, f"{token_dict['title']}\n操作人:{token_dict['operator']}\n更换日期:{token_dict['update_time']} \n频控啦,请扫码更换其他公众号token\nhttps://mp.weixin.qq.com/")
  125. time.sleep(60 * 10)
  126. continue
  127. user_info_dict = {'user_name': r.json()["list"][0]["nickname"],
  128. 'user_id': r.json()["list"][0]["fakeid"],
  129. 'avatar_url': r.json()["list"][0]["round_head_img"]}
  130. return user_info_dict
  131. # 获取腾讯视频下载链接
  132. @classmethod
  133. def get_tencent_video_url(cls, video_id):
  134. url = 'https://vv.video.qq.com/getinfo?vids=' + str(video_id) + '&platform=101001&charge=0&otype=json'
  135. response = requests.get(url=url).text.replace('QZOutputJson=', '').replace('"};', '"}')
  136. response = json.loads(response)
  137. url = response['vl']['vi'][0]['ul']['ui'][0]['url']
  138. fvkey = response['vl']['vi'][0]['fvkey']
  139. video_url = url + str(video_id) + '.mp4?vkey=' + fvkey
  140. return video_url
  141. @classmethod
  142. def get_video_url(cls, article_url, env):
  143. # 打印请求配置
  144. ca = DesiredCapabilities.CHROME
  145. ca["goog:loggingPrefs"] = {"performance": "ALL"}
  146. # 不打开浏览器运行
  147. chrome_options = webdriver.ChromeOptions()
  148. chrome_options.add_argument("headless")
  149. chrome_options.add_argument(
  150. f'user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36')
  151. chrome_options.add_argument("--no-sandbox")
  152. # driver初始化
  153. if env == "prod":
  154. driver = webdriver.Chrome(desired_capabilities=ca, options=chrome_options)
  155. else:
  156. driver = webdriver.Chrome(desired_capabilities=ca, options=chrome_options, service=Service(
  157. '/Users/wangkun/Downloads/chromedriver/chromedriver_v113/chromedriver'))
  158. driver.implicitly_wait(10)
  159. driver.get(article_url)
  160. time.sleep(1)
  161. if len(driver.find_elements(By.XPATH, '//div[@class="js_video_poster video_poster"]/*[2]')) != 0:
  162. video_url = driver.find_element(
  163. By.XPATH, '//div[@class="js_video_poster video_poster"]/*[2]').get_attribute('src')
  164. elif len(driver.find_elements(By.XPATH, '//span[@class="js_tx_video_container"]/*[1]')) != 0:
  165. iframe = driver.find_element(By.XPATH, '//span[@class="js_tx_video_container"]/*[1]').get_attribute(
  166. 'src')
  167. video_id = iframe.split('vid=')[-1].split('&')[0]
  168. video_url = cls.get_tencent_video_url(video_id)
  169. else:
  170. video_url = 0
  171. driver.quit()
  172. return video_url
  173. # 获取文章列表
  174. @classmethod
  175. def get_videoList(cls, log_type, crawler, rule_dict, user_dict, env):
  176. begin = 0
  177. while True:
  178. token_dict = cls.get_token(log_type, crawler, env)
  179. url = "https://mp.weixin.qq.com/cgi-bin/appmsg?"
  180. headers = {
  181. "accept": "*/*",
  182. "accept-encoding": "gzip, deflate, br",
  183. "accept-language": "zh-CN,zh;q=0.9",
  184. "referer": "https://mp.weixin.qq.com/cgi-bin/appmsg?"
  185. "t=media/appmsg_edit_v2&action=edit&isNew=1"
  186. "&type=77&createType=5&token=" + str(token_dict['token']) + "&lang=zh_CN",
  187. 'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100"',
  188. "sec-ch-ua-mobile": "?0",
  189. "sec-ch-ua-platform": '"Windows"',
  190. "sec-fetch-dest": "empty",
  191. "sec-fetch-mode": "cors",
  192. "sec-fetch-site": "same-origin",
  193. "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
  194. " (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36",
  195. "x-requested-with": "XMLHttpRequest",
  196. 'cookie': token_dict['cookie'],
  197. }
  198. params = {
  199. "action": "list_ex",
  200. "begin": str(begin),
  201. "count": "5",
  202. "fakeid": user_dict['user_id'],
  203. "type": "9",
  204. "query": "",
  205. "token": str(token_dict['token']),
  206. "lang": "zh_CN",
  207. "f": "json",
  208. "ajax": "1",
  209. }
  210. urllib3.disable_warnings()
  211. r = requests.get(url=url, headers=headers, params=params, verify=False)
  212. r.close()
  213. if r.json()["base_resp"]["err_msg"] == "invalid session":
  214. Common.logger(log_type, crawler).warning(f"status_code:{r.status_code}")
  215. Common.logger(log_type, crawler).warning(f"get_videoList:{r.text}\n")
  216. if 20 >= datetime.datetime.now().hour >= 10:
  217. Feishu.bot(log_type, crawler, f"{token_dict['title']}\n操作人:{token_dict['operator']}\n更换日期:{token_dict['update_time']}\n过期啦,请扫码更换token\nhttps://mp.weixin.qq.com/")
  218. time.sleep(60 * 10)
  219. continue
  220. if r.json()["base_resp"]["err_msg"] == "freq control":
  221. Common.logger(log_type, crawler).warning(f"status_code:{r.status_code}")
  222. Common.logger(log_type, crawler).warning(f"get_videoList:{r.text}\n")
  223. if 20 >= datetime.datetime.now().hour >= 10:
  224. Feishu.bot(log_type, crawler,f"{token_dict['title']}\n操作人:{token_dict['operator']}\n更换日期:{token_dict['update_time']} \n频控啦,请扫码更换其他公众号token\nhttps://mp.weixin.qq.com/")
  225. time.sleep(60 * 10)
  226. continue
  227. if 'app_msg_list' not in r.json():
  228. Common.logger(log_type, crawler).warning(f"status_code:{r.status_code}")
  229. Common.logger(log_type, crawler).warning(f"get_videoList:{r.text}\n")
  230. if 20 >= datetime.datetime.now().hour >= 10:
  231. Feishu.bot(log_type, crawler, f"{token_dict['title']}\n操作人:{token_dict['operator']}\n更换日期:{token_dict['update_time']}\n频控啦,请扫码更换其他公众号token\nhttps://mp.weixin.qq.com/")
  232. time.sleep(60 * 10)
  233. continue
  234. if len(r.json()['app_msg_list']) == 0:
  235. Common.logger(log_type, crawler).info('没有更多视频了\n')
  236. return
  237. else:
  238. begin += 5
  239. app_msg_list = r.json()['app_msg_list']
  240. for article in app_msg_list:
  241. try:
  242. create_time = article.get('create_time', 0)
  243. publish_time_stamp = int(create_time)
  244. publish_time_str = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(publish_time_stamp))
  245. article_url = article.get('link', '')
  246. video_dict = {
  247. 'video_id': article.get('aid', ''),
  248. 'video_title': article.get("title", "").replace(' ', '').replace('"', '').replace("'", ""),
  249. 'publish_time_stamp': publish_time_stamp,
  250. 'publish_time_str': publish_time_str,
  251. 'user_name': user_dict["user_name"],
  252. 'play_cnt': 0,
  253. 'comment_cnt': 0,
  254. 'like_cnt': 0,
  255. 'share_cnt': 0,
  256. 'user_id': user_dict['user_id'],
  257. 'avatar_url': user_dict['avatar_url'],
  258. 'cover_url': article.get('cover', ''),
  259. 'article_url': article.get('link', ''),
  260. 'video_url': cls.get_video_url(article_url, env),
  261. 'session': f'gongzhonghao-author1-{int(time.time())}'
  262. }
  263. for k, v in video_dict.items():
  264. Common.logger(log_type, crawler).info(f"{k}:{v}")
  265. if int(time.time()) - publish_time_stamp > 3600 * 24 * int(rule_dict.get('period', {}).get('max', 1000)):
  266. Common.logger(log_type, crawler).info(f"发布时间超过{int(rule_dict.get('period', {}).get('max', 1000))}天\n")
  267. return
  268. if video_dict['article_url'] == 0 or video_dict['video_url'] == 0:
  269. Common.logger(log_type, crawler).info("文章涉嫌违反相关法律法规和政策\n")
  270. # 标题敏感词过滤
  271. elif any(str(word) if str(word) in video_dict['video_title'] else False
  272. for word in get_config_from_mysql(log_type=log_type,
  273. source=crawler,
  274. env=env,
  275. text="filter",
  276. action="")) is True:
  277. Common.logger(log_type, crawler).info("标题已中过滤词\n")
  278. # 已下载判断
  279. elif cls.repeat_video(log_type, crawler, video_dict['video_id'], env) != 0:
  280. Common.logger(log_type, crawler).info("视频已下载\n")
  281. # 标题相似度
  282. elif title_like(log_type, crawler, video_dict['video_title'], cls.platform, env) is True:
  283. Common.logger(log_type, crawler).info(f'标题相似度>=80%:{video_dict["video_title"]}\n')
  284. else:
  285. cls.download_publish(log_type=log_type,
  286. crawler=crawler,
  287. video_dict=video_dict,
  288. rule_dict=rule_dict,
  289. # user_dict=user_dict,
  290. env=env)
  291. except Exception as e:
  292. Common.logger(log_type, crawler).error(f"抓取单条视频异常:{e}\n")
  293. Common.logger(log_type, crawler).info('休眠 60 秒\n')
  294. time.sleep(60)
  295. @classmethod
  296. def repeat_video(cls, log_type, crawler, video_id, env):
  297. sql = f""" select * from crawler_video where platform="公众号" and out_video_id="{video_id}"; """
  298. repeat_video = MysqlHelper.get_values(log_type, crawler, sql, env)
  299. return len(repeat_video)
  300. # 下载/上传
  301. @classmethod
  302. def download_publish(cls, log_type, crawler, video_dict, rule_dict, env):
  303. # 下载视频
  304. Common.download_method(log_type=log_type, crawler=crawler, text="video", title=video_dict["video_title"], url=video_dict["video_url"])
  305. md_title = md5(video_dict['video_title'].encode('utf8')).hexdigest()
  306. try:
  307. if os.path.getsize(f"./{crawler}/videos/{md_title}/video.mp4") == 0:
  308. # 删除视频文件夹
  309. shutil.rmtree(f"./{crawler}/videos/{md_title}")
  310. Common.logger(log_type, crawler).info("视频size=0,删除成功\n")
  311. return
  312. except FileNotFoundError:
  313. # 删除视频文件夹
  314. shutil.rmtree(f"./{crawler}/videos/{md_title}")
  315. Common.logger(log_type, crawler).info("视频文件不存在,删除文件夹成功\n")
  316. return
  317. # 获取视频时长
  318. ffmpeg_dict = Common.ffmpeg(log_type, crawler, f"./{crawler}/videos/{video_dict['video_title']}/video.mp4")
  319. video_dict["video_width"] = ffmpeg_dict["width"]
  320. video_dict["video_height"] = ffmpeg_dict["height"]
  321. video_dict["duration"] = ffmpeg_dict["duration"]
  322. Common.logger(log_type, crawler).info(f'video_width:{video_dict["video_width"]}')
  323. Common.logger(log_type, crawler).info(f'video_height:{video_dict["video_height"]}')
  324. Common.logger(log_type, crawler).info(f'duration:{video_dict["duration"]}')
  325. if download_rule(log_type, crawler, video_dict, rule_dict) is False:
  326. shutil.rmtree(f"./{crawler}/videos/{md_title}")
  327. Common.logger(log_type, crawler).info("不满足抓取规则,删除成功\n")
  328. return
  329. # 下载封面
  330. Common.download_method(log_type=log_type, crawler=crawler, text="cover",
  331. title=video_dict["video_title"], url=video_dict["cover_url"])
  332. # 保存视频信息至 "./videos/{video_title}/info.txt"
  333. Common.save_video_info(log_type=log_type, crawler=crawler, video_dict=video_dict)
  334. # 上传视频
  335. Common.logger(log_type, crawler).info("开始上传视频...")
  336. strategy = "定向爬虫策略"
  337. if env == 'prod':
  338. oss_endpoint = "inner"
  339. our_video_id = Publish.upload_and_publish(log_type=log_type,
  340. crawler=crawler,
  341. strategy=strategy,
  342. our_uid="follow",
  343. oss_endpoint=oss_endpoint,
  344. env=env)
  345. our_video_link = f"https://admin.piaoquantv.com/cms/post-detail/{str(our_video_id)}/info"
  346. else:
  347. oss_endpoint = "out"
  348. our_video_id = Publish.upload_and_publish(log_type=log_type,
  349. crawler=crawler,
  350. strategy=strategy,
  351. our_uid="follow",
  352. oss_endpoint=oss_endpoint,
  353. env=env)
  354. our_video_link = f"https://testadmin.piaoquantv.com/cms/post-detail/{str(our_video_id)}/info"
  355. if our_video_id is None:
  356. try:
  357. # 删除视频文件夹
  358. shutil.rmtree(f"./{crawler}/videos/{md_title}")
  359. return
  360. except FileNotFoundError:
  361. return
  362. insert_sql = f""" insert into crawler_video(video_id,
  363. out_user_id,
  364. platform,
  365. strategy,
  366. out_video_id,
  367. video_title,
  368. cover_url,
  369. video_url,
  370. duration,
  371. publish_time,
  372. play_cnt,
  373. crawler_rule,
  374. width,
  375. height)
  376. values({our_video_id},
  377. "{video_dict['user_id']}",
  378. "{cls.platform}",
  379. "定向爬虫策略",
  380. "{video_dict['video_id']}",
  381. "{video_dict['video_title']}",
  382. "{video_dict['cover_url']}",
  383. "{video_dict['video_url']}",
  384. {int(video_dict['duration'])},
  385. "{video_dict['publish_time_str']}",
  386. {int(video_dict['play_cnt'])},
  387. '{json.dumps(rule_dict)}',
  388. {int(video_dict['video_width'])},
  389. {int(video_dict['video_height'])}) """
  390. Common.logger(log_type, crawler).info(f"insert_sql:{insert_sql}")
  391. MysqlHelper.update_values(log_type, crawler, insert_sql, env)
  392. Common.logger(log_type, crawler).info('视频信息写入数据库成功')
  393. # 视频写入飞书
  394. Feishu.insert_columns(log_type, crawler, "47e39d", "ROWS", 1, 2)
  395. # 视频ID工作表,首行写入数据
  396. upload_time = int(time.time())
  397. values = [[time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(upload_time)),
  398. "用户主页",
  399. video_dict['video_title'],
  400. video_dict['video_id'],
  401. our_video_link,
  402. int(video_dict['duration']),
  403. f"{video_dict['video_width']}*{video_dict['video_height']}",
  404. video_dict['publish_time_str'],
  405. video_dict['user_name'],
  406. video_dict['user_id'],
  407. video_dict['avatar_url'],
  408. video_dict['cover_url'],
  409. video_dict['article_url'],
  410. video_dict['video_url']]]
  411. time.sleep(0.5)
  412. Feishu.update_values(log_type, crawler, "47e39d", "F2:Z2", values)
  413. Common.logger(log_type, crawler).info('视频下载/上传成功\n')
  414. @classmethod
  415. def get_all_videos(cls, log_type, crawler, rule_dict, env):
  416. while True:
  417. sheetid = "Bzv72P"
  418. user_sheet = Feishu.get_values_batch(log_type, crawler, sheetid)
  419. if user_sheet is None:
  420. Common.logger(log_type, crawler).warning(f"user_sheet:{user_sheet}, 2秒后重试")
  421. time.sleep(2)
  422. continue
  423. len_sheet = len(user_sheet)
  424. if len_sheet >= 101:
  425. len_sheet = 101
  426. for i in range(1, len_sheet):
  427. user_dict = cls.get_users(log_type=log_type,
  428. crawler=crawler,
  429. user_sheet=user_sheet,
  430. sheetid=sheetid,
  431. i=i,
  432. env=env)
  433. Common.logger(log_type, crawler).info(f'获取 {user_dict["user_name"]} 公众号视频\n')
  434. try:
  435. cls.get_videoList(log_type=log_type,
  436. crawler=crawler,
  437. rule_dict=rule_dict,
  438. user_dict=user_dict,
  439. env=env)
  440. Common.logger(log_type, crawler).info('休眠 60 秒\n')
  441. time.sleep(60)
  442. except Exception as e:
  443. Common.logger(log_type, crawler).info(f'抓取{user_dict["user_name"]}公众号时异常:{e}\n')
  444. if __name__ == "__main__":
  445. # GongzhonghaoAuthor1.get_token("author", "gongzhonghao", "prod")
  446. # print(GongzhonghaoAuthor1.get_users("author", "gongzhonghao", "Bzv72P", "dev"))
  447. # print(get_config_from_mysql("author", "gongzhonghao", "dev", "filter", action=""))
  448. # print(title_like("author", "gongzhonghao", "公众号", "123", "dev"))
  449. print(GongzhonghaoAuthor1.get_user_info("author", "gongzhonghao", "幸福花朵", "dev"))
  450. pass