├── README.md └── comments-parser.py /README.md: -------------------------------------------------------------------------------- 1 | # facebook-comments-parser 2 | -------------------------------------------------------------------------------- /comments-parser.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | import re 3 | 4 | file = open('comments_html.txt', 'r') 5 | comments_html = file.read() 6 | comments = re.findall('(.*?)', comments_html) 7 | 8 | print(len(comments)) 9 | with open('parsed_comments.txt', 'w') as out_file: 10 | for comment in comments: 11 | out_file.write("%s, " % comment) 12 | print(comment) 13 | 14 | --------------------------------------------------------------------------------