Files
PinterestParse/parsehtml.py
Александр Геннадьевич Сальный 7caeeaaff5 second commit
2022-10-15 21:01:12 +03:00

22 lines
421 B
Python

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()