Py Script for html/comment/adsense mass replace in one directory


I have old big (~2000 pages ) html site with standard template.

Idea is to make php cms to reduce hand coding in future.

I want to strip all html tags, all comments in html and all Adsense code (just one Adsense type for all pages).

Latter I will find my way to export important stripped data to MySql with Python or PHP.

I am novice to Python/PHP, so I need script to:

1. Walk for files in ONE directory
2. stript html/comments/adsense
3. Save that files under same name under same directory

I found script for replacing in one page, but I need that "walk in dir + replace" option.

Any ideas how to start that in Python ?

Tnx for help.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!