WeChat Middleware of EH Forwarder Bot for link preview
Project description
LinkPreview: A middleware for EFB
Notice
Middleware ID: catbaron.link_preview
LinkPreview is a middleware for EFB to generqate link preview for the first url contained by the message.
- For url refering to an image, the image should be sent as preview.
- Add
\np
at the begining of message to avoid link preview for current message.
You need to use MessageBlocker on top of EFB. Please check the document and install EFB first.
Dependense
- Python >=3.6
- EFB >=2.0.0b15
- beautifulsoup4
Install
- Install
git clone https://github.com/catbaron0/efb-link_preview-middleware
cd efb-link_preview-middleware
sudo python setup.py install
- Register to EFB
Following this document to edit the config file. The config file by default is
~/.ehforwarderbot/profiles/default
. It should look like:
master_channel: foo.demo_master
slave_channels:
- foo.demo_slave
- bar.dummy
middlewares:
- foo.other_middlewares
- catbaron.link_preview
You only need to add the last line to your config file.
- Restart EFB.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file efb_link_preview_middleware-0.1.0.tar.gz
.
File metadata
- Download URL: efb_link_preview_middleware-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 025f31228c82b2c3b887dcb6a05f6c035b4d697643e1fe0373cb895df8a32f9d |
|
MD5 | b8448c7559d0541447c4c9e5f6ed3a4a |
|
BLAKE2b-256 | 8a188abc56f14c6d3ac05c2c071d72174aee0d1be694bf458095846250276287 |
File details
Details for the file efb_link_preview_middleware-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: efb_link_preview_middleware-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67cf396301b93b3d6ac784063fb251c29efc93a8d09517e8e7d4f9e794926bea |
|
MD5 | d437c0449905eec4e7b34bc902ca14c1 |
|
BLAKE2b-256 | cb2d36224288bda1345675e15e44f13e125fc72eb804c7eeee5010e5d5faa6d0 |