建站日志(3)——添加表情包
本文最后更新于467 天前,其中的信息可能已经过时,如有错误请发送邮件到lysun26@163.com

前言

今天咳嗽+喉咙痛,不想要复习明天的考试,又因不想躺着,就折腾了一下网站的表情包。因为一直很喜欢B站的表情包,就想着把B站的表情包加进来。首先去查看了一下Argon主题的文档,发现还是挺简单的,示例代码如下:

array(
        array(
            'groupname' => '颜文字', 
            'list' => array(
                array('type' => 'text', 'text' => "|´・ω・)ノ"),
                array('type' => 'text', 'text' => "ヾ(≧∇≦*)ゝ"),
                array('type' => 'text', 'text' => "(☆ω☆)")
            )
        ),
        array(
            'groupname' => 'Emoji', 
            'list' => array(
                array('type' => 'text', 'text' => "?"),
                array('type' => 'text', 'text' => "?"),
                array('type' => 'text', 'text' => "?")
            )
        ),
        array(
            'groupname' => '小恐龙', 
            'list' => array(
                array('type' => 'sticker', 'code' => 'dinosaur-shy', 'src' => $GLOBALS['assets_path'] . '/stickers/dinosaur/1.jpg'),
                array('type' => 'sticker', 'code' => 'dinosaur-daze', 'src' => $GLOBALS['assets_path'] . '/stickers/dinosaur/2.jpg'),
                array('type' => 'sticker', 'code' => 'dinosaur-sweat', 'src' => $GLOBALS['assets_path'] . '/stickers/dinosaur/3.jpg'),
            )
        ),
        array(
            'groupname' => '花!', 
            'list' => array(
                array('type' => 'sticker', 'code' => 'flower-flower', 'src' => $GLOBALS['assets_path'] . '/stickers/flower/1.jpg'),
                array('type' => 'sticker', 'code' => 'flower-grass', 'src' => $GLOBALS['assets_path'] . '/stickers/flower/2.jpg'),
                array('type' => 'sticker', 'code' => 'flower-leaf', 'src' => $GLOBALS['assets_path'] . '/stickers/flower/3.jpg'),
            ),
            'description' => 'Source: github.com/k4yt3x/flowerhd'
        )
    );

可以看到,就是写groupname、code、src即可。(如果是Argon主题,这一部分代码在emotions.php文件中)

获取表情包

首先我去往上找了找有没有人分享表情包,但结果是没有(可能只是因为我懒得深入寻找)。然后在B站评论区上,对其中一个表情包右键,可以发现有个“复制图片地址”选项,复制后可以得到一个地址,可以发现这个地址就是图片的地址。

这时可以把该表情包下载下来,然后上传到服务器上,按照上面的格式写好即可,或者是直接让src的值为该图片地址。但由于表情包过多,逐个操作十分繁琐,于是我就写了段爬虫程序将表情包的名字和地址爬取了下来。爬虫还是比较简单的,源码我就放到最后了。你如果需要下载下来的话,可以在程序中写段代码将其下载下来,由于我好久没学python了,懒得搞了

emotions.php增加的内容如下(可能会存在逗号或括号的问题):

