| 1234567891011121314151617181920212223242526272829 | 
							- # Author renyupeng
 
- # coding=utf-8
 
- # @Time    : 2023/2/27 2:16 下午
 
- # @Site    : 
 
- # @File    : cookie_update.py
 
- # @Software: PyCharm
 
- # @contact: renyupeng@c-top.com.cn
 
- # @Tel 1501435553
 
- from utils.mysql_utils import MysqlUtils
 
- class douyin_cookie_update:
 
-     @staticmethod
 
-     def get_cookie_handler():
 
-         sql = "select cookie ,phone_num from kwai_promoter.douyin_supply_chain_cookie where status =0"
 
-         result = MysqlUtils().QueryOne(sql)
 
-         print(result)
 
-         return result
 
-     @staticmethod
 
-     def update_cookie_handler(phone_num):
 
-         sql = "update kwai_promoter.douyin_supply_chain_cookie set status=2 where phone_num={phone_num}".format(
 
-             phone_num=phone_num)
 
-         MysqlUtils().Operate(sql=sql, params=None, DML=True)
 
- if __name__ == '__main__':
 
-     douyin_cookie_update().get_cookie_handler()
 
 
  |