diff options
| author | 2019-10-04 15:14:43 +0100 | |
|---|---|---|
| committer | 2019-10-04 15:14:43 +0100 | |
| commit | 70aceab622c351c175ceddbdde52f9d98dcd71f1 (patch) | |
| tree | 9858a9fd087768bb6266422e92da90a216d9f430 | |
| parent | parse content-type out in utils.http.request, put it on Response object (diff) | |
| signature | ||
exclude lines with URLs in them from creating markov chains
closes #156
| -rw-r--r-- | modules/markov.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/markov.py b/modules/markov.py index d88c2d37..f2c3b6c4 100644 --- a/modules/markov.py +++ b/modules/markov.py @@ -53,6 +53,9 @@ class Module(ModuleManager.BaseModule): return lambda: self._create(channel_id, line) def _create(self, channel_id, line): + if utils.http.REGEX_URL.search(line): + return + words = list(filter(None, line.split(" "))) words = [word.lower() for word in words] words_n = len(words) |
