I have written a Python script that collects the magnet link of a torrent I want to download.
How can I then pass this to aria2c in the command line.
This is what I've tried so far, aria2c starts as if it will download but it won´t download a single byte. I am a complete noob so I apologise and thank you dearly for your help.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
from pyYify import yify
import os
import subprocess
driver = webdriver.Chrome()
driver.get('https://mypiratebay.net/')
searchbox = driver.find_element_by_xpath('//*[@id="home"]/main/section/form/div[1]/input')
searchbox.send_keys('Toy Story 4')
searchbox.send_keys(Keys.RETURN)
torrentlink = driver.find_element_by_xpath('//*[@id="st"]/span[2]/a')
time.sleep(3)
torrentlink.click()
for a in driver.find_elements_by_xpath('//*[@id="d"]/a'):
magnetlink = (a.get_attribute('href'))
magnetlink = str(magnetlink)
subprocess.call(['aria2c', magnetlink])