# Buggy code
def parse(self, data, mode):
    """
    Parse search results for items.

    :param data: The raw response from a search
    :param mode: The current mode used to search, e.g. RSS

    :return: A list of items found
    """
    items = []

    with BS4Parser(data, "html5lib") as html:
        torrent_rows = html.find_all("div", class_="torrent")

        # Continue only if at least one release is found
        if not torrent_rows:
            log.debug("Data returned from provider does not contain any torrents")
            return items

        for row in torrent_rows:
            anchor = row.find("a")

            try:
                # Removes ' torrent' in the end
                title = anchor.get("title")[:-8]
                download_url = anchor.get("href")
                if not all([title, download_url]):
                    continue

                info_hash = download_url.split("/")[1]
                download_url = "magnet:?xt=urn:btih:{hash}&dn={title}{trackers}".format(
                    hash=info_hash, title=title, trackers=self._custom_trackers
                )

                seeders = try_int(
                    row.find("span", class_="bc seeders").find("span").get_text(), 1
                )
                leechers = try_int(
                    row.find("span", class_="bc leechers").find("span").get_text()
                )

                # Filter unseeded torrent
                if seeders < min(self.minseed, 1):
                    if mode != "RSS":
                        log.debug(
                            "Discarding torrent because it doesn't meet the"
                            " minimum seeders: {0}. Seeders: {1}",
                            title,
                            seeders,
                        )
                    continue

                torrent_size = (
                    row.find("span", class_="bc torrent-size").get_text().rstrip()
                )
                size = convert_size(torrent_size) or -1

                pubdate_raw = row.find("span", class_="bc cated").get_text(strip=True)
                pubdate = self.parse_pubdate(pubdate_raw)

                item = {
                    "title": title,
                    "link": download_url,
                    "size": size,
                    "seeders": seeders,
                    "leechers": leechers,
                    "pubdate": pubdate,
                }
                if mode != "RSS":
                    log.debug(
                        "Found result: {0} with {1} seeders and {2} leechers",
                        title,
                        seeders,
                        leechers,
                    )

                items.append(item)
            except (AttributeError, TypeError, KeyError, ValueError, IndexError):
                log.error(
                    "Failed parsing provider. Traceback: {0!r}", traceback.format_exc()
                )

        return items


