|
@@ -9,6 +9,7 @@ import datetime
|
|
|
import pandas as pd
|
|
|
from playwright.async_api import async_playwright
|
|
|
|
|
|
+
|
|
|
from applications import check_account, Mysql
|
|
|
from applications.config import platform_map
|
|
|
from applications.functions import navigate
|
|
@@ -103,9 +104,13 @@ async def run(playwright):
|
|
|
print(f"{platform_name} has already been exported")
|
|
|
else:
|
|
|
await check_account(page, platform_name)
|
|
|
- await navigate(page, platform_name)
|
|
|
- done_dict[platform_name] = 1
|
|
|
- F.bot(platform_name)
|
|
|
+ try:
|
|
|
+ await navigate(page, platform_name)
|
|
|
+ done_dict[platform_name] = 1
|
|
|
+ F.bot(platform_name)
|
|
|
+ except Exception as e:
|
|
|
+ F.bot(platform_name, 2)
|
|
|
+ continue
|
|
|
|
|
|
# 关闭浏览器上下文和浏览器
|
|
|
await context.close()
|