Skip to main content

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.

example

example

  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

efb_link_preview_middleware-0.1.0.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page