How to iterate through list in text file using python

I want to find links in Javascript files, I have installed linkfinder, but problem i have it accepts only one link at a time.

here is what i have so far:

python -i -o results.html

but i have text file contains many urls, how do i automate all urls?

sample data in text file:

>Solution :

A simple shell loop:

while read -r link; do
    python -i "$link" -o cli
done < links.txt > results.html

-o cli writes to standard output, so all the results will be combined in a single results.html due to the output redirection of the loop.

Leave a Reply