mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-10 10:04:21 +01:00
Merge pull request #85 from vikstrous/fix-unclosed-file
fix unclosed file warning
This commit is contained in:
commit
06bf8ed713
@ -31,7 +31,9 @@ class BayParser(parser.HTMLParser):
|
|||||||
|
|
||||||
|
|
||||||
def search(db, terms):
|
def search(db, terms):
|
||||||
xml = open(db).readlines()
|
f = open(db)
|
||||||
|
xml = f.readlines()
|
||||||
|
f.close()
|
||||||
parser = BayParser()
|
parser = BayParser()
|
||||||
parser.q = (' '.join(terms)).lower()
|
parser.q = (' '.join(terms)).lower()
|
||||||
parser.feed(''.join(xml))
|
parser.feed(''.join(xml))
|
||||||
|
Loading…
Reference in New Issue
Block a user