Proper Use Of Python 3.x AMFY Module
Question: How am I supposed to use the Amfy module? I try to use it like the JSON module
(`amfy.loads` or `amfy.load`), but it just gives me errors:

    
    
    C:\Users\Other>"C:\Users\Other\Desktop\Python3.5.2\test amf.py"
    Traceback (most recent call last):
      File "C:\Users\Other\Desktop\Python3.5.2\test amf.py", line 4, in <module>
        print(amfy.load(cn_rsp.text))
      File "C:\Users\Other\Desktop\Python3.5.2\lib\site-packages\amfy\__init__.py", line 9, in load
        return Loader().load(input, proto=proto)
      File "C:\Users\Other\Desktop\Python3.5.2\lib\site-packages\amfy\core.py", line 33, in load
        return self._read_item3(stream, context)
      File "C:\Users\Other\Desktop\Python3.5.2\lib\site-packages\amfy\core.py", line 52, in _read_item3
        marker = stream.read(1)[0]
    AttributeError: 'str' object has no attribute 'read'
    

this is what I wrote:

    
    
    import requests
    import amfy
    cn_rsp = requests.get("http://realm498.c10.castle.rykaiju.com/api/locales/en/get_serialized_new")
    print(amfy.load(cn_rsp.text))
    


Answer: The `load` method expects an input stream, you provide it a string. Just
convert your string into a memory buffer which supports `read` method like
this:

    
    
    import io
    print(amfy.load(io.BytesIO(cn_rsp.text.encode())))
    

unfortunately serialization fails when using this. Is there another url where
it would work, a test URL maybe?

    
    
      File "C:\Python34\lib\site-packages\amfy\core.py", line 146, in _read_vli
        byte = stream.read(1)[0]
    IndexError: index out of range
    

