请求url后等待3,10秒
This commit is contained in:
@@ -845,6 +845,7 @@ def playwright_like(cookies, target_url):
|
||||
url = 'https://facebook.com'
|
||||
try:
|
||||
page.goto(url)
|
||||
time.sleep(random.randint(3, 10))
|
||||
check_account_status(page, parse_cookies(cookies))
|
||||
|
||||
if 'permalink.php?story_fbid' in target_url or '/posts/' in target_url:
|
||||
@@ -891,6 +892,7 @@ def playwright_post(cookies, content, image_key=None):
|
||||
url = 'https://facebook.com'
|
||||
try:
|
||||
page.goto(url)
|
||||
time.sleep(random.randint(3, 10))
|
||||
check_account_status(page, parse_cookies(cookies))
|
||||
time.sleep(5)
|
||||
|
||||
@@ -946,6 +948,7 @@ def playwright_comment(cookies, target_url, content, image_key=None):
|
||||
url = 'https://facebook.com'
|
||||
try:
|
||||
page.goto(url)
|
||||
time.sleep(random.randint(3, 10))
|
||||
check_account_status(page, parse_cookies(cookies))
|
||||
time.sleep(5)
|
||||
|
||||
@@ -1019,6 +1022,8 @@ def playwright_get_user_profile(cookies, username=None):
|
||||
url = 'https://facebook.com'
|
||||
try:
|
||||
page.goto(url)
|
||||
time.sleep(random.randint(3, 10))
|
||||
|
||||
check_account_status(page, parse_cookies(cookies))
|
||||
|
||||
profile_pic_url = page.locator(
|
||||
@@ -1273,7 +1278,7 @@ if __name__ == '__main__':
|
||||
# '2025-3-26~like',
|
||||
# # 'rg.jpg'
|
||||
# )
|
||||
# print(playwright_get_user_profile(cookies))
|
||||
print(playwright_get_user_profile(cookies))
|
||||
# playwright_set_user_profile(
|
||||
# cookies,
|
||||
# username='facebaby66'
|
||||
|
||||
Reference in New Issue
Block a user