How to run multiple python files in laravel project?

Viewed 24

I have multiple python files. And I want to run these files on my laravel project. https://websolutionstuff.com/post/how-to-run-python-script-in-laravel-9 when i follow the steps on the page use Symfony\Component\Process\Exception\ProcessFailedException; I ran the command and got the following error: use : The term 'use' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. how can i run multiple python files and get rid of this error? Below is part of my code:

images = []
pages = range(1, 3, 1)
for page in pages:
    url = "https://www.bkmkitap.com/sanat"
    results = requests.get(url, headers=headers)
    soup = BeautifulSoup(results.content, "html.parser")
    book_div = soup.find_all("div", class_="col col-12 drop-down hover lightBg")
    sleep(randint(2, 10))
    for bookSection in book_div:
        
        img_url = bookSection.find("img", class_="lazy stImage").get('data-src')
        images.append(img_url)  
books = pd.DataFrame(
    {
        "Image": images,
       
    }
)
books.to_csv("book.csv", mode='a', index=False, header=True ,encoding = 'utf-8-sig')
0 Answers
Related