mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-19 18:24:51 +08:00
抖店精选联盟数据
This commit is contained in:
parent
6afa60b5d6
commit
ea8cff0db3
@ -23,7 +23,7 @@ class CleanBuyinContactInfo(Base):
|
||||
"uid": deduplication.replace("uid=", ""),
|
||||
"times_left": contact_info.get('times_left'),
|
||||
"contact_value": contact_info.get('contact_value'),
|
||||
"deduplication": deduplication + '×_left=' + str(contact_info.get('times_left')),
|
||||
"deduplication": deduplication + '&contact_value=' + str(contact_info.get('contact_value')),
|
||||
"spider_time": update_time
|
||||
}
|
||||
list_res.append(item)
|
||||
|
@ -57,17 +57,16 @@ class BrowserBaiyin(Base):
|
||||
deduplication = project_item[3]
|
||||
self.browser.get(payload_get)
|
||||
time.sleep(15)
|
||||
elements_img = self.browser.find_elements(By.XPATH, '//div[@class="contact_way_info_block_item"]'
|
||||
elements_img_list = self.browser.find_elements(By.XPATH, '//div[@class="contact_way_info_block_item"]'
|
||||
'//img[@elementtiming="element-timing"]')
|
||||
elements_img[0].click()
|
||||
for elements_img in elements_img_list:
|
||||
elements_img.click()
|
||||
time.sleep(5)
|
||||
elements_ck = self.browser.find_elements(By.XPATH, '//button[@class="auxo-btn auxo-btn-primary"]'
|
||||
'/span[text()="查看"]')
|
||||
if elements_ck:
|
||||
elements_ck[0].click()
|
||||
|
||||
if len(elements_img) > 1:
|
||||
elements_img[1].click()
|
||||
time.sleep(5)
|
||||
sql = f"SELECT task_id FROM {self.table} where deduplication = '{deduplication}' limit 1"
|
||||
msg = self.eb_supports.query(sql)
|
||||
|
@ -16,7 +16,7 @@ class 精选联盟达人清单(Base):
|
||||
pf = pd.DataFrame(list(export))
|
||||
columns = ['抖音账户', '抖音ID', '等级LV', '粉丝数', '地址', '主推类目', '直播带货销售占比', '带货直播场次',
|
||||
'带货直播观看人数', '场均销售额', '直播GPM', '视频带货销售额占比', '带货视频数量', '带货视频播放量',
|
||||
'单视频销售额', '视频GPM']
|
||||
'单视频销售额', '视频GPM', '手机号', '微信号']
|
||||
pf.columns = columns
|
||||
file_path = pd.ExcelWriter('../file/name.xlsx')
|
||||
# 替换空单元格
|
||||
@ -29,12 +29,12 @@ class 精选联盟达人清单(Base):
|
||||
def get_res(self):
|
||||
sql = f"""
|
||||
SELECT
|
||||
nickname as '抖音账户',
|
||||
account_douyin as '抖音ID',
|
||||
LEVEL as '等级LV',
|
||||
fans_sum as '粉丝数',
|
||||
city as '地址',
|
||||
product_main_type as '主推类目',
|
||||
nickname AS '抖音账户',
|
||||
account_douyin AS '抖音ID',
|
||||
LEVEL AS '等级LV',
|
||||
fans_sum AS '粉丝数',
|
||||
city AS '地址',
|
||||
product_main_type AS '主推类目',
|
||||
b.`直播带货销售占比`,
|
||||
b.`带货直播场次`,
|
||||
b.`带货直播观看人数`,
|
||||
@ -44,24 +44,37 @@ class 精选联盟达人清单(Base):
|
||||
b.`带货视频数量`,
|
||||
b.`带货视频播放量`,
|
||||
b.`单视频销售额`,
|
||||
b.`视频GPM`
|
||||
b.`视频GPM`,
|
||||
b.`手机号`,
|
||||
b.`微信号`
|
||||
FROM
|
||||
clean_buyin_authorStatData_authorProfile c
|
||||
RIGHT JOIN (
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
k.uid AS uid,
|
||||
live_data_percentage AS '直播带货销售占比',
|
||||
live_data_count AS '带货直播场次',
|
||||
live_data_watching_num AS '带货直播观看人数',
|
||||
concat_ws( '-', live_data_sale_low, live_data_sale_high ) AS '场均销售额',
|
||||
concat_ws( '-', live_data_GPM_low, live_data_GPM_high ) AS '直播GPM',
|
||||
video_data_percentage AS '视频带货销售额占比',
|
||||
video_data_count AS '带货视频数量',
|
||||
video_data_watching_num AS '带货视频播放量',
|
||||
concat_ws( '-', video_data_sale_low, video_data_sale_high ) AS '单视频销售额',
|
||||
concat_ws( '-', video_data_GPM_low, video_data_sale_high ) AS '视频GPM',
|
||||
z.`手机号` AS '手机号',
|
||||
z.`微信号` AS '微信号'
|
||||
FROM
|
||||
clean_buyin_authorStatData_authorOverviewV2 k
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
uid,
|
||||
live_data_percentage as '直播带货销售占比',
|
||||
live_data_count as '带货直播场次',
|
||||
live_data_watching_num as '带货直播观看人数',
|
||||
concat_ws('-', live_data_sale_low, live_data_sale_high) as '场均销售额',
|
||||
concat_ws('-', live_data_GPM_low, live_data_GPM_high) as '直播GPM',
|
||||
video_data_percentage as '视频带货销售额占比',
|
||||
video_data_count as '带货视频数量',
|
||||
video_data_watching_num as '带货视频播放量',
|
||||
concat_ws('-', video_data_sale_low, video_data_sale_high) as '单视频销售额',
|
||||
concat_ws('-', video_data_GPM_low, video_data_sale_high) as '视频GPM'
|
||||
max( CASE WHEN contact_value REGEXP '^[0-9]+$' THEN contact_value ELSE '' END ) AS '手机号',
|
||||
max( CASE WHEN contact_value REGEXP '^[0-9]+$' THEN '' ELSE contact_value END ) AS '微信号'
|
||||
FROM
|
||||
clean_buyin_authorStatData_authorOverviewV2
|
||||
clean_buyin_contact_info
|
||||
GROUP BY uid
|
||||
) z ON k.uid = z.uid
|
||||
) b ON c.uid = b.uid
|
||||
ORDER BY
|
||||
c.LEVEL DESC
|
||||
|
Loading…
x
Reference in New Issue
Block a user