Can't click on the download link using Selinium Webdriver
I'm trying to automate my weekly anime routes using python
from selenium import Webdriver
import time
dr = webdriver.Chrome()
time.sleep(3)
dr.get('https://horriblesubs.info/shows/one-punch-man-s2')
time.sleep(1)
link=dr.find_element_by_class_name("rls-info-container").click()
time.sleep(3)
blink=dr.find_element_by_xpath("//span[@class='dl_type hs-magnet-link']").click()
time.sleep(6)
dr.quit()
This is the error i get
Traceback (most recent call last):
File "C:\Users\Hey\AppData\Local\Programs\Python\Python37-32\Scripts\get-ShieldHero.py", line 16, in <module>
blink=dr.find_element_by_xpath("//span[@class='dl_type hs-magnet-link']").click()
File "C:\Users\Hey\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Users\Hey\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 978, in find_element
'value': value})['value']
File "C:\Users\Hey\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Hey\AppData\Local\Programs\Python\Python37-32\lib\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":"xpath","selector":"//span[@class='dl_type hs-magnet-link']"}
(Session info: chrome=74.0.3729.169)
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17134 x86_64)
I want to click on the 480 link, but I can't with the above code
I've attempted other variations where I try and inspect the html block, but I've been unsuccessful.