I have really much offline html files and I need get from them name, adress etc. And create CSV.
I first try to do it witch batch - example:
for /r %%i in (*) DO (
findstr /o "name" %%i >> results.txt
ECHO ; >> results.txt
findstr /o "STREET" %%i >> results.txt
ECHO ; >> results.txt
etc
ECHO xxxendlinexxx >> results.txt
)
It works, but this give me long file what need hard work with Regular expresion... I think there must be better way how to read TAG content in HTML.
I found Python HTML parser:
from html.parser import HTMLParser
But I dont know hot to use for offline file and specific TAG (id="something"). I googling, watch tuts on youtube, but I dont find easy a understandable solution.
Can you help? Best with example:
- How open file
- How find content in specific tag
- Save content to another file
Thank you for help.