array(
    'groupname' => '小黄脸', 
    'list' => array(
        array('type' => 'sticker', 'code' => '[足球]', 'src' => 'http://i0.hdslb.com/bfs/emote/f9157d9fa5ac3b8339cb8a8b7ad70eb40d4113c9.png'),
        array('type' => 'sticker', 'code' => '[脱单doge]', 'src' => 'http://i0.hdslb.com/bfs/emote/bf7e00ecab02171f8461ee8cf439c73db9797748.png'),
        array('type' => 'sticker', 'code' => '[微笑]', 'src' => 'http://i0.hdslb.com/bfs/emote/685612eadc33f6bc233776c6241813385844f182.png'),
        array('type' => 'sticker', 'code' => '[口罩]', 'src' => 'http://i0.hdslb.com/bfs/emote/3ad2f66b151496d2a5fb0a8ea75f32265d778dd3.png'),
        array('type' => 'sticker', 'code' => '[doge]', 'src' => 'http://i0.hdslb.com/bfs/emote/3087d273a78ccaff4bb1e9972e2ba2a7583c9f11.png'),
        array('type' => 'sticker', 'code' => '[妙啊]', 'src' => 'http://i0.hdslb.com/bfs/emote/b4cb77159d58614a9b787b91b1cd22a81f383535.png'),
        array('type' => 'sticker', 'code' => '[OK]', 'src' => 'http://i0.hdslb.com/bfs/emote/4683fd9ffc925fa6423110979d7dcac5eda297f4.png'),
        array('type' => 'sticker', 'code' => '[星星眼]', 'src' => 'http://i0.hdslb.com/bfs/emote/63c9d1a31c0da745b61cdb35e0ecb28635675db2.png'),
        array('type' => 'sticker', 'code' => '[辣眼睛]', 'src' => 'http://i0.hdslb.com/bfs/emote/35d62c496d1e4ea9e091243fa812866f5fecc101.png'),
        array('type' => 'sticker', 'code' => '[吃瓜]', 'src' => 'http://i0.hdslb.com/bfs/emote/4191ce3c44c2b3df8fd97c33f85d3ab15f4f3c84.png'),
        array('type' => 'sticker', 'code' => '[滑稽]', 'src' => 'http://i0.hdslb.com/bfs/emote/d15121545a99ac46774f1f4465b895fe2d1411c3.png'),
        array('type' => 'sticker', 'code' => '[呲牙]', 'src' => 'http://i0.hdslb.com/bfs/emote/b5a5898491944a4268360f2e7a84623149672eb6.png'),
        array('type' => 'sticker', 'code' => '[打call]', 'src' => 'http://i0.hdslb.com/bfs/emote/431432c43da3ee5aab5b0e4f8931953e649e9975.png'),
        array('type' => 'sticker', 'code' => '[歪嘴]', 'src' => 'http://i0.hdslb.com/bfs/emote/4384050fbab0586259acdd170b510fe262f08a17.png'),
        array('type' => 'sticker', 'code' => '[调皮]', 'src' => 'http://i0.hdslb.com/bfs/emote/8290b7308325e3179d2154327c85640af1528617.png'),
        array('type' => 'sticker', 'code' => '[2022]', 'src' => 'http://i0.hdslb.com/bfs/emote/a783df2ce72952c44004007462324bde4b092a0c.png'),
        array('type' => 'sticker', 'code' => '[虎年]', 'src' => 'http://i0.hdslb.com/bfs/emote/a062f5fa2bafe677e49b6963a2bbb11dd4fe1e11.png'),
        array('type' => 'sticker', 'code' => '[豹富]', 'src' => 'http://i0.hdslb.com/bfs/emote/3d1dbe52ea16e12ff7b1c371196f728a4097fb33.png'),
        array('type' => 'sticker', 'code' => '[嗑瓜子]', 'src' => 'http://i0.hdslb.com/bfs/emote/28a91da1685d90124cfeead74622e1ebb417c0eb.png'),
        array('type' => 'sticker', 'code' => '[笑哭]', 'src' => 'http://i0.hdslb.com/bfs/emote/c3043ba94babf824dea03ce500d0e73763bf4f40.png'),
        array('type' => 'sticker', 'code' => '[藏狐]', 'src' => 'http://i0.hdslb.com/bfs/emote/ba0937ef6f3ccca85e2e0047e6263f3b4da37201.png'),
        array('type' => 'sticker', 'code' => '[脸红]', 'src' => 'http://i0.hdslb.com/bfs/emote/0922c375da40e6b69002bd89b858572f424dcfca.png'),
        array('type' => 'sticker', 'code' => '[给心心]', 'src' => 'http://i0.hdslb.com/bfs/emote/1597302b98827463f5b75c7cac1f29ea6ce572c4.png'),
        array('type' => 'sticker', 'code' => '[嘟嘟]', 'src' => 'http://i0.hdslb.com/bfs/emote/abd7404537d8162720ccbba9e0a8cdf75547e07a.png'),
        array('type' => 'sticker', 'code' => '[哦呼]', 'src' => 'http://i0.hdslb.com/bfs/emote/362bded07ea5434886271d23fa25f5d85d8af06c.png'),
        array('type' => 'sticker', 'code' => '[喜欢]', 'src' => 'http://i0.hdslb.com/bfs/emote/8a10a4d73a89f665feff3d46ca56e83dc68f9eb8.png'),
        array('type' => 'sticker', 'code' => '[酸了]', 'src' => 'http://i0.hdslb.com/bfs/emote/92b1c8cbceea3ae0e8e32253ea414783e8ba7806.png'),
        array('type' => 'sticker', 'code' => '[嫌弃]', 'src' => 'http://i0.hdslb.com/bfs/emote/de4c0783aaa60ec03de0a2b90858927bfad7154b.png'),
        array('type' => 'sticker', 'code' => '[大哭]', 'src' => 'http://i0.hdslb.com/bfs/emote/2caafee2e5db4db72104650d87810cc2c123fc86.png'),
        array('type' => 'sticker', 'code' => '[害羞]', 'src' => 'http://i0.hdslb.com/bfs/emote/9d2ec4e1fbd6cb1b4d12d2bbbdd124ccb83ddfda.png'),
        array('type' => 'sticker', 'code' => '[疑惑]', 'src' => 'http://i0.hdslb.com/bfs/emote/b7840db4b1f9f4726b7cb23c0972720c1698d661.png'),
        array('type' => 'sticker', 'code' => '[喜极而泣]', 'src' => 'http://i0.hdslb.com/bfs/emote/485a7e0c01c2d70707daae53bee4a9e2e31ef1ed.png'),
        array('type' => 'sticker', 'code' => '[奸笑]', 'src' => 'http://i0.hdslb.com/bfs/emote/bb84906573472f0a84cebad1e9000eb6164a6f5a.png'),
        array('type' => 'sticker', 'code' => '[笑]', 'src' => 'http://i0.hdslb.com/bfs/emote/81edf17314cea3b48674312b4364df44d5c01f17.png'),
        array('type' => 'sticker', 'code' => '[偷笑]', 'src' => 'http://i0.hdslb.com/bfs/emote/6c49d226e76c42cd8002abc47b3112bc5a92f66a.png'),
        array('type' => 'sticker', 'code' => '[惊讶]', 'src' => 'http://i0.hdslb.com/bfs/emote/f8e9a59cad52ae1a19622805696a35f0a0d853f3.png'),
        array('type' => 'sticker', 'code' => '[捂脸]', 'src' => 'http://i0.hdslb.com/bfs/emote/6921bb43f0c634870b92f4a8ad41dada94a5296d.png'),
        array('type' => 'sticker', 'code' => '[阴险]', 'src' => 'http://i0.hdslb.com/bfs/emote/ba8d5f8e7d136d59aab52c40fd3b8a43419eb03c.png'),
        array('type' => 'sticker', 'code' => '[囧]', 'src' => 'http://i0.hdslb.com/bfs/emote/12e41d357a9807cc80ef1e1ed258127fcc791424.png'),
        array('type' => 'sticker', 'code' => '[呆]', 'src' => 'http://i0.hdslb.com/bfs/emote/33ad6000d9f9f168a0976bc60937786f239e5d8c.png'),
        array('type' => 'sticker', 'code' => '[抠鼻]', 'src' => 'http://i0.hdslb.com/bfs/emote/cb89184c97e3f6d50acfd7961c313ce50360d70f.png'),
        array('type' => 'sticker', 'code' => '[大笑]', 'src' => 'http://i0.hdslb.com/bfs/emote/ca94ad1c7e6dac895eb5b33b7836b634c614d1c0.png'),
        array('type' => 'sticker', 'code' => '[惊喜]', 'src' => 'http://i0.hdslb.com/bfs/emote/0afecaf3a3499479af946f29749e1a6c285b6f65.png'),
        array('type' => 'sticker', 'code' => '[无语]', 'src' => 'http://i0.hdslb.com/bfs/emote/44667b7d9349957e903b1b62cb91fb9b13720f04.png'),
        array('type' => 'sticker', 'code' => '[点赞]', 'src' => 'http://i0.hdslb.com/bfs/emote/1a67265993913f4c35d15a6028a30724e83e7d35.png'),
        array('type' => 'sticker', 'code' => '[鼓掌]', 'src' => 'http://i0.hdslb.com/bfs/emote/895d1fc616b4b6c830cf96012880818c0e1de00d.png'),
        array('type' => 'sticker', 'code' => '[尴尬]', 'src' => 'http://i0.hdslb.com/bfs/emote/cb321684ed5ce6eacdc2699092ab8fe7679e4fda.png'),
        array('type' => 'sticker', 'code' => '[灵魂出窍]', 'src' => 'http://i0.hdslb.com/bfs/emote/43d3db7d97343c01b47e22cfabeca84b4251f35a.png'),
        array('type' => 'sticker', 'code' => '[委屈]', 'src' => 'http://i0.hdslb.com/bfs/emote/d2f26cbdd6c96960320af03f5514c5b524990840.png'),
        array('type' => 'sticker', 'code' => '[傲娇]', 'src' => 'http://i0.hdslb.com/bfs/emote/010540d0f61220a0db4922e4a679a1d8eca94f4e.png'),
        array('type' => 'sticker', 'code' => '[疼]', 'src' => 'http://i0.hdslb.com/bfs/emote/905fd9a99ec316e353b9bd4ecd49a5f0a301eabf.png'),
        array('type' => 'sticker', 'code' => '[冷]', 'src' => 'http://i0.hdslb.com/bfs/emote/cb0ebbd0668640f07ebfc0e03f7a18a8cd00b4ed.png'),
        array('type' => 'sticker', 'code' => '[热]', 'src' => 'http://i0.hdslb.com/bfs/emote/4e58a2a6f5f1580ac33df2d2cf7ecad7d9ab3635.png'),
        array('type' => 'sticker', 'code' => '[生病]', 'src' => 'http://i0.hdslb.com/bfs/emote/0f25ce04ae1d7baf98650986454c634f6612cb76.png'),
        array('type' => 'sticker', 'code' => '[吓]', 'src' => 'http://i0.hdslb.com/bfs/emote/9c10c5ebc7bef27ec641b8a1877674e0c65fea5d.png'),
        array('type' => 'sticker', 'code' => '[吐]', 'src' => 'http://i0.hdslb.com/bfs/emote/06946bfe71ac48a6078a0b662181bb5cad09decc.png'),
        array('type' => 'sticker', 'code' => '[捂眼]', 'src' => 'http://i0.hdslb.com/bfs/emote/c5c6d6982e1e53e478daae554b239f2b227b172b.png'),
        array('type' => 'sticker', 'code' => '[嘘声]', 'src' => 'http://i0.hdslb.com/bfs/emote/e64af664d20716e090f10411496998095f62f844.png'),
        array('type' => 'sticker', 'code' => '[思考]', 'src' => 'http://i0.hdslb.com/bfs/emote/cfa9b7e89e4bfe04bbcd34ccb1b0df37f4fa905c.png'),
        array('type' => 'sticker', 'code' => '[再见]', 'src' => 'http://i0.hdslb.com/bfs/emote/fc510306bae26c9aec7e287cdf201ded27b065b9.png'),
        array('type' => 'sticker', 'code' => '[翻白眼]', 'src' => 'http://i0.hdslb.com/bfs/emote/eba54707c7168925b18f6f8b1f48d532fe08c2b1.png'),
        array('type' => 'sticker', 'code' => '[哈欠]', 'src' => 'http://i0.hdslb.com/bfs/emote/888d877729cbec444ddbd1cf4c9af155a7a06086.png'),
        array('type' => 'sticker', 'code' => '[奋斗]', 'src' => 'http://i0.hdslb.com/bfs/emote/bb2060c15dba7d3fd731c35079d1617f1afe3376.png'),
        array('type' => 'sticker', 'code' => '[墨镜]', 'src' => 'http://i0.hdslb.com/bfs/emote/3a03aebfc06339d86a68c2d893303b46f4b85771.png'),
        array('type' => 'sticker', 'code' => '[难过]', 'src' => 'http://i0.hdslb.com/bfs/emote/a651db36701610aa70a781fa98c07c9789b11543.png'),
        array('type' => 'sticker', 'code' => '[撇嘴]', 'src' => 'http://i0.hdslb.com/bfs/emote/531863568e5668c5ac181d395508a0eeb1f0cda4.png'),
        array('type' => 'sticker', 'code' => '[抓狂]', 'src' => 'http://i0.hdslb.com/bfs/emote/4c87afff88c22439c45b79e9d2035d21d5622eba.png'),
        array('type' => 'sticker', 'code' => '[生气]', 'src' => 'http://i0.hdslb.com/bfs/emote/3195714219c4b582a4fb02033dd1519913d0246d.png'),
        array('type' => 'sticker', 'code' => '[水稻]', 'src' => 'http://i0.hdslb.com/bfs/emote/d530fcaa5100ba12a17a79b55bad342d530c54e3.png'),
        array('type' => 'sticker', 'code' => '[奶茶干杯]', 'src' => 'http://i0.hdslb.com/bfs/emote/d5a491990be551ce69f9660da948050df4eab331.png'),
        array('type' => 'sticker', 'code' => '[汤圆]', 'src' => 'http://i0.hdslb.com/bfs/emote/93609633a9d194cf336687eb19c01dca95bde719.png'),
        array('type' => 'sticker', 'code' => '[锦鲤]', 'src' => 'http://i0.hdslb.com/bfs/emote/643d6c19c8164ffd89e3e9cdf093cf5d773d979c.png'),
        array('type' => 'sticker', 'code' => '[弹幕破百亿]', 'src' => 'http://i0.hdslb.com/bfs/emote/80891223ba023dff3141e377f4ea3b89918eb6a4.png'),
        array('type' => 'sticker', 'code' => '[福到了]', 'src' => 'http://i0.hdslb.com/bfs/emote/5de5373d354c373cf1617b6b836f3a8d53c5a655.png'),
        array('type' => 'sticker', 'code' => '[鸡腿]', 'src' => 'http://i0.hdslb.com/bfs/emote/c7860392815d345fa69c4f00ef18d67dccfbd574.png'),
        array('type' => 'sticker', 'code' => '[雪花]', 'src' => 'http://i0.hdslb.com/bfs/emote/a41813c4edf8782047e172c884ebd4507ce5e449.png'),
        array('type' => 'sticker', 'code' => '[视频卫星]', 'src' => 'http://i0.hdslb.com/bfs/emote/dce6fc7d6dfeafff01241924db60f8251cca5307.png'),
        array('type' => 'sticker', 'code' => '[干杯]', 'src' => 'http://i0.hdslb.com/bfs/emote/8da12d5f55a2c7e9778dcc05b40571979fe208e6.png'),
        array('type' => 'sticker', 'code' => '[黑洞]', 'src' => 'http://i0.hdslb.com/bfs/emote/c4e9f0e3f35961d5037cb071b16ddba2170b262c.png'),
        array('type' => 'sticker', 'code' => '[爱心]', 'src' => 'http://i0.hdslb.com/bfs/emote/ed04066ea7124106d17ffcaf75600700e5442f5c.png'),
        array('type' => 'sticker', 'code' => '[胜利]', 'src' => 'http://i0.hdslb.com/bfs/emote/b49fa9f4b1e7c3477918153b82c60b114d87347c.png'),
        array('type' => 'sticker', 'code' => '[加油]', 'src' => 'http://i0.hdslb.com/bfs/emote/c7aaeacb21e107292d3bb053e5abde4a4459ed30.png'),
        array('type' => 'sticker', 'code' => '[抱拳]', 'src' => 'http://i0.hdslb.com/bfs/emote/89516218158dbea18ab78e8873060bf95d33bbbe.png'),
        array('type' => 'sticker', 'code' => '[响指]', 'src' => 'http://i0.hdslb.com/bfs/emote/1b5c53cf14336903e1d2ae3527ca380a1256a077.png'),
        array('type' => 'sticker', 'code' => '[保佑]', 'src' => 'http://i0.hdslb.com/bfs/emote/fafe8d3de0dc139ebe995491d2dac458a865fb30.png'),
        array('type' => 'sticker', 'code' => '[支持]', 'src' => 'http://i0.hdslb.com/bfs/emote/3c210366a5585706c09d4c686a9d942b39feeb50.png'),
        array('type' => 'sticker', 'code' => '[拥抱]', 'src' => 'http://i0.hdslb.com/bfs/emote/41780a4254750cdaaccb20735730a36044e98ef3.png'),
        array('type' => 'sticker', 'code' => '[跪了]', 'src' => 'http://i0.hdslb.com/bfs/emote/f2b3aee7e521de7799d4e3aa379b01be032698ac.png'),
        array('type' => 'sticker', 'code' => '[怪我咯]', 'src' => 'http://i0.hdslb.com/bfs/emote/07cc6077f7f7d75b8d2c722dd9d9828a9fb9e46d.png'),
        array('type' => 'sticker', 'code' => '[老鼠]', 'src' => 'http://i0.hdslb.com/bfs/emote/8e6fb491eb1bb0d5862e7ec8ccf9a3da12b6c155.png'),
        array('type' => 'sticker', 'code' => '[牛年]', 'src' => 'http://i0.hdslb.com/bfs/emote/9275275ff1f2659310648221107d20bc4970f106.png'),
        array('type' => 'sticker', 'code' => '[三星堆]', 'src' => 'http://i0.hdslb.com/bfs/emote/fc7dadaa6986e75b813aa26f3eff3281d5f1a6d1.png'),
        array('type' => 'sticker', 'code' => '[洛天依]', 'src' => 'http://i0.hdslb.com/bfs/emote/9fe06f3594d9afaf4ee2b74770f1c3086ae0ba11.png'),
        array('type' => 'sticker', 'code' => '[坎公骑冠剑_吃鸡]', 'src' => 'http://i0.hdslb.com/bfs/emote/c4248a7b6ab326d66c83fd1fb58f1a50f99df332.png'),
        array('type' => 'sticker', 'code' => '[坎公骑冠剑_钻石]', 'src' => 'http://i0.hdslb.com/bfs/emote/0b97c7e50e0cc963370e62fbb9b55f51bbe7f8ab.png'),
        array('type' => 'sticker', 'code' => '[坎公骑冠剑_无语]', 'src' => 'http://i0.hdslb.com/bfs/emote/80eba0ce64c3fc1279b4daede2f1979cb2380e78.png'),
        array('type' => 'sticker', 'code' => '[来古-沉思]', 'src' => 'http://i0.hdslb.com/bfs/emote/4ee07ff03266d62b246be0b950bebb2abf3d997c.png'),
        array('type' => 'sticker', 'code' => '[来古-呆滞]', 'src' => 'http://i0.hdslb.com/bfs/emote/9a70b365e523f2379f395031ceefcebb75a45903.png'),
        array('type' => 'sticker', 'code' => '[来古-疑问]', 'src' => 'http://i0.hdslb.com/bfs/emote/032fdc0d9d9fe6334776f6c39518a959b73b98f4.png'),
        array('type' => 'sticker', 'code' => '[来古-震撼]', 'src' => 'http://i0.hdslb.com/bfs/emote/8b40f228675602a317d32007de6b795c101135ec.png'),
        array('type' => 'sticker', 'code' => '[来古-注意]', 'src' => 'http://i0.hdslb.com/bfs/emote/4b671ba32a2581cf40e5cd41c67b111eb8010de0.png'),
        array('type' => 'sticker', 'code' => '[初音未来_大笑]', 'src' => 'http://i0.hdslb.com/bfs/emote/8e7f71cda83ce407b0684702983399f8ed982f17.png'),
        array('type' => 'sticker', 'code' => '[原神_哇]', 'src' => 'http://i0.hdslb.com/bfs/emote/8188ddf95bace929d382c7a83214afde79d83bfc.png'),
        array('type' => 'sticker', 'code' => '[原神_哼]', 'src' => 'http://i0.hdslb.com/bfs/emote/91ed33b74bc36873c3ac8b2648f70d7ab6d8ab78.png'),
        array('type' => 'sticker', 'code' => '[原神_嗯]', 'src' => 'http://i0.hdslb.com/bfs/emote/8b0a87e414f453a29730b6e0f45ca61f2f898688.png'),
        array('type' => 'sticker', 'code' => '[原神_欸嘿]', 'src' => 'http://i0.hdslb.com/bfs/emote/8fba438fcbe0550877b04efd768d857082307c5e.png'),
        array('type' => 'sticker', 'code' => '[原神_喝茶]', 'src' => 'http://i0.hdslb.com/bfs/emote/1de5789fbb3526ef7823c54db7081790a38e7044.png'),
        array('type' => 'sticker', 'code' => '[原神_生气]', 'src' => 'http://i0.hdslb.com/bfs/emote/90a38c34742899f8e84138ed55f56cad3ba611fb.png'),
        array('type' => 'sticker', 'code' => '[保卫萝卜_白眼]', 'src' => 'http://i0.hdslb.com/bfs/emote/9fce63f38288700bf7be84f3be336cf895ba0902.png'),
        array('type' => 'sticker', 'code' => '[保卫萝卜_笔芯]', 'src' => 'http://i0.hdslb.com/bfs/emote/5ff2ed5cb71b02010018cc5910ac7052a03769af.png'),
        array('type' => 'sticker', 'code' => '[保卫萝卜_哭哭]', 'src' => 'http://i0.hdslb.com/bfs/emote/7d249f7c990111d3e2982f7477af15b7eb29cbd9.png'),
        array('type' => 'sticker', 'code' => '[保卫萝卜_哇]', 'src' => 'http://i0.hdslb.com/bfs/emote/5f2370e561c32d841245f7b1aab2eef43aeb9544.png'),
        array('type' => 'sticker', 'code' => '[保卫萝卜_问号]', 'src' => 'http://i0.hdslb.com/bfs/emote/41eb93f09fc4a4d0692a310e8a1f85ba60e96060.png'),
        array('type' => 'sticker', 'code' => '[无悔华夏_不愧是你]', 'src' => 'http://i0.hdslb.com/bfs/emote/c58002c32ee78d45366e126f294cb3149dd64ac2.png'),
        array('type' => 'sticker', 'code' => '[无悔华夏_吃瓜]', 'src' => 'http://i0.hdslb.com/bfs/emote/273dcff577551bafff4f1eae18561f871e73a6ba.png'),
        array('type' => 'sticker', 'code' => '[无悔华夏_达咩]', 'src' => 'http://i0.hdslb.com/bfs/emote/cffab383f47bab7f6736ba9c8d6ac098113410d9.png'),
        array('type' => 'sticker', 'code' => '[无悔华夏_点赞]', 'src' => 'http://i0.hdslb.com/bfs/emote/b0f2e8db405ec667c3e6aaabd7c15155b6ea8710.png'),
        array('type' => 'sticker', 'code' => '[无悔华夏_好耶]', 'src' => 'http://i0.hdslb.com/bfs/emote/324cd79784aeb37dbf2f47f68bbe8ed5d01f975e.png'),
        array('type' => 'sticker', 'code' => '[奥比岛_搬砖]', 'src' => 'http://i0.hdslb.com/bfs/emote/1fab697214918d91087373a999cc7ef8040ddf85.png'),
        array('type' => 'sticker', 'code' => '[奥比岛_点赞]', 'src' => 'http://i0.hdslb.com/bfs/emote/fb0b476fe2ff30cd59385ea7d616627ac114161f.png'),
        array('type' => 'sticker', 'code' => '[奥比岛_击爪]', 'src' => 'http://i0.hdslb.com/bfs/emote/35bba1bb8f164c5e844155548438248e6eaa8382.png'),
        array('type' => 'sticker', 'code' => '[奥比岛_委屈]', 'src' => 'http://i0.hdslb.com/bfs/emote/fda155e7c33b40dbb94c24644e0635d47b6ef3cc.png'),
        array('type' => 'sticker', 'code' => '[奥比岛_喜欢]', 'src' => 'http://i0.hdslb.com/bfs/emote/ed64e0c81ee194138bd9df30c65077ed978fb88c.png')
    ),
),
array(
    'groupname' => '热词系列一', 
    'list' => array(
        array('type' => 'sticker', 'code' => '[热词系列_三连]', 'src' => 'http://i0.hdslb.com/bfs/emote/21f15fe11b7a84d2f2121c16dec50a4e4556f865.png'),
        array('type' => 'sticker', 'code' => '[热词系列_知识增加]', 'src' => 'http://i0.hdslb.com/bfs/emote/5637557320fbfb3292307735f0b8acd53a791241.png'),
        array('type' => 'sticker', 'code' => '[热词表情_哎呦不错哦]', 'src' => 'http://i0.hdslb.com/bfs/emote/6209c2cdcdeb014efd9eae4e9d55b9efb9c18263.png'),
        array('type' => 'sticker', 'code' => '[热词系列_好耶]', 'src' => 'http://i0.hdslb.com/bfs/emote/ee2d354d3e67e5d77bab31ad8af99cd5ac89c009.png'),
        array('type' => 'sticker', 'code' => '[热词系列_你币有了]', 'src' => 'http://i0.hdslb.com/bfs/emote/84820c2b147a8ca02f3c4006b63f76c6313cbfa0.png'),
        array('type' => 'sticker', 'code' => '[热词系列_对象]', 'src' => 'http://i0.hdslb.com/bfs/emote/a41763740a90c2b11bf282bf44ccee78066c98ff.png'),
        array('type' => 'sticker', 'code' => '[热词系列_不孤鸟]', 'src' => 'http://i0.hdslb.com/bfs/emote/7b94a0c3fe95c603a85a13bacbaf726b8e5882dc.png'),
        array('type' => 'sticker', 'code' => '[热词系列_洛水天依]', 'src' => 'http://i0.hdslb.com/bfs/emote/ab3845edcdc3bb8852c502f472a8caa9e921ae3a.png'),
        array('type' => 'sticker', 'code' => '[热词系列_优雅]', 'src' => 'http://i0.hdslb.com/bfs/emote/d41bc3db2a0d5ac32eee0b454062c057e6198a21.png'),
        array('type' => 'sticker', 'code' => '[热词系列_吹爆]', 'src' => 'http://i0.hdslb.com/bfs/emote/9c78c14bd395d75afeecd20276ec71324e9b97df.png'),
        array('type' => 'sticker', 'code' => '[热词系列_秀]', 'src' => 'http://i0.hdslb.com/bfs/emote/1f8ab5644a10c3a01cc32cfe8f4d000296b06fb4.png'),
        array('type' => 'sticker', 'code' => '[热词系列_妙啊]', 'src' => 'http://i0.hdslb.com/bfs/emote/3ed5b0b2e1f632884d93abe6ae2a387e6f4395fd.png'),
        array('type' => 'sticker', 'code' => '[热词系列_标准结局]', 'src' => 'http://i0.hdslb.com/bfs/emote/6b812dc41844ae4bdb3d6b7dd66067db6b922a5d.png'),
        array('type' => 'sticker', 'code' => '[热词系列_B站有房]', 'src' => 'http://i0.hdslb.com/bfs/emote/e2aeda75690b72b49ebc82f12e340678f5fc47c0.png'),
        array('type' => 'sticker', 'code' => '[热词系列_破防了]', 'src' => 'http://i0.hdslb.com/bfs/emote/d2c5d5a131f9d247e4ab4eed875c752d6e89d69e.png'),
        array('type' => 'sticker', 'code' => '[热词系列_多谢款待]', 'src' => 'http://i0.hdslb.com/bfs/emote/a4789b0eceb8fb9719c3a214aa89180528369091.png'),
        array('type' => 'sticker', 'code' => '[热词系列_燃起来了]', 'src' => 'http://i0.hdslb.com/bfs/emote/5a6199d39ee57e6e00ee1db33a7d430f5a9ff045.png'),
        array('type' => 'sticker', 'code' => '[热词系列_仙人指路]', 'src' => 'http://i0.hdslb.com/bfs/emote/bf7fed28bbed40f95e08f9bab78802849b10ce63.png'),
        array('type' => 'sticker', 'code' => '[热词系列_饮茶先啦]', 'src' => 'http://i0.hdslb.com/bfs/emote/f4782fa5a072c766fc2b289b067ea3f19086bdf4.png'),
        array('type' => 'sticker', 'code' => '[热词系列_再来亿遍]', 'src' => 'http://i0.hdslb.com/bfs/emote/011c8e452941c701c3f69810eaeaaed99d96b9ee.png'),
        array('type' => 'sticker', 'code' => '[热词系列_热乎]', 'src' => 'http://i0.hdslb.com/bfs/emote/79ba29bf44db3f05acbf0179f5969cc21cb1b0e6.png'),
        array('type' => 'sticker', 'code' => '[热词系列_好活]', 'src' => 'http://i0.hdslb.com/bfs/emote/7ec857e53ebaf37c59e96b5e56bcb0f05cd0b2d7.png'),
        array('type' => 'sticker', 'code' => '[热词系列_排面]', 'src' => 'http://i0.hdslb.com/bfs/emote/a544563e68dec3f6fcb3200cb7ea71193a0afe61.png'),
        array('type' => 'sticker', 'code' => '[热词系列_爷青回]', 'src' => 'http://i0.hdslb.com/bfs/emote/a26189ff1e681bddef7f6533f9aabe7604731a3e.png'),
        array('type' => 'sticker', 'code' => '[热词系列_好家伙]', 'src' => 'http://i0.hdslb.com/bfs/emote/63ec80dea3066bd9f449ba999ba531fa61f7b4eb.png'),
        array('type' => 'sticker', 'code' => '[热词系列_芜湖起飞]', 'src' => 'http://i0.hdslb.com/bfs/emote/78d04c6ce78a613c90d510cd45fe7e25c57ba00b.png'),
        array('type' => 'sticker', 'code' => '[热词系列_夺笋呐]', 'src' => 'http://i0.hdslb.com/bfs/emote/e763846a534e790d402ee4ef1640c9bc02aaab37.png'),
        array('type' => 'sticker', 'code' => '[热词系列_两面包夹芝士]', 'src' => 'http://i0.hdslb.com/bfs/emote/9903fefe88018d62fecad299f6af4eb2d588bbdc.png'),
        array('type' => 'sticker', 'code' => '[热词系列_梦幻联动]', 'src' => 'http://i0.hdslb.com/bfs/emote/4809416be5ca787c2ec3e897e4fd022a58da6e0e.png'),
        array('type' => 'sticker', 'code' => '[热词系列_泪目]', 'src' => 'http://i0.hdslb.com/bfs/emote/bba3703ab90b7d16fe9dbcb85ed949db687f8331.png'),
        array('type' => 'sticker', 'code' => '[热词系列_保护]', 'src' => 'http://i0.hdslb.com/bfs/emote/55f8f6445ca7c3170cdfc5b16036abf639ce9b57.png'),
        array('type' => 'sticker', 'code' => '[热词系列_爱了爱了]', 'src' => 'http://i0.hdslb.com/bfs/emote/2a165b555ba20391316366c664ed7891883dc5aa.png'),
        array('type' => 'sticker', 'code' => '[热词系列_可以]', 'src' => 'http://i0.hdslb.com/bfs/emote/e08543c71202b36c590094417fcfbb80c3506cd8.png'),
        array('type' => 'sticker', 'code' => '[热词系列_希望没事]', 'src' => 'http://i0.hdslb.com/bfs/emote/6c0d2e6c486d1ba5afd6204a96e102652464a01d.png'),
        array('type' => 'sticker', 'code' => '[热词系列_打卡]', 'src' => 'http://i0.hdslb.com/bfs/emote/a9cf77c78e1b9b40aa3ed4862402fba008ee2f51.png'),
        array('type' => 'sticker', 'code' => '[热词系列_DNA]', 'src' => 'http://i0.hdslb.com/bfs/emote/f6eb74f8230588f61a298af89061a7d75c5762e5.png'),
        array('type' => 'sticker', 'code' => '[热词系列_这次一定]', 'src' => 'http://i0.hdslb.com/bfs/emote/a01ca28923daa7cc896c42f27deb4914e20dd572.png'),
        array('type' => 'sticker', 'code' => '[热词系列_AWSL]', 'src' => 'http://i0.hdslb.com/bfs/emote/c37f88cf799f9badf9d84b7671dc3dd98c0fc0c2.png'),
        array('type' => 'sticker', 'code' => '[热词系列_递话筒]', 'src' => 'http://i0.hdslb.com/bfs/emote/98e6950e39fbb4dd1c576042063ca632074070ba.png'),
        array('type' => 'sticker', 'code' => '[热词系列_你细品]', 'src' => 'http://i0.hdslb.com/bfs/emote/535e00658e7e47966f154d3a167fa2365ebc4321.png'),
        array('type' => 'sticker', 'code' => '[热词系列_咕咕]', 'src' => 'http://i0.hdslb.com/bfs/emote/d8065c2e7ce48c929317a94553499a46fecc262a.png'),
        array('type' => 'sticker', 'code' => '[热词系列_张三]', 'src' => 'http://i0.hdslb.com/bfs/emote/255a938f39cea625032b6650036b31aa26c50a3c.png'),
        array('type' => 'sticker', 'code' => '[热词系列_害]', 'src' => 'http://i0.hdslb.com/bfs/emote/cbe798a194612958537c5282fcca7c3bcd2aa15c.png'),
        array('type' => 'sticker', 'code' => '[热词系列_我裂开了]', 'src' => 'http://i0.hdslb.com/bfs/emote/29bd57ec4e8952880fea6c9e47aee924e91f10c4.png'),
        array('type' => 'sticker', 'code' => '[热词系列_有内味了]', 'src' => 'http://i0.hdslb.com/bfs/emote/7ca61680a905b5b6e2e335c630e725b648b03b4d.png'),
        array('type' => 'sticker', 'code' => '[热词系列_猛男必看]', 'src' => 'http://i0.hdslb.com/bfs/emote/9ca4f723194ff9f6f5745591132c1d70fae5a4a8.png'),
        array('type' => 'sticker', 'code' => '[热词系列_奥力给]', 'src' => 'http://i0.hdslb.com/bfs/emote/c9b8683827ec6c00fea5327c9bec14f581cef2aa.png'),
        array('type' => 'sticker', 'code' => '[热词系列_问号]', 'src' => 'http://i0.hdslb.com/bfs/emote/c1d1e76c12180adc8558f47006fe0e7ded4154bb.png'),
        array('type' => 'sticker', 'code' => '[热词系列_我哭了]', 'src' => 'http://i0.hdslb.com/bfs/emote/9e0b3877d649aaf6538fbdd3f937e240a9d808e4.png'),
        array('type' => 'sticker', 'code' => '[热词系列_高产]', 'src' => 'http://i0.hdslb.com/bfs/emote/9db817cba4a7f4a42398f3b2ec7c0a8e0c247c42.png'),
        array('type' => 'sticker', 'code' => '[热词系列_不愧是你]', 'src' => 'http://i0.hdslb.com/bfs/emote/9ff2e356797c57ee3b1675ade0883d2d2247be9b.png'),
        array('type' => 'sticker', 'code' => '[热词系列_真香]', 'src' => 'http://i0.hdslb.com/bfs/emote/e68497c775feaac1c3b1a6cd63a50cfb11b767c4.png'),
        array('type' => 'sticker', 'code' => '[热词系列_我全都要]', 'src' => 'http://i0.hdslb.com/bfs/emote/d424d1ad8d14c1c9b8367842bc68c658b9229bc1.png'),
        array('type' => 'sticker', 'code' => '[热词系列_神仙UP]', 'src' => 'http://i0.hdslb.com/bfs/emote/a49e0d0db1e7d35a0f7411be13208951ab448f03.png'),
        array('type' => 'sticker', 'code' => '[热词系列_福建舰]', 'src' => 'http://i0.hdslb.com/bfs/emote/9713ac27523fb76904f300ba1041b92db63bb220.png'),
        array('type' => 'sticker', 'code' => '[热词系列_锤]', 'src' => 'http://i0.hdslb.com/bfs/emote/35668cc12ae25b9545420e4a85bf21a0bfc03e5d.png'),
        array('type' => 'sticker', 'code' => '[热词系列_爷关更]', 'src' => 'http://i0.hdslb.com/bfs/emote/faad40c56447f1f8abcb4045c17ce159d113d1fd.png'),
        array('type' => 'sticker', 'code' => '[热词系列_我酸了]', 'src' => 'http://i0.hdslb.com/bfs/emote/a8cbf3f6b8cd9377eeb15b9172f3cd683b2e4650.png'),
        array('type' => 'sticker', 'code' => '[热词系列_有生之年]', 'src' => 'http://i0.hdslb.com/bfs/emote/f41fdafe2d0fbb8e8bc1598d2cf37e355560103a.png'),
        array('type' => 'sticker', 'code' => '[热词系列_镇站之宝]', 'src' => 'http://i0.hdslb.com/bfs/emote/24e7a6a6e6383c987215fb905e3ee070aca259b5.png'),
        array('type' => 'sticker', 'code' => '[热词系列_我太南了]', 'src' => 'http://i0.hdslb.com/bfs/emote/a523f3e4c63e4db1232365765d0ec452f83be97e.png'),
        array('type' => 'sticker', 'code' => '[热词系列_完结撒花]', 'src' => 'http://i0.hdslb.com/bfs/emote/ea9db62ff5bca8e069cd70c4233353a802835422.png'),
        array('type' => 'sticker', 'code' => '[热词系列_大师球]', 'src' => 'http://i0.hdslb.com/bfs/emote/f30089248dd137c568edabcb07cf67e0f6e98cf3.png'),
        array('type' => 'sticker', 'code' => '[热词系列_知识盲区]', 'src' => 'http://i0.hdslb.com/bfs/emote/ccc94600b321a28116081e49ecedaa4ee8728312.png'),
        array('type' => 'sticker', 'code' => '[热词系列_“狼火”]', 'src' => 'http://i0.hdslb.com/bfs/emote/33ccd3617bfa89e9d1498b13b7542b63f163e5de.png'),
        array('type' => 'sticker', 'code' => '[热词系列_你可真星]', 'src' => 'http://i0.hdslb.com/bfs/emote/54c8ddff400abfe388060cabfbb579280fdea1be.png')
    ),
),
array(
    'groupname' => 'tv_小电视', 
    'list' => array(
        array('type' => 'sticker', 'code' => '[tv_白眼]', 'src' => 'http://i0.hdslb.com/bfs/emote/c1d59f439e379ee50eef488bcb5e5378e5044ea4.png'),
        array('type' => 'sticker', 'code' => '[tv_doge]', 'src' => 'http://i0.hdslb.com/bfs/emote/6ea59c827c414b4a2955fe79e0f6fd3dcd515e24.png'),
        array('type' => 'sticker', 'code' => '[tv_坏笑]', 'src' => 'http://i0.hdslb.com/bfs/emote/1f0b87f731a671079842116e0991c91c2c88645a.png'),
        array('type' => 'sticker', 'code' => '[tv_难过]', 'src' => 'http://i0.hdslb.com/bfs/emote/87f46748d3f142ebc6586ff58860d0e2fc8263ba.png'),
        array('type' => 'sticker', 'code' => '[tv_生气]', 'src' => 'http://i0.hdslb.com/bfs/emote/26702dcafdab5e8225b43ffd23c94ac1ff932654.png'),
        array('type' => 'sticker', 'code' => '[tv_委屈]', 'src' => 'http://i0.hdslb.com/bfs/emote/d04dba7b5465779e9755d2ab6f0a897b9b33bb77.png'),
        array('type' => 'sticker', 'code' => '[tv_斜眼笑]', 'src' => 'http://i0.hdslb.com/bfs/emote/911f987aa8bc1bee12d52aafe62bc41ef4474e6c.png'),
        array('type' => 'sticker', 'code' => '[tv_呆]', 'src' => 'http://i0.hdslb.com/bfs/emote/fe1179ebaa191569b0d31cecafe7a2cd1c951c9d.png'),
        array('type' => 'sticker', 'code' => '[tv_发怒]', 'src' => 'http://i0.hdslb.com/bfs/emote/34ba3cd204d5b05fec70ce08fa9fa0dd612409ff.png'),
        array('type' => 'sticker', 'code' => '[tv_惊吓]', 'src' => 'http://i0.hdslb.com/bfs/emote/0d15c7e2ee58e935adc6a7193ee042388adc22af.png'),
        array('type' => 'sticker', 'code' => '[tv_呕吐]', 'src' => 'http://i0.hdslb.com/bfs/emote/9f996894a39e282ccf5e66856af49483f81870f3.png'),
        array('type' => 'sticker', 'code' => '[tv_思考]', 'src' => 'http://i0.hdslb.com/bfs/emote/90cf159733e558137ed20aa04d09964436f618a1.png'),
        array('type' => 'sticker', 'code' => '[tv_微笑]', 'src' => 'http://i0.hdslb.com/bfs/emote/70dc5c7b56f93eb61bddba11e28fb1d18fddcd4c.png'),
        array('type' => 'sticker', 'code' => '[tv_疑问]', 'src' => 'http://i0.hdslb.com/bfs/emote/0793d949b18d7be716078349c202c15ff166f314.png'),
        array('type' => 'sticker', 'code' => '[tv_大哭]', 'src' => 'http://i0.hdslb.com/bfs/emote/23269aeb35f99daee28dda129676f6e9ea87934f.png'),
        array('type' => 'sticker', 'code' => '[tv_鼓掌]', 'src' => 'http://i0.hdslb.com/bfs/emote/1d21793f96ef4e6f48b23e53e3b9e42da833a0f6.png'),
        array('type' => 'sticker', 'code' => '[tv_抠鼻]', 'src' => 'http://i0.hdslb.com/bfs/emote/c666f55e88d471e51bbd9fab9bb308110824a6eb.png'),
        array('type' => 'sticker', 'code' => '[tv_亲亲]', 'src' => 'http://i0.hdslb.com/bfs/emote/a8111ad55953ef5e3be3327ef94eb4a39d535d06.png'),
        array('type' => 'sticker', 'code' => '[tv_调皮]', 'src' => 'http://i0.hdslb.com/bfs/emote/b9c41de8e82dd7a8515ae5e3cb63e898bf245186.png'),
        array('type' => 'sticker', 'code' => '[tv_笑哭]', 'src' => 'http://i0.hdslb.com/bfs/emote/1abc628f6d4f4caf9d0e7800878f4697abbc8273.png'),
        array('type' => 'sticker', 'code' => '[tv_晕]', 'src' => 'http://i0.hdslb.com/bfs/emote/5443c22b4d07fb1907ccc610c8e6db254f2461b7.png'),
        array('type' => 'sticker', 'code' => '[tv_点赞]', 'src' => 'http://i0.hdslb.com/bfs/emote/f85c354995bd99e28fc76c869bfe42ba6438eff4.png'),
        array('type' => 'sticker', 'code' => '[tv_害羞]', 'src' => 'http://i0.hdslb.com/bfs/emote/a37683fb5642fa3ddfc7f4e5525fd13e42a2bdb1.png'),
        array('type' => 'sticker', 'code' => '[tv_睡着]', 'src' => 'http://i0.hdslb.com/bfs/emote/8b196675b53af58264f383c50ad0945048290b33.png'),
        array('type' => 'sticker', 'code' => '[tv_色]', 'src' => 'http://i0.hdslb.com/bfs/emote/61822c7e9aae5da76475e7892534545336b23a6f.png'),
        array('type' => 'sticker', 'code' => '[tv_吐血]', 'src' => 'http://i0.hdslb.com/bfs/emote/09dd16a7aa59b77baa1155d47484409624470c77.png'),
        array('type' => 'sticker', 'code' => '[tv_无奈]', 'src' => 'http://i0.hdslb.com/bfs/emote/ea8ed89ee9878f2fece2dda0ea8a5dbfe21b5751.png'),
        array('type' => 'sticker', 'code' => '[tv_再见]', 'src' => 'http://i0.hdslb.com/bfs/emote/180129b8ea851044ce71caf55cc8ce44bd4a4fc8.png'),
        array('type' => 'sticker', 'code' => '[tv_流汗]', 'src' => 'http://i0.hdslb.com/bfs/emote/cead1c351ab8d79e9f369605beb90148db0fbed3.png'),
        array('type' => 'sticker', 'code' => '[tv_偷笑]', 'src' => 'http://i0.hdslb.com/bfs/emote/bb690d4107620f1c15cff29509db529a73aee261.png'),
        array('type' => 'sticker', 'code' => '[tv_抓狂]', 'src' => 'http://i0.hdslb.com/bfs/emote/fe31c08edad661d63762b04e17b8d5ae3c71a757.png'),
        array('type' => 'sticker', 'code' => '[tv_黑人问号]', 'src' => 'http://i0.hdslb.com/bfs/emote/45821a01f51bc867da9edbaa2e070410819a95b2.png'),
        array('type' => 'sticker', 'code' => '[tv_困]', 'src' => 'http://i0.hdslb.com/bfs/emote/241ee304e44c0af029adceb294399391e4737ef2.png'),
        array('type' => 'sticker', 'code' => '[tv_打脸]', 'src' => 'http://i0.hdslb.com/bfs/emote/56ab10b624063e966bfcb76ea5dc4794d87dfd47.png'),
        array('type' => 'sticker', 'code' => '[tv_闭嘴]', 'src' => 'http://i0.hdslb.com/bfs/emote/c9e990da7f6e93975e25fd8b70e2e290aa4086ef.png'),
        array('type' => 'sticker', 'code' => '[tv_鄙视]', 'src' => 'http://i0.hdslb.com/bfs/emote/6e72339f346a692a495b123174b49e4e8e781303.png'),
        array('type' => 'sticker', 'code' => '[tv_腼腆]', 'src' => 'http://i0.hdslb.com/bfs/emote/89712c0d4af73e67f89e35cbc518420380a7f6f4.png'),
        array('type' => 'sticker', 'code' => '[tv_馋]', 'src' => 'http://i0.hdslb.com/bfs/emote/fc7e829b845c43c623c8b490ee3602b7f0e76a31.png'),
        array('type' => 'sticker', 'code' => '[tv_可爱]', 'src' => 'http://i0.hdslb.com/bfs/emote/9e55fd9b500ac4b96613539f1ce2f9499e314ed9.png'),
        array('type' => 'sticker', 'code' => '[tv_发财]', 'src' => 'http://i0.hdslb.com/bfs/emote/34db290afd2963723c6eb3c4560667db7253a21a.png'),
        array('type' => 'sticker', 'code' => '[tv_生病]', 'src' => 'http://i0.hdslb.com/bfs/emote/8b0ec90e6b86771092a498c54f09fc94621c1900.png'),
        array('type' => 'sticker', 'code' => '[tv_流鼻血]', 'src' => 'http://i0.hdslb.com/bfs/emote/c32d39db2737f89b904ca32700d140a9241b0767.png'),
        array('type' => 'sticker', 'code' => '[tv_尴尬]', 'src' => 'http://i0.hdslb.com/bfs/emote/7cfa62dafc59798a3d3fb262d421eeeff166cfa4.png'),
        array('type' => 'sticker', 'code' => '[tv_大佬]', 'src' => 'http://i0.hdslb.com/bfs/emote/093c1e2c490161aca397afc45573c877cdead616.png'),
        array('type' => 'sticker', 'code' => '[tv_流泪]', 'src' => 'http://i0.hdslb.com/bfs/emote/7e71cde7858f0cd50d74b0264aa26db612a8a167.png'),
        array('type' => 'sticker', 'code' => '[tv_冷漠]', 'src' => 'http://i0.hdslb.com/bfs/emote/b9cbc755c2b3ee43be07ca13de84e5b699a3f101.png'),
        array('type' => 'sticker', 'code' => '[tv_皱眉]', 'src' => 'http://i0.hdslb.com/bfs/emote/72ccad6679fea0d14cce648b4d818e09b8ffea2d.png'),
        array('type' => 'sticker', 'code' => '[tv_鬼脸]', 'src' => 'http://i0.hdslb.com/bfs/emote/0ffbbddf8a94d124ca2f54b360bbc04feb6bbfea.png'),
        array('type' => 'sticker', 'code' => '[tv_调侃]', 'src' => 'http://i0.hdslb.com/bfs/emote/4bc022533ef31544ca0d72c12c808cf4a1cce3e3.png'),
        array('type' => 'sticker', 'code' => '[tv_目瞪口呆]', 'src' => 'http://i0.hdslb.com/bfs/emote/0b8cb81a68de5d5365212c99375e7ace3e7891b7.png')
    ),
)

