1
0
mirror of https://github.com/vikstrous/pirate-get synced 2025-01-09 09:59:51 +01:00

fix unclosed file warning

This commit is contained in:
Viktor Stanchev 2016-07-02 14:05:18 -07:00
parent 34e3c66a4f
commit 4dc067e553

View File

@ -31,7 +31,9 @@ class BayParser(parser.HTMLParser):
def search(db, terms):
xml = open(db).readlines()
f = open(db)
xml = f.readlines()
f.close()
parser = BayParser()
parser.q = (' '.join(terms)).lower()
parser.feed(''.join(xml))