项目作者: ehForwarderBot

项目描述 :
高级语言: Python
项目地址: git://github.com/ehForwarderBot/efb-link_preview-middleware.git


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
    1. pip install efb-link-preview-middleware
  • Register to EFB
    Following this document to edit the config file. The config file by default is ~/.ehforwarderbot/profiles/default. It should look like:
  1. master_channel: foo.demo_master
  2. slave_channels:
  3. - foo.demo_slave
  4. - bar.dummy
  5. middlewares:
  6. - foo.other_middlewares
  7. - catbaron.link_preview

You only need to add the last line to your config file.

  • Restart EFB.