如果你是采取把图片下载下来传达服务器上的方式,将src的部分换成路径即可。至于为什么使用http而不是https,我也不知道,https不能正常显示,但http可以。

如果想要添加其他网站的表情包,也可以使用类似的方法。

Argon主题中的表情包样式修改

以下是针对Argon主题的修改,使用上述方法后,你会发现,表情包的尺寸都是固定60px的,然而,对于小圆脸等表情,我们希望它是和字体大小一致的。于是我就折腾了很久,最后还是采用了我之前采用的很便捷的方法,那就是在额外css中添加代码。

修改预览框中表情包的大小

#emotion_keyboard > div.emotion-keyboard-content > div:nth-child(5) > div > img{
    max-height: 20px!important;
}

#emotion_keyboard > div.emotion-keyboard-content > div:nth-child(7) > div > img{
    max-height: 20px!important;
}

#emotion_keyboard > div.emotion-keyboard-content > div:nth-child(6) > div > img{
    max-height: 60px!important;
}

上述代码中的nth-child()中的数字表示序号,可以根据实际情况调整。

修改评论区显示的表情包大小

div.comment-item-text > p > img[src^="http://i0.hdslb.com/"]{
    max-height: 20px;
}

div[emotion*="热词"] ~ div.comment-item-text > p > img[src^="http://i0.hdslb.com/"]{
    max-height: 60px!important;
}

