block div class yandex-money div try original open home scripts tests

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
block="""
<div class="yandex-money">
.....
....
....
</div>
"""
try:
original = open("/home/scripts/tests/index.htm", "r")
except IOError, err:
print err.strerror
result = original.read().replace(block, '')
#result = original.replace(block, '')
myfile = open("/home/scripts/tests/index2.htm", "w")
myfile.seek(0, 0)
myfile.write(result)
myfile.close()