@classmethod<EOL><INDENT>def from_url(cls, db_url=ALL_SETS_ZIP_URL):<DEDENT>
r = requests.get(db_url)<EOL>r.raise_for_status()<EOL>if r.headers['<STR_LIT>'] == '<STR_LIT:application/json>':<EOL><INDENT>return cls(json.loads(r.text))<EOL><DEDENT>if r.headers['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>with zipfile.ZipFile(six.BytesIO(r.content), '<STR_LIT:r>') as zf:<EOL><INDENT>names = zf.namelist()<EOL>assert len(names) == <NUM_LIT:1>, '<STR_LIT>'<EOL>return cls.from_file(io.TextIOWrapper(<EOL>zf.open(names[<NUM_LIT:0>]),<EOL>encoding='<STR_LIT:utf8>'))<EOL><DEDENT><DEDENT>
Load card data from a URL.

        Uses :func:`requests.get` to fetch card data. Also handles zipfiles.

        :param db_url: URL to fetch.
        :return: A new :class:`~mtgjson.CardDb` instance.