Python Forum

Full Version: How to print particular text areas fron an HTML file (not site)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
@Chris I saw the function you wrote before some data on the server was lost (sorry about that!). I dunno if you had the chance to see my reply. But anyway, the problem was that your function exited (return) as soon as first table cell closing tags were found (</a></t>).

Using BeautifulSoup would surely be easiest option to get the links out of your html. But if you really want to avoid it, then open a file and read lines. Search for some examples of with open and readlines(). You will need to do some manipulation because your lines won't be split by \n (which is default for text files), but by your custom delimiter (i suppose </a></t>).
Pages: 1 2