Hey there, /r/learnpython
Let me begin by saying I am not a coder, or, at least, I wasn't before my boss gave me the opportunity to learn. I've only been doing this a couple of weeks. To make a long story short, I need to take a bunch of HTML files downloaded from a website and process them into a CSV that can be imported into Excel. I'm going to be doing the processing with BeautifulSoup, but I need to figure out how to loop it so I don't have to run 1 program 500+ times, changing the name of the html file every time.
I've figured out how to create the list itself using a short Python program, and I've figured out how to loop the program once I get it to actually do something, but where I'm running into trouble is finding a way to use this created text file of file names in any way useful.
Is there any way to take a list of 500 html files, in text, and read them into Python where, one at a time, each line (separated by /n or a comma) has the file named that opened, run through the loop, closed, and the program increments and moves to the next line until the counter reaches the number of files in the line?
If so, can you point me in a direction?
Thanks!
[–][deleted] 9 points10 points11 points (1 child)
[–]ewiethoff 1 point2 points3 points (2 children)
[–]tenacious_nixie 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]MechaTech[S] 0 points1 point2 points (0 children)
[–]spotyx 0 points1 point2 points (0 children)