使用了正则匹配,因为热词系列的表情包要保持60px。

但是上面的代码直接使用是有问题的,通过F12可以发现,html代码中,含有表情包名称的div在含有图片的div的下面,由于CSS只能够向后匹配,因此,我改了一下这个的顺序,并且,由于表情包名称位于<div>name</div>之间,因此,在匹配的时候,我不会取出name,于是我就把名称作为了div的一个属性,也就是上面代码中的emotion。修改后再点击F12,会发现变成了下面的情况。

修改方式如下:

打开主题文件编辑器,进入functions.php,根据上图的class,搜索"comment-item-source",定位到这个代码所在的位置,然后修改即可(建议备份一下修改之前的代码)。我的修改方案如下:

<div class="comment-item-source" style="display: none;" aria-hidden="true" emotion="<?php echo htmlspecialchars(get_comment_meta(get_comment_ID(), "comment_content_source", true));?>"></div>
<div class="comment-item-text">
<?php echo argon_get_comment_text();?>
</div>

我遇到的另一个问题

很奇怪,感觉只有我遇到了,mark一下,哪位大佬如果知道怎么解决,希望能告诉我呀。问题出在lazyload上,当发出表情包后,表情包能正常显示,这是如果刷新页面,那么图片就会显示成白色。

我就暂时从function.php找到这一部分,然后把lazyload的那一部分删了,修改后的代码:

