Fixes issue #325

This commit is contained in:
echel0n 2014-05-03 05:10:52 -07:00
parent a3bdf6038f
commit 6ee60d213a

View file

@ -136,14 +136,13 @@ class PublicHDProvider(generic.TorrentProvider):
html = self.getURL(searchURL)
if not html:
continue
#remove unneccecary <option> lines which are slowing down BeautifulSoup
optreg = re.compile(r'<option.*</option>')
html = os.linesep.join([s for s in html.splitlines() if not optreg.search(s)])
if not html:
continue
try:
soup = BeautifulSoup(html, features=["html5lib", "permissive"])