diff --git a/sickbeard/providers/publichd.py b/sickbeard/providers/publichd.py
index 6e8e21fc..1cf70003 100644
--- a/sickbeard/providers/publichd.py
+++ b/sickbeard/providers/publichd.py
@@ -136,14 +136,13 @@ class PublicHDProvider(generic.TorrentProvider):
html = self.getURL(searchURL)
+ if not html:
+ continue
#remove unneccecary ')
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"])