# 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 = []
    torrent_rows = data.pop("torrents", {})

    if not torrent_rows:
        log.debug("Provider has no results for this search")
        return items

    for row in torrent_rows:
        try:
            title = row.get("name")
            download_url = row.get("download_link")
            if not all([title, download_url]):
                continue

            seeders = row.get("seeders")
            leechers = row.get("leechers")

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

            size = convert_size(row.get("size"), default=-1)

            item = {
                "title": title,
                "link": download_url,
                "size": size,
                "seeders": seeders,
                "leechers": leechers,
                "hash": "",
            }
            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.exception("Failed parsing provider.")

    return items


# Traceback (TypeError)
2019-06-24 12:36:35 ERROR    SEARCHQUEUE-FORCED-290853 :: [Xthor] :: [74c3f12] Failed parsing provider.
Traceback (most recent call last):
File "C:\Medusa\Medusa\medusa\providers\torrent\json\xthor.py", line 133, in parse
if seeders < self.minseed:
TypeError: '<' not supported between instances of 'str' and 'int'

# 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 = []
    torrent_rows = data.pop("torrents", {})

    if not torrent_rows:
        log.debug("Provider has no results for this search")
        return items

    for row in torrent_rows:
        try:
            title = row.get("name")
            download_url = row.get("download_link")
            if not all([title, download_url]):
                continue

            seeders = int(row.get("seeders"))
            leechers = int(row.get("leechers"))

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

            size = convert_size(row.get("size"), default=-1)

            item = {
                "title": title,
                "link": download_url,
                "size": size,
                "seeders": seeders,
                "leechers": leechers,
                "hash": "",
            }
            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.exception("Failed parsing provider.")

    return items