Resolved: Scraping on YouTube with Selenium – code doesn’t store my values

In this post, we will see how to resolve Scraping on YouTube with Selenium – code doesn’t store my values


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)
But when I do this:
Nothing that’s been scraped is stored anywhere I can see. Can somebody explain to dumb ol’ me what the heck is wrong? Sorry if this is really something dumb, but I’m studying this stuff by myself to get a job, and I can’t really find something comprehensive & free to really teach me all there is to know, so I guess that my knowledge is really spotty. Thanks to everyone kind enough to help, If anything is unclear or I didn’t explain it right, please feel free to ask me as many questions as necessary… I really need this job!

Best Answer:

You just need to return the result from the defined function and print while calling it, That’s all.
and you see, we get the data back

If you have better answer, please add a comment about this, thank you!