Skip to content

Commit

Permalink
For Monova pages with only a magnet link, don't throw an error
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey committed Sep 26, 2015
1 parent 822d76b commit 93ecbd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions epgrabber.py
Expand Up @@ -390,6 +390,9 @@ def torrent(self,r):
patt = compile("<a id=\"download-file\" href=\"((?:https:)?//www.monova.org/torrent/download[^\"]+)\"")
torrent = patt.search(otherpage)
if torrent == None:
if otherpage.find("title=\"Magnet Download\"")!=-1:
print "Magnet-only page"
else:
raise Exception, "Bad Regex"
else:
return {"url" : urljoin(l, torrent.groups()[0]), "ref" : l}
Expand Down

0 comments on commit 93ecbd1

Please sign in to comment.