diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-02-25 12:00:29 -0500 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-02-25 12:00:29 -0500 |
commit | 94a03f571299715bc50ceee0ed49689d9dcb9fce (patch) | |
tree | 0bcf8c54d649ba94f4d577032bdb21ec946b3a01 | |
parent | 7d94ee44cdfe48eb4c34eb69b72e117f1d7c4116 (diff) | |
download | korg-helpers-94a03f571299715bc50ceee0ed49689d9dcb9fce.tar.gz |
Remove quotes from subject-based queries
When there is a quote in the subject, we need to remove it in order for
the xapian "phrase-in-quotes" search to work.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-x | get-lore-mbox.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/get-lore-mbox.py b/get-lore-mbox.py index 680abc9..394c49e 100755 --- a/get-lore-mbox.py +++ b/get-lore-mbox.py @@ -901,7 +901,7 @@ def get_newest_series(mboxfile, session): msgdate = email.utils.parsedate_tz(str(base_msg['Date'])) startdate = time.strftime('%Y%m%d', msgdate[:9]) listarc = base_msg.get_all('List-Archive')[-1].strip('<>') - q = 's:"%s" AND f:"%s" AND d:%s..' % (lsub.subject, fromeml, startdate) + q = 's:"%s" AND f:"%s" AND d:%s..' % (lsub.subject.replace('"', ''), fromeml, startdate) queryurl = '%s?%s' % (listarc, urllib.parse.urlencode({'q': q, 'x': 'A', 'o': '-1'})) logger.critical('Checking for newer revisions on %s', listarc) logger.debug('Query URL: %s', queryurl) |