开发者

How to auto search for words in list in python

开发者 https://www.devze.com 2022-12-07 19:34 出处:网络
I have a list like that: "Covid19" , "worm", "Neodermis", "Proglottid" ...

I have a list like that: "Covid19" , "worm", "Neodermis", "Proglottid" ...

I need to go to Pubmed to search related-info,

I try my code like below

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys

browser = webdriver.Chrome()

browser.get('https://pubmed.ncbi.nlm.nih.gov/')

print("Enter a keyword to search: ", end='')
keyword = input()
#by_class_name
elem = browser.find_element(By.CLASS_NAME, 'search-input')  # Find the search box
elem.send_keys(keyword + Keys.ENTER)

browser.quit()开发者_运维问答

it's get error in my code. I'm not sure maybe my search-box is located wrong placd?

How to auto search for words in list in python

Do any one can give me some suggestion?

0

精彩评论

暂无评论...
验证码 换一张
取 消