mirror of
https://github.com/SickGear/SickGear.git
synced 2025-03-15 17:17:43 +00:00
Fixes issue #325
This commit is contained in:
parent
a3bdf6038f
commit
6ee60d213a
1 changed files with 2 additions and 3 deletions
|
@ -136,14 +136,13 @@ class PublicHDProvider(generic.TorrentProvider):
|
||||||
|
|
||||||
|
|
||||||
html = self.getURL(searchURL)
|
html = self.getURL(searchURL)
|
||||||
|
if not html:
|
||||||
|
continue
|
||||||
|
|
||||||
#remove unneccecary <option> lines which are slowing down BeautifulSoup
|
#remove unneccecary <option> lines which are slowing down BeautifulSoup
|
||||||
optreg = re.compile(r'<option.*</option>')
|
optreg = re.compile(r'<option.*</option>')
|
||||||
html = os.linesep.join([s for s in html.splitlines() if not optreg.search(s)])
|
html = os.linesep.join([s for s in html.splitlines() if not optreg.search(s)])
|
||||||
|
|
||||||
if not html:
|
|
||||||
continue
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
soup = BeautifulSoup(html, features=["html5lib", "permissive"])
|
soup = BeautifulSoup(html, features=["html5lib", "permissive"])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue