修复转发
All checks were successful
Update Code / StopService (windows-101.36.104.175) (push) Successful in 0s
Update Code / StopService (windows-101.36.102.136) (push) Successful in 0s
Update Code / CD (windows-101.36.102.136) (push) Successful in 8s
Update Code / CD (windows-101.36.104.175) (push) Successful in 12s
All checks were successful
Update Code / StopService (windows-101.36.104.175) (push) Successful in 0s
Update Code / StopService (windows-101.36.102.136) (push) Successful in 0s
Update Code / CD (windows-101.36.102.136) (push) Successful in 8s
Update Code / CD (windows-101.36.104.175) (push) Successful in 12s
This commit is contained in:
@@ -635,17 +635,20 @@ def _get_share_config(target_url):
|
||||
|
||||
def _click_share_button(page, selector):
|
||||
locator = page.locator(selector)
|
||||
count = locator.count()
|
||||
deadline = time.time() + 120
|
||||
|
||||
for index in range(count):
|
||||
candidate = locator.nth(index)
|
||||
try:
|
||||
if candidate.is_visible():
|
||||
candidate.scroll_into_view_if_needed(timeout=30000)
|
||||
candidate.click(timeout=60000)
|
||||
return
|
||||
except Error:
|
||||
continue
|
||||
while time.time() < deadline:
|
||||
count = locator.count()
|
||||
for index in range(count):
|
||||
candidate = locator.nth(index)
|
||||
try:
|
||||
if candidate.is_visible():
|
||||
candidate.scroll_into_view_if_needed(timeout=30000)
|
||||
candidate.click(timeout=60000)
|
||||
return
|
||||
except Error:
|
||||
continue
|
||||
page.wait_for_timeout(1000)
|
||||
|
||||
element = page.query_selector(selector)
|
||||
if element is None:
|
||||
|
||||
@@ -6,7 +6,7 @@ import spider.task as task_module
|
||||
|
||||
|
||||
# 直接在这里填写测试参数
|
||||
COOKIES = {"c_user":"61588267419224","datr":"3D2XaYqWJ1w9rJU6X6e02or_","fr":"0k8G2UtA1NqMJqD0s.AWemansED9s7o5tmbiUwA7gqAoWOk99OEJw8_zCrRks9IgULoSk.Bplz6g..AAA.0.0.Bplz6g.AWfaScT_l9g4id9lBpHtDtHo-T4","xs":"28:izkUxLXyFn_-OA:2:1771519655:-1:-1"}
|
||||
COOKIES = {"c_user":"61588333773832","datr":"HE2Wad2MttKeo5sq6N0H-Nzm","fr":"0EmS028gNHuZANcda.AWfAv-SGO_JSJHlIuvtEdOZckpo2Dpo2s5AFnk3pHsYvmEFUMRU.Bplk3I..AAA.0.0.Bplk3I.AWePI6kwlSPrrSIFkRyEX3BGU6Y","xs":"21:m9VOT0BnaXqORA:2:1771457996:-1:-1"}
|
||||
|
||||
TARGET_URL = "https://www.facebook.com/permalink.php?story_fbid=pfbid023QsxMBw26HAdt3LW1Ln7GUugWYbQkzfL9Ws68XUiuaXJvFD3u1iKtVFq7hpypdFtl&id=61580561183111"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user