{"id":19944966,"url":"https://github.com/ehforwarderbot/efb-mp-instantview-middleware","last_synced_at":"2025-05-03T16:31:49.967Z","repository":{"id":42216698,"uuid":"325745046","full_name":"ehForwarderBot/efb-mp-instantview-middleware","owner":"ehForwarderBot","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-25T13:06:29.000Z","size":38,"stargazers_count":3,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T14:23:49.499Z","etag":null,"topics":["efb-middleware","eh-forwarder-bot"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ehForwarderBot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-31T07:42:01.000Z","updated_at":"2025-04-25T13:06:33.000Z","dependencies_parsed_at":"2022-08-12T09:50:42.114Z","dependency_job_id":null,"html_url":"https://github.com/ehForwarderBot/efb-mp-instantview-middleware","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehForwarderBot%2Fefb-mp-instantview-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehForwarderBot%2Fefb-mp-instantview-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehForwarderBot%2Fefb-mp-instantview-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehForwarderBot%2Fefb-mp-instantview-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ehForwarderBot","download_url":"https://codeload.github.com/ehForwarderBot/efb-mp-instantview-middleware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252216091,"owners_count":21713098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["efb-middleware","eh-forwarder-bot"],"created_at":"2024-11-13T00:23:38.927Z","updated_at":"2025-05-03T16:31:49.642Z","avatar_url":"https://github.com/ehForwarderBot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MPInstantViewMiddleware: A middleware for EFB\n\n## Notice\n\n**Middleware ID**: `catbaron.mp_instantview`\n\nThe middleware ID was `catbaron.mp_instanceview` before version 0.3.0. Please take care of it, especially please remeber to update the configure file of EFB (`$HOME/.ehforwarderbot/profiles/default/config.yaml`).\n\n**MPInstantViewMiddleware** is a middleware of EFB enable instant view for articles of official accounts.\n\n## How it works\nThis middleware generates a telegraph page for links sent by official accounts of wechat, which will enable the instant view. Thus you need an `access_token` (introduced below).\n\n## Dependense\n* Python \u003e= 3.6\n* EFB \u003e= 2.0.0\n* PyYaml\n* bs4\n* requests[sock]\n\n## Install and configuration\n\n### Install\n```\npip install efb-mp-instantview-middleware\n```\n\n### Enable\n\nRegister to EFB\nFollowing [this document](https://ehforwarderbot.readthedocs.io/en/latest/getting-started.html) to edit the config file. The config file by default is `$HOME/.ehforwarderbot/profiles/default`. It should look like:\n\n```yaml\nmaster_channel: foo.demo_master\nslave_channels:\n- foo.demo_slave\n- bar.dummy\nmiddlewares:\n- foo.other_middlewares\n- catbaron.mp_instantview\n```\n\nYou only need to add the last line to your config file.\n\n### Configure the middleware\n\nThe config file by default is `$HOME/.ehforwarderbot/profiles/default/catbaron.mp_instantview/config.yaml`.\nPlease create the config file if there is not one. You need to have a telegraph token and save it here. You can get a token following [the document](https://telegra.ph/api#createAccount). The `access_token` is what you need.\n\nThis middleware need access to https://telegra.ph, add the proxy url to the configure file if necessary.\n\n```yaml\n# Token of telegraph\ntelegraph_token: ACCESS_TOKEN\n\n# Optional. Proxy url.\n# Example:\n#  proxy_url: socks5://\u003cuser\u003e:\u003cpass\u003e@\u003chost\u003e:\u003cport\u003e\n#  proxy_url: socks5://\u003chost\u003e:\u003cport\u003e\n#  proxy_url: http://\u003chost\u003e:\u003cport\u003e\nproxy_url: PROXY_URL\n```\n\n### Restart EFB.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehforwarderbot%2Fefb-mp-instantview-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fehforwarderbot%2Fefb-mp-instantview-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehforwarderbot%2Fefb-mp-instantview-middleware/lists"}