zoukankan      html  css  js  c++  java
  • 【python】安装py3-bencode 及小例程

    C:Usershorn1Desktoppython35-bencode-ng>pip install py3-bencode
    Collecting py3-bencode
    Downloading https://files.pythonhosted.org/packages/20/07/88a2f4f3b6ca6b92dcb46b36be1f97de210ae27409ba87c97a5a615f630a/py3_bencode-0.0.2-py3-none-any.whl
    Installing collected packages: py3-bencode
    Successfully installed py3-bencode-0.0.2

    小例程如下:

    from bencode import bencode, bdecode
    
    
    foo = bencode('http://www.cnblogs.com/xiandedanteng/')
    print(foo)
    
    bar = bdecode(foo)
    print(bar)

    输出如下:

    C:Usershorn1Desktoppython35-bencode-ng>python torrentParser.py
    bytearray(b'37:http://www.cnblogs.com/xiandedanteng/')
    bytearray(b'http://www.cnblogs.com/xiandedanteng/')
  • 相关阅读:
    E
    C
    航空母舰-03
    航空母舰-02
    航空母舰-01
    新概念4-30
    html
    翁凯-编程学习方法
    机器学习Ng-02
    民法-钟秀勇-导学
  • 原文地址:https://www.cnblogs.com/heyang78/p/9006651.html
Copyright © 2011-2022 走看看