Private GIT

Skip to content
Snippets Groups Projects
Commit c1e82d79 authored by Nick Sologoub's avatar Nick Sologoub
Browse files

Replacing tabs with space before giving data to soup. Tabs confuse parser.

parent 4a4911b0
Branches
Tags
No related merge requests found
......@@ -21,8 +21,8 @@ import re
import urllib
import requests
import traceback
from bs4 import BeautifulSoup
from sickbeard.bs4_parser import BS4Parser
from sickbeard import logger
from sickbeard import tvcache
from sickbeard.providers import generic
......@@ -119,9 +119,9 @@ class HDTorrentsProvider(generic.TorrentProvider):
logger.log(u"Could not find table of torrents mainblockcontenttt", logger.ERROR)
continue
data = urllib.unquote(data[index:].encode('utf-8')).decode('utf-8')
data = urllib.unquote(data[index:].encode('utf-8')).decode('utf-8').replace('\t', '')
html = BeautifulSoup(data, 'html5lib')
with BS4Parser(data, features=["html5lib", "permissive"]) as html:
if not html:
logger.log("No html data parsed from provider", logger.DEBUG)
continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment