Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

确认支付的问题 #80

Open
X1a0hu opened this issue Nov 18, 2024 · 5 comments
Open

确认支付的问题 #80

X1a0hu opened this issue Nov 18, 2024 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@X1a0hu
Copy link

X1a0hu commented Nov 18, 2024

大佬你好 想问一下确认支付按钮进行锁单的操作该如何实现 我看到里面有payBtn的click操作,但是好像并没有实现。

@X1a0hu X1a0hu added the question Further information is requested label Nov 18, 2024
@ronething
Copy link
Owner

ref:

def goto_confirm_url_iteration(driver, confirm_ticket_url):
while True:
driver.get(confirm_ticket_url)
payBtn = WebDriverWait(driver, 10).until(
EC.visibility_of_element_located((By.CSS_SELECTOR, '.payBtn')))
# DONE: 如果不是立即支付,需要进行刷新
# payBtn <selenium.webdriver.remote.webelement.WebElement
# (session="1244164329c3e2743132313082fd0416", element="36634b86-15bf-45a2-90d8-db69c3e60f6e")>
# print(f'点击按钮的文字', payBtn.text) # 已售罄/ 立即支付 ¥160.00
if '立即支付' in payBtn.text:
print('获取到立即支付按钮')
return payBtn
else:
# 不断刷新
time.sleep(0.001)

之前是会有实现的。现在挺久没维护了,不一定还能用。

@X1a0hu
Copy link
Author

X1a0hu commented Nov 25, 2024

ref:

def goto_confirm_url_iteration(driver, confirm_ticket_url):
while True:
driver.get(confirm_ticket_url)
payBtn = WebDriverWait(driver, 10).until(
EC.visibility_of_element_located((By.CSS_SELECTOR, '.payBtn')))
# DONE: 如果不是立即支付,需要进行刷新
# payBtn <selenium.webdriver.remote.webelement.WebElement
# (session="1244164329c3e2743132313082fd0416", element="36634b86-15bf-45a2-90d8-db69c3e60f6e")>
# print(f'点击按钮的文字', payBtn.text) # 已售罄/ 立即支付 ¥160.00
if '立即支付' in payBtn.text:
print('获取到立即支付按钮')
return payBtn
else:
# 不断刷新
time.sleep(0.001)

之前是会有实现的。现在挺久没维护了,不一定还能用。

重新clone一下项目就可以了 目前还是可以用的 然后还有一个问题 就是 有的演出仅支持app购买 获取到了ticketID后 进行购买 会提示该票品不存在

@X1a0hu X1a0hu closed this as completed Nov 25, 2024
@X1a0hu X1a0hu reopened this Nov 25, 2024
@X1a0hu
Copy link
Author

X1a0hu commented Nov 25, 2024

403655999c054ba3b90e3ee87e6f16a hai还有这个地方的这个参数的意思是什么呢 如果是0是代表没安装app 1就是代表安装了app吗 因为我用手机抓包也没抓出购买的网址以及参数 还望大佬解答一下

@X1a0hu
Copy link
Author

X1a0hu commented Nov 25, 2024

403655999c054ba3b90e3ee87e6f16a hai还有这个地方的这个参数的意思是什么呢 如果是0是代表没安装app 1就是代表安装了app吗 因为我用手机抓包也没抓出购买的网址以及参数 还望大佬解答一下

这里的几个参数设置具体是什么意含义 可以麻烦大佬再说一下吗

@ronething
Copy link
Owner

后面这些固定的参数具体的含义我也没了解,当时是为了模拟人类行为所以使用了跟 手动点击产生的链接 一样的链接。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants