def __call__(self, curi):
        """
        Perform the URL extraction in case of a redirect code.

        I.e. if ``300 <= curi.status_code < 400``, then search for any
        HTTP ``Location`` header and append the given URL to the list of
        extracted URLs.
        """

        if 300 <= curi.status_code < 400 and curi.rep_header and \
            curi.rep_header in "Location":

            link = curi.rep_header["Location"]

            if link.find("://") == -1:
                # a relative link. this is bad behaviour, but yeah, you know...
                link = urlparse.urljoin(curi.url, link)

            if link not in self._not_found_redirects:
                if not hasattr(curi, "optional_vars"):
                    curi.optional_vars = dict()

                if not CURI_EXTRACTED_URLS in curi.optional_vars:
                    curi.optional_vars[CURI_EXTRACTED_URLS] = link
                else:
                    curi.optional_vars[CURI_EXTRACTED_URLS] += "\n" + link

        return curi
dataset/ETHPy150Open retresco/Spyder/src/spyder/processor/httpextractor.py/HttpExtractor.__call__/swapped operands of `in`