lampinismer

Parsing script for lampinismer
Log | Files | Refs | README

commit 16b8c0016c59252dea0326c6d32d89dc1ab2d038
Author: andersuno <anders.hedman01@gmail.com>
Date:   Tue, 11 May 2021 21:33:11 +0200

Initial commit

Diffstat:
AREADME.md | 3+++
Aregex_lampinismer.py | 17+++++++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -0,0 +1,3 @@ +## Input data + +The input data is collected via HAR file export in web browser while scrolling twitter for #lampinismer. diff --git a/regex_lampinismer.py b/regex_lampinismer.py @@ -0,0 +1,17 @@ +#!/bin/python3 + +import re + +with open('lampinismer.har', 'r') as f: + file = f.read() + +pattern = 'full_text.+?#lampinismer' + +m = re.findall(pattern, file) + +for i in range(len(m)): + m[i] = m[i].replace('\\', '') + m[i] = m[i].replace('full_text\":\"', '') + m[i] = m[i].replace('u00e5', 'å').replace('u00e4', 'ä') \ + .replace('u00f6', 'ö') + print(m[i])