$comment_text = str_replace(':' . $emotion['code'] . ':', "<img class='comment-sticker lazyload' src='" . $emotion['src'] . "'/><noscript><img class='comment-sticker' src='" . $emotion['src'] . "'/></noscript>", $comment_text);

B站表情包爬取

爬取的过程很简单,首先找到表情包存放的地方。随便打开一个专栏(专栏里响应的文件少,好找),然后按F12,选择Network,然后选择Fetch/XHR,然后点击评论区的表情图标,会发现多出来了一个文件,如下图所示:

多出来的文件为第三个,点击这个文件,查看其response,将response里的json信息解析出来,可以发现其储存着表情包的链接,如下图所示:

然后就好办了,查看这个文件的Headers,在Python中向Headers中的URL发出请求,然后处理得到的数据即可。

import requests
from lxml import etree
import json

aim_url = "https://api.bilibili.com/x/emote/user/panel/web?business=reply"
ua = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36'}

request_data = requests.get(url = aim_url, headers=ua).text
dic = json.loads(request_data)
# 得到表情信息,字典形式
emotions = dic["data"]["packages"]
for group in emotions:
    group_name = group["text"]
    group_emotions = group["emote"]
    print("-------------------")
    print("-------------------")
    print(group_name)
    for group_emotion in group_emotions:
        text = group_emotion["text"]
        url = group_emotion["url"].replace("https", "http")
        if(group_name == "颜文字"):
            array = "array('type' => 'text', 'text' =>\"" + text + "\"),"
        else:
            array = "array('type' => 'sticker', 'code' => \'" + text + "\', 'src' => \'" + url + "\'),"
        print(array)

