In this post, we will see how to resolve Scraping on YouTube with Selenium – code doesn’t store my values
Question:
I’m trying to write a script to scrape information from youtube channels. The script uses Selenium, and some parts of it seemed to work just fine on their own. However, once I created a function and put all the bits and pieces I did try on their own, the results don’t get stored.So this is the code that works (i.e.: I run it and all my results are stored as expected)
Best Answer:
You just need to return the result from the defined function and print while calling it, That’s all.If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com
Leave a Review