Nightmare Prom Memories

    @jswork/next-weibo-to-pics

    1.1.1 • Public • Published

    next-weibo-to-pics

    Sina weibo response to array.

    version license size download

    installation

    npm install -S @jswork/next-weibo-to-pics

    usage

    import '@jswork/next-weibo-to-pics';
    
    const html = `<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type="text/javascript">document.domain="sina.com.cn";</script>
    {"code":"A00006","data":{"count":1,"data":"eyJ1aWQiOjM2NjE4MzI4MDMsImFwcCI6Im1pbmlibG9nIiwiY291bnQiOjEsInRpbWUiOjE2MjA4ODIyNTQuNTMzLCJwaWNzIjp7InBpY18xIjp7IndpZHRoIjoyMDAsInNpemUiOjkzODksInJldCI6MSwiaGVpZ2h0IjoyMDAsIm5hbWUiOiJwaWNfMSIsInBpZCI6ImRhNDMyMjYzZ3kxZ3FncHUzdTBhbWoyMDVrMDVrM3loIn19fQ==","pics":{"pic_1":{"width":200,"size":9389,"ret":1,"height":200,"name":"pic_1","pid":"da432263gy1gqgpu3u0amj205k05k3yh"}}}}`;
    
    const items = nx.weiboToPics(html);
    /*
    [
      {
        width: 200,
        size: 9389,
        ret: 1,
        height: 200,
        name: 'pic_1',
        pid: 'da432263gy1gqgpu3u0amj205k05k3yh',
        type: 'jpg',
        url: 'https://tva1.sinaimg.cn/large/da432263gy1gqgpu3u0amj205k05k3yh.jpg'
      }
    ]
    */

    license

    Code released under the MIT license.

    Install

    npm i @jswork/next-weibo-to-pics

    DownloadsWeekly Downloads

    3

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    6.08 kB

    Total Files

    5

    Last publish

    Collaborators

    • afeiship