Skip to content

Commit

Permalink
fix pylint error in regex
Browse files Browse the repository at this point in the history
  • Loading branch information
parisa-zahedi committed Jul 11, 2022
1 parent ccc6320 commit 41c48c8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions data_extractor/whatsapp_chat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
import zipfile


URL_PATTERN = r"(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))"
LOCATION_PATTERN = r'((L|l)ocation: https?://\S+)|((l|L)ocatie: https?://\S+)|(.*(l|L)ive locatie gedeeld.*)|(.*(l|L)ive location shared.*)'
ATTACH_FILE_PATTERN = r'(<attached: \S+>)|(<Media (weggelaten|omitted)>)|((afbeelding|GIF|video|image|audio|(s|S)ticker|.*document.*) (weggelaten|omitted))'
URL_PATTERN = r"(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)" \
r"(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|" \
r"(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))"
LOCATION_PATTERN = r'((L|l)ocation: https?://\S+)|((l|L)ocatie: https?://\S+)|' \
r'(.*(l|L)ive locatie gedeeld.*)|(.*(l|L)ive location shared.*)'
ATTACH_FILE_PATTERN = r'(<attached: \S+>)|(<Media (weggelaten|omitted)>)|' \
r'((afbeelding|GIF|video|image|audio|(s|S)ticker|.*document.*) (weggelaten|omitted))'

FILE_RE = re.compile(r".*.txt$")
HIDDEN_FILE_RE = re.compile(r".*__MACOSX*")
Expand Down

0 comments on commit 41c48c8

Please sign in to comment.