Skip to content

Instantly share code, notes, and snippets.

Created April 14, 2015 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/bf0e27d046e3c5c90168 to your computer and use it in GitHub Desktop.
Save anonymous/bf0e27d046e3c5c90168 to your computer and use it in GitHub Desktop.
File=open('0.html')
page=File.read()
Out=[]
Pass=0
Left=0
for Char in page:
#print Out,'Pass:',Pass
if Pass==0:
if Char=='<':
Left=1
Pass=1
continue
else:
if Char=='>':
Left=0
Pass=0
continue
else:
Out.append(Char)
else:
if Char=='>':
Left=0
Pass=0
continue
else:
if Left!=1:
Out.append(Char)
Fatch=''.join(Out)
File.close()
File=open('1.html','w')
File.write(Fatch)
File.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment