second commit
This commit is contained in:
22
parsehtml.py
Normal file
22
parsehtml.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import re
|
||||
import os
|
||||
import logging
|
||||
|
||||
def main():
|
||||
|
||||
logging.basicConfig(filename='app.log', level=logging.DEBUG)
|
||||
|
||||
basePath = "D:\Programming\PythonProgects\PinterestParse\html"
|
||||
|
||||
fileForParse = os.path.join(basePath,os.listdir(basePath)[0])
|
||||
|
||||
logging.debug(fileForParse)
|
||||
|
||||
openedFile = open(fileForParse, 'r')
|
||||
|
||||
logging.debug(openedFile.read().decode('cp-1251'))
|
||||
|
||||
|
||||
|
||||
if __name__ =='__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user