|
@@ -56,20 +56,12 @@ class UpdateAvgDaily(object):
|
|
|
:return:
|
|
|
"""
|
|
|
sql = f"""
|
|
|
- SELECT t1.`name`,t1.gh_id, t1.follower_count
|
|
|
+ SELECT t1.`name`, t1.gh_id, t1.follower_count, t3.account_type
|
|
|
FROM `publish_account` t1
|
|
|
JOIN wx_statistics_group_source_account t2
|
|
|
- ON t1.id = t2.account_id
|
|
|
- UNION
|
|
|
- SELECT t1.`name`, t1.gh_id, t1.follower_count
|
|
|
- FROM `publish_account` t1
|
|
|
- where t1.`name` in (
|
|
|
- '晚年家人',
|
|
|
- '历史长河流淌',
|
|
|
- '史趣探秘',
|
|
|
- '暖心一隅',
|
|
|
- '小阳看天下',
|
|
|
- '小惠爱厨房');
|
|
|
+ ON t1.id = t2.account_id
|
|
|
+ JOIN wx_statistics_group_source t3
|
|
|
+ ON t2.group_source_name = t3.account_source_name
|
|
|
"""
|
|
|
response = cls.deNetClient.select(sql)
|
|
|
L = []
|
|
@@ -77,9 +69,15 @@ class UpdateAvgDaily(object):
|
|
|
temp = {
|
|
|
"accountName": item[0],
|
|
|
"ghId": item[1],
|
|
|
- "fans": item[2]
|
|
|
+ "fans": item[2],
|
|
|
+ "accountType": item[3]
|
|
|
}
|
|
|
- L.append(temp)
|
|
|
+ if temp["accountName"] in ['口琴', '二胡']:
|
|
|
+ continue
|
|
|
+ elif temp["accountType"] == '服务号':
|
|
|
+ continue
|
|
|
+ else:
|
|
|
+ L.append(temp)
|
|
|
return L
|
|
|
|
|
|
@classmethod
|
|
@@ -231,6 +229,7 @@ def updateAvgJob():
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
+ # updateAvgJob()
|
|
|
schedule.every().day.at("22:30").do(Functions().job_with_thread, updateAvgJob)
|
|
|
|
|
|
while True:
|