【发布时间】:2021-08-10 20:42:58
【问题描述】:
我试图让每个小圆圈显示哪个结果是庄家或闲家。我需要从每 35 个表中获取结果。
from selenium import webdriver
import time
from bs4 import BeautifulSoup
driver = webdriver.Chrome('C:/chromedriver/chromedriver.exe')
driver.get('http://ggl-maxim.com/')
driver.find_element_by_xpath('//*[@id="body"]/div/div[2]/div/div[2]/fieldset/input[1]').send_keys('tnrud3080')
driver.find_element_by_xpath('//*[@id="body"]/div/div[2]/div/div[2]/fieldset/input[2]').send_keys('tnrud3080')
driver.find_element_by_xpath('//*[@id="body"]/div/div[2]/div/div[2]/fieldset/button[1]').click()
time.sleep(2)
driver.get('http://ggl-maxim.com/api/popup/popup_menu.asp?mobile=0&lobby=EVOLUTION')
time.sleep(10)
html = driver.page_source
bs = BeautifulSoup(html, 'html.parser')
targets = bs.find_all('svg')
print(targets)
但是,通过此代码,我无法获取 svg 标记。我该怎么办?
否则,如果有人知道如何获得这个赌场的价值,请告诉我。
【问题讨论】:
-
为什么要用两次driver.get?您正在测试哪个页面?
-
因为我需要向 Evolution Game 发送我的用户信息。没有它,我无法看到游戏正常运行
-
你能在截图上找到你要找的圈子吗?有>3000svgs
-
我编辑了它!我需要将这些记录放入列表中..
标签: python selenium selenium-webdriver beautifulsoup