输出结果:

输出结果的形式设置成这样的原因是为了方便复制到emotions.php里面,当然还可以对输出再设置一下,让其完全是emotions.php里的形式,一步到位。

最终效果可以参考本网站。

有问题可以留言哦~ 觉得有帮助也可以投喂一下博主,感谢~
文章链接:https://www.corrain.top/add-emotions/
版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明文章地址及作者

评论

  1. Jerry
    10 月前
    2023-7-07 10:51:53


    博主,B站表情亦不能使用了

  2. 10 月前
    2023-6-19 22:33:21

    test
    测试

  3. 嘿嘿
    1 年前
    2022-12-29 10:55:00

    ٩(๛ ˘ ³˘)۶❤ 后面俩个为啥预览不显示啊

    • 博主
      嘿嘿
      1 年前
      2022-12-29 12:06:21

      评论发出去之后,表情包就显示出来了

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
( ゜- ゜)つロ
_(:з」∠)_
(⌒▽⌒)
( ̄▽ ̄)
(=・ω・=)
(*°▽°*)八(*°▽°*)♪
✿ヽ(°▽°)ノ✿
(¦3【▓▓】
눈_눈
(ಡωಡ)
_(≧∇≦」∠)_
━━━∑(゚□゚*川━
(`・ω・´)
( ̄3 ̄)
✧(≖ ◡ ≖✿)
(・∀・)
(〜 ̄△ ̄)〜
→_→
(°∀°)ノ
╮( ̄▽ ̄)╭
( ´_ゝ`)
←_←
(;¬_¬)
(゚Д゚≡゚д゚)!?
( ´・・)ノ(._.`)
Σ(゚д゚;)
Σ(  ̄□ ̄||)<
(´;ω;`)
(/TДT)/
(^・ω・^)
(。・ω・。)
(● ̄(エ) ̄●)
ε=ε=(ノ≧∇≦)ノ
(´・_・`)
(-_-#)
( ̄へ ̄)
( ̄ε(# ̄) Σ
(╯°口°)╯(┴—┴
ヽ(`Д´)ノ
("▔□▔)/
(º﹃º )
(๑>؂<๑)
。゚(゚´Д`)゚。
(∂ω∂)
(┯_┯)
(・ω< )★
( ๑ˊ•̥▵•)੭₎₎
¥ㄟ(´・ᴗ・`)ノ¥
Σ_(꒪ཀ꒪」∠)_
٩(๛ ˘ ³˘)۶❤
(๑‾᷅^‾᷅๑)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
小黄脸
热词系列一
tv_小电视
上一篇
下一篇