Private GIT

Skip to content
Snippets Groups Projects
Commit 0f34fa83 authored by miigotu's avatar miigotu
Browse files

Merge pull request #384 from SickRage/bugfix-140

Change xthor so indents are less, and fix __getitem__ error
parents 9dbaec31 37b6aac6
No related branches found
No related tags found
No related merge requests found
......@@ -85,19 +85,27 @@ class XthorProvider(generic.TorrentProvider):
searchURL = self.urlsearch % (urllib.quote(search_string), self.categories)
logger.log(u"Search URL: %s" % searchURL, logger.DEBUG)
data = self.getURL(searchURL)
if not data:
continue
with BS4Parser(data, features=["html5lib", "permissive"]) as html:
resultsTable = html.find("table", {"class" : "table2 table-bordered2"})
if resultsTable:
if not resultsTable:
continue
rows = resultsTable.findAll("tr")
for row in rows:
link = row.find("a", href=re.compile("details.php"))
if link:
if not link:
continue
title = link.text
download_url = self.url + '/' + row.find("a", href=re.compile("download.php"))['href']
download_item = row.find("a", href=re.compile("download.php"))
if not download_item:
continue
download_url = self.url + '/' + download_item['href']
# FIXME
size = -1
seeders = 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment