第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Python 網(wǎng)絡(luò)驅(qū)動器

Python 網(wǎng)絡(luò)驅(qū)動器

森林海 2022-05-24 16:59:58
我有兩個文件main.py和 test.py 我需要從soccerway 抓取數(shù)據(jù)但首先我需要輸入日期示例 2011/2012 或范圍從 2011/2019 我該如何解決main.pydate = input ("Insert Date: ")test.pyfrom time import sleepfrom urllib.parse import urlparsefrom scraper import scrape_matchfrom write_to_spread import write_spreadfrom season import get_urls_seasondriver = webdriver.Chrome()driver.fullscreen_window()driver.get("https://us.soccerway.com" + url_path)click_privacy_policy(driver)driver.find_element_by_xpath("//select[@name='season_id']/option[text('how can input date')]").click()        我需要輸入日期,例如 2018/2019 并輸入此日期或輸入 2010-2019 并輸入每一頁
查看完整描述

1 回答

?
MM們

TA貢獻1886條經(jīng)驗 獲得超2個贊

獲取輸入和split輸入以獲取開始和結(jié)束年份并進行字符串操作,它會在您照看時單擊。


inptdate='2010-2019'

startdate=inptdate.split('-')[0]

enddate=inptdate.split('-')[1]


while int(startdate)<int(enddate):


 textstring=str(startdate) + "/" + str(int(startdate)+1)

 print(textstring)

 driver.find_element_by_xpath("//select[@name='season_id']/option[text()='" + textstring +"']").click()

 startdate=int(startdate)+1


查看完整回答
反對 回復 2022-05-24
  • 1 回答
  • 0 關(guān)注
  • 159 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號