Store links in text file and read into variables
Hie guys, quick question. I am trying implement an automated reader for a few news websites.
The problem is finding a way to know which links have already been visited.
So what I thought of is using a text file that stores all the links that were present on the page during the last program run and using basic string comparison to determine which ones are new.
This would probably make more sense in a loop of some sort, iterating through all the links stored in our text file and comparing the to the links currently on the web page concerned
visit link and do some nice stuff
After the process is completed the text file would be overwritten with new.
Now my question. How could I go about actually taking a link from a text file and putting it in a variable so I can compare it?
Again is this the best thing to do. I am doing this as part of my coding practice for the summer and am very interest in good design patterns and would be very interested to heart alternatives if my approach is not sound.