I am building a web scraper that scrapes citation data from the Web of Science. On Friday, I finalized that part of the program, but today it has stopped working and when I try to access the citation data via Selenium I get a NoSuchElementException. I have tried using different ways (id, class, xpath, css selector) of clicking on this one specific element, but it always throws the error. Here is my code, which was working and now is not:
url = 'https://apps.webofknowledge.com/Search.do?product=UA&SID=8F2pCcE8ApJDSKZLHfF&search_mode=GeneralSearch&prID=acd62bc2-0ee0-47a1-a85d-12009db3c2f5'
driver.get(url)
citers_num = driver.find_element_by_class_name('snowplow-citation-network-times-cited-count-link')
citers_num.click()
Here is the html:
<div class="search-results-data-cite">Times Cited: <a class="snowplow- times-cited-link" title="View all of the articles that cite this one" href="/CitingArticles.do product=WOS&SID=5FAYgZP1cYhuG9LGN3I&search_mode=CitingArticles&parentProduct=WOS&parentQid=18&parentDoc=12&REFID=84460199&excludeEventConfig=ExcludeIfFromNonInterProduct">313</a>
Here is the error I've been getting as of today:
citers_num = driver.find_element_by_class_name('snowplow-citation-network-all-times-cited')
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 564, in find_element_by_class_name
return self.find_element(by=By.CLASS_NAME, value=name)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
'value': value})['value']
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"class name","selector":"snowplow-citation-network-all-times-cited"}
(Session info: chrome=75.0.3770.80)
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Mac OS X 10.14.1 x86_64)
I know that there are other similar questions on here, but none of them have been able to help me. Thank you!