# Traceback (ValueError)
2017-05-30 15:24:00 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [Speedcd] :: [94e0649] Added RSS item: Prison.Break.S05E00.Resurrection.XviD-AFG to cache: speedcd
2017-05-30 15:24:00 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [Speedcd] :: [94e0649] We aren't interested in this result: Prison.Break.S05E00.Resurrection.XviD-AFG with url: https://speed.cd/download.php?torrent=1050490
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [Speedcd] :: [94e0649] Transaction with 6 queries executed
2017-05-30 15:24:01 INFO     SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Performing episode search for Prison Break
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Scene numbering enabled series Prison Break using indexer numbering: S00E11
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Converted parsed result Prison.Break.S05E00.1080p.rus.LostFilm.TV.mkv into title: Prison Break, season: 0, episode: [11], screen_size: 1080p, language: ru, release_group: LostFilm, container: mkv, mimetype: video/x-matroska, type: episode, parsing_time: 0.176810026169, total_time: None, absolute_episode: [], quality: Unknown
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Matched release Prison.Break.S05E00.1080p.rus.LostFilm.TV.mkv to a series in your database: Prison Break
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Parsed Prison.Break.S05E00.1080p.rus.LostFilm.TV.mkv into title: Prison Break, season: 0, episode: [11], screen_size: 1080p, language: ru, release_group: LostFilm, container: mkv, mimetype: video/x-matroska, type: episode, parsing_time: 0.176810026169, total_time: 0.257323980331, absolute_episode: [], quality: Unknown
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Allowed, Preferred = [ SDTV, SD DVD, 720p HDTV, RawHD, 1080p HDTV, 720p WEB-DL, 1080p WEB-DL, 720p BluRay, 1080p BluRay, 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ 1080p WEB-DL ] Found = [ Unknown ]
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Ignoring found result for 'Prison Break' S00E11 with unwanted quality 'Unknown'
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Ignoring Prison.Break.S05E00.1080p.rus.LostFilm.TV.mkv
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Scene numbering enabled series Prison Break using indexer numbering: S00E11
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Converted parsed result Prison.Break.S05E00.Resurrection.720p.WEB.H264.TURBO.rarbg into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 720p, format: WEB-DL, video_codec: h264, release_group: TURBO, type: episode, parsing_time: 0.191493034363, total_time: None, absolute_episode: [], quality: 720p WEB-DL
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Matched release Prison.Break.S05E00.Resurrection.720p.WEB.H264.TURBO.rarbg to a series in your database: Prison Break
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Parsed Prison.Break.S05E00.Resurrection.720p.WEB.H264.TURBO.rarbg into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 720p, format: WEB-DL, video_codec: h264, release_group: TURBO, type: episode, parsing_time: 0.191493034363, total_time: 0.297673940659, absolute_episode: [], quality: 720p WEB-DL
2017-05-30 15:24:01 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Allowed, Preferred = [ SDTV, SD DVD, 720p HDTV, RawHD, 1080p HDTV, 720p WEB-DL, 1080p WEB-DL, 720p BluRay, 1080p BluRay, 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ 1080p WEB-DL ] Found = [ 720p WEB-DL ]
2017-05-30 15:24:02 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: 'Prison Break' S00E11 status is: 'DOWNLOADED (720P WEB-DL)'. Ignoring result with quality '720p WEB-DL'. Reason: New quality is same/lower quality (and not preferred). Ignoring new quality
2017-05-30 15:24:02 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Ignoring Prison.Break.S05E00.Resurrection.720p.WEB.H264.TURBO.rarbg
2017-05-30 15:24:02 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Scene numbering enabled series Prison Break using indexer numbering: S00E11
2017-05-30 15:24:02 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Converted parsed result Prison.Break.S05E00.Resurrection.720p.WEB.H264.TURBO into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 720p, format: WEB-DL, video_codec: h264, release_group: TURBO, type: episode, parsing_time: 0.184912919998, total_time: None, absolute_episode: [], quality: 720p WEB-DL
2017-05-30 15:24:02 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Matched release Prison.Break.S05E00.Resurrection.720p.WEB.H264.TURBO to a series in your database: Prison Break
2017-05-30 15:24:02 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Parsed Prison.Break.S05E00.Resurrection.720p.WEB.H264.TURBO into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 720p, format: WEB-DL, video_codec: h264, release_group: TURBO, type: episode, parsing_time: 0.184912919998, total_time: 0.309924125671, absolute_episode: [], quality: 720p WEB-DL
2017-05-30 15:24:02 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Allowed, Preferred = [ SDTV, SD DVD, 720p HDTV, RawHD, 1080p HDTV, 720p WEB-DL, 1080p WEB-DL, 720p BluRay, 1080p BluRay, 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ 1080p WEB-DL ] Found = [ 720p WEB-DL ]
2017-05-30 15:24:02 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: 'Prison Break' S00E11 status is: 'DOWNLOADED (720P WEB-DL)'. Ignoring result with quality '720p WEB-DL'. Reason: New quality is same/lower quality (and not preferred). Ignoring new quality
2017-05-30 15:24:02 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Ignoring Prison.Break.S05E00.Resurrection.720p.WEB.H264.TURBO
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Scene numbering enabled series Prison Break using indexer numbering: S00E11
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Converted parsed result Prison.Break.S05E00.Resurrection.1080p.HDTV.H264.TURBO.rarbg into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 1080p, format: HDTV, video_codec: h264, release_group: TURBO, type: episode, parsing_time: 0.207891941071, total_time: None, absolute_episode: [], quality: 1080p HDTV
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Matched release Prison.Break.S05E00.Resurrection.1080p.HDTV.H264.TURBO.rarbg to a series in your database: Prison Break
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Parsed Prison.Break.S05E00.Resurrection.1080p.HDTV.H264.TURBO.rarbg into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 1080p, format: HDTV, video_codec: h264, release_group: TURBO, type: episode, parsing_time: 0.207891941071, total_time: 0.311336994171, absolute_episode: [], quality: 1080p HDTV
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Allowed, Preferred = [ SDTV, SD DVD, 720p HDTV, RawHD, 1080p HDTV, 720p WEB-DL, 1080p WEB-DL, 720p BluRay, 1080p BluRay, 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ 1080p WEB-DL ] Found = [ 1080p HDTV ]
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: 'Prison Break' S00E11 status is: 'DOWNLOADED (720P WEB-DL)'. Ignoring result with quality '1080p HDTV'. Reason: New quality is same/lower quality (and not preferred). Ignoring new quality
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Ignoring Prison.Break.S05E00.Resurrection.1080p.HDTV.H264.TURBO.rarbg
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Scene numbering enabled series Prison Break using indexer numbering: S00E11
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Converted parsed result Prison.Break.S05E00.Resurrection.1080p.HDTV.H264.TURBO into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 1080p, format: HDTV, video_codec: h264, release_group: TURBO, type: episode, parsing_time: 0.197958946228, total_time: None, absolute_episode: [], quality: 1080p HDTV
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Matched release Prison.Break.S05E00.Resurrection.1080p.HDTV.H264.TURBO to a series in your database: Prison Break
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Parsed Prison.Break.S05E00.Resurrection.1080p.HDTV.H264.TURBO into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 1080p, format: HDTV, video_codec: h264, release_group: TURBO, type: episode, parsing_time: 0.197958946228, total_time: 0.314275026321, absolute_episode: [], quality: 1080p HDTV
2017-05-30 15:24:03 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Allowed, Preferred = [ SDTV, SD DVD, 720p HDTV, RawHD, 1080p HDTV, 720p WEB-DL, 1080p WEB-DL, 720p BluRay, 1080p BluRay, 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ 1080p WEB-DL ] Found = [ 1080p HDTV ]
2017-05-30 15:24:04 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: 'Prison Break' S00E11 status is: 'DOWNLOADED (720P WEB-DL)'. Ignoring result with quality '1080p HDTV'. Reason: New quality is same/lower quality (and not preferred). Ignoring new quality
2017-05-30 15:24:04 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Ignoring Prison.Break.S05E00.Resurrection.1080p.HDTV.H264.TURBO
2017-05-30 15:24:04 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Scene numbering enabled series Prison Break using indexer numbering: S00E11
2017-05-30 15:24:04 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Converted parsed result Prison.Break.S05E00.Resurrection.720p.HDTV.x264.TURBO into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 720p, format: HDTV, video_codec: h264, video_encoder: x264, release_group: TURBO, type: episode, parsing_time: 0.200011014938, total_time: None, absolute_episode: [], quality: 720p HDTV
2017-05-30 15:24:04 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Matched release Prison.Break.S05E00.Resurrection.720p.HDTV.x264.TURBO to a series in your database: Prison Break
2017-05-30 15:24:04 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Parsed Prison.Break.S05E00.Resurrection.720p.HDTV.x264.TURBO into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 720p, format: HDTV, video_codec: h264, video_encoder: x264, release_group: TURBO, type: episode, parsing_time: 0.200011014938, total_time: 0.310570001602, absolute_episode: [], quality: 720p HDTV
2017-05-30 15:24:04 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Allowed, Preferred = [ SDTV, SD DVD, 720p HDTV, RawHD, 1080p HDTV, 720p WEB-DL, 1080p WEB-DL, 720p BluRay, 1080p BluRay, 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ 1080p WEB-DL ] Found = [ 720p HDTV ]
2017-05-30 15:24:04 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: 'Prison Break' S00E11 status is: 'DOWNLOADED (720P WEB-DL)'. Ignoring result with quality '720p HDTV'. Reason: New quality is same/lower quality (and not preferred). Ignoring new quality
2017-05-30 15:24:04 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Ignoring Prison.Break.S05E00.Resurrection.720p.HDTV.x264.TURBO
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Scene numbering enabled series Prison Break using indexer numbering: S00E11
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Converted parsed result Prison.Break.S05E00.Resurrection.HDTV.x264.TURBO.rarbg into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, format: HDTV, video_codec: h264, video_encoder: x264, release_group: TURBO, type: episode, parsing_time: 0.173194169998, total_time: None, absolute_episode: [], quality: SDTV
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Matched release Prison.Break.S05E00.Resurrection.HDTV.x264.TURBO.rarbg to a series in your database: Prison Break
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Parsed Prison.Break.S05E00.Resurrection.HDTV.x264.TURBO.rarbg into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, format: HDTV, video_codec: h264, video_encoder: x264, release_group: TURBO, type: episode, parsing_time: 0.173194169998, total_time: 0.311713933945, absolute_episode: [], quality: SDTV
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Allowed, Preferred = [ SDTV, SD DVD, 720p HDTV, RawHD, 1080p HDTV, 720p WEB-DL, 1080p WEB-DL, 720p BluRay, 1080p BluRay, 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ 1080p WEB-DL ] Found = [ SDTV ]
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: 'Prison Break' S00E11 status is: 'DOWNLOADED (720P WEB-DL)'. Ignoring result with quality 'SDTV'. Reason: New quality is same/lower quality (and not preferred). Ignoring new quality
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Ignoring Prison.Break.S05E00.Resurrection.HDTV.x264.TURBO.rarbg
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Scene numbering enabled series Prison Break using indexer numbering: S00E11
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Converted parsed result Prison.Break.S05E00.Resurrection.480p.x264.mSD into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 480p, video_codec: h264, video_encoder: x264, release_group: mSD, type: episode, parsing_time: 0.187381982803, total_time: None, absolute_episode: [], quality: SDTV
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Matched release Prison.Break.S05E00.Resurrection.480p.x264.mSD to a series in your database: Prison Break
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Parsed Prison.Break.S05E00.Resurrection.480p.x264.mSD into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, screen_size: 480p, video_codec: h264, video_encoder: x264, release_group: mSD, type: episode, parsing_time: 0.187381982803, total_time: 0.310950040817, absolute_episode: [], quality: SDTV
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Allowed, Preferred = [ SDTV, SD DVD, 720p HDTV, RawHD, 1080p HDTV, 720p WEB-DL, 1080p WEB-DL, 720p BluRay, 1080p BluRay, 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ 1080p WEB-DL ] Found = [ SDTV ]
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: 'Prison Break' S00E11 status is: 'DOWNLOADED (720P WEB-DL)'. Ignoring result with quality 'SDTV'. Reason: New quality is same/lower quality (and not preferred). Ignoring new quality
2017-05-30 15:24:05 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Ignoring Prison.Break.S05E00.Resurrection.480p.x264.mSD
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Scene numbering enabled series Prison Break using indexer numbering: S00E11
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Converted parsed result Prison.Break.S05E00.Resurrection.XviD.AFG into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, video_codec: XviD, release_group: AFG, type: episode, parsing_time: 0.14687204361, total_time: None, absolute_episode: [], quality: Unknown
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Matched release Prison.Break.S05E00.Resurrection.XviD.AFG to a series in your database: Prison Break
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Parsed Prison.Break.S05E00.Resurrection.XviD.AFG into title: Prison Break, season: 0, episode: [11], episode_title: Resurrection, video_codec: XviD, release_group: AFG, type: episode, parsing_time: 0.14687204361, total_time: 0.311935901642, absolute_episode: [], quality: Unknown
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Allowed, Preferred = [ SDTV, SD DVD, 720p HDTV, RawHD, 1080p HDTV, 720p WEB-DL, 1080p WEB-DL, 720p BluRay, 1080p BluRay, 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ 1080p WEB-DL ] Found = [ Unknown ]
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Ignoring found result for 'Prison Break' S00E11 with unwanted quality 'Unknown'
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Ignoring Prison.Break.S05E00.Resurrection.XviD.AFG
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Using cached parse result for Prison.Break.S05E00.1080p.rus.LostFilm.TV.mkv
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Allowed, Preferred = [ SDTV, SD DVD, 720p HDTV, RawHD, 1080p HDTV, 720p WEB-DL, 1080p WEB-DL, 720p BluRay, 1080p BluRay, 4K UHD TV, 4K UHD WEB-DL, 4K UHD BluRay, 8K UHD TV, 8K UHD WEB-DL, 8K UHD BluRay ] [ 1080p WEB-DL ] Found = [ Unknown ]
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] 75340: Ignoring found result for 'Prison Break' S00E11 with unwanted quality 'Unknown'
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Ignoring Prison.Break.S05E00.1080p.rus.LostFilm.TV.mkv
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Search mode: Episode
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Search string: Prison Break S05E00
2017-05-30 15:24:06 DEBUG    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] GET URL: http://torrentproject.se/?orderby=latest&safe=on&filter=2101&start=0&s=Prison+Break+S05E00&num=40&hl=en [Status: 200]
2017-05-30 15:24:07 ERROR    SEARCHQUEUE-BACKLOG-75340 :: [TorrentProject] :: [94e0649] Failed parsing publishing date: 24 hours ago
Traceback (most recent call last):
  File "/home/pi/Medusa/medusa/providers/generic_provider.py", line 512, in parse_pubdate
    dt = parser.parse(pubdate, fuzzy=True)
  File "/home/pi/Medusa/lib/dateutil/parser.py", line 1181, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/home/pi/Medusa/lib/dateutil/parser.py", line 584, in parse
    ret = default.replace(**repl)
ValueError: hour must be in 0..23

# Fixed code
def parse(self, data, mode):
    """
    Parse search results for items.

    :param data: The raw response from a search
    :param mode: The current mode used to search, e.g. RSS

    :return: A list of items found
    """
    items = []

    with BS4Parser(data, "html5lib") as html:
        torrent_rows = html.find_all("div", class_="torrent")

        # Continue only if at least one release is found
        if not torrent_rows:
            log.debug("Data returned from provider does not contain any torrents")
            return items

        for row in torrent_rows:
            anchor = row.find("a")

            try:
                # Removes ' torrent' in the end
                title = anchor.get("title")[:-8]
                download_url = anchor.get("href")
                if not all([title, download_url]):
                    continue

                info_hash = download_url.split("/")[1]
                download_url = "magnet:?xt=urn:btih:{hash}&dn={title}{trackers}".format(
                    hash=info_hash, title=title, trackers=self._custom_trackers
                )

                seeders = try_int(
                    row.find("span", class_="bc seeders").find("span").get_text(), 1
                )
                leechers = try_int(
                    row.find("span", class_="bc leechers").find("span").get_text()
                )

                # Filter unseeded torrent
                if seeders < min(self.minseed, 1):
                    if mode != "RSS":
                        log.debug(
                            "Discarding torrent because it doesn't meet the"
                            " minimum seeders: {0}. Seeders: {1}",
                            title,
                            seeders,
                        )
                    continue

                torrent_size = (
                    row.find("span", class_="bc torrent-size").get_text().rstrip()
                )
                size = convert_size(torrent_size) or -1

                pubdate_raw = row.find("span", class_="bc cated").get_text(strip=True)
                pubdate = self.parse_pubdate(pubdate_raw, human_time=True)

                item = {
                    "title": title,
                    "link": download_url,
                    "size": size,
                    "seeders": seeders,
                    "leechers": leechers,
                    "pubdate": pubdate,
                }
                if mode != "RSS":
                    log.debug(
                        "Found result: {0} with {1} seeders and {2} leechers",
                        title,
                        seeders,
                        leechers,
                    )

                items.append(item)
            except (AttributeError, TypeError, KeyError, ValueError, IndexError):
                log.error(
                    "Failed parsing provider. Traceback: {0!r}", traceback.format_exc()
                )

        return items