May 18, 2021 WeChat Mini Program Development Document
When a reptile visits an in-program page, it carries a specific user-agent "mpcrawler" and a scene value: 1129
To determine whether the request originated from an official method of searching for reptiles:
The signature algorithm is consistent with the signature algorithm of the small program message push interface.
The parameters are set in the requested header: X-WXApp-Crawler-Timestamp X-WXApp-Crawler-Nonce X-WXApp-Crawler-Signature
The signature process is as follows: 1. Dictionary sorting of the three parameters token, X-WXApp-Crawler-Timestamp, X-WXApp-Crawler-Nonce 2. Stitch the three parameter strings into one string for sha1 encryption 3. The developer obtains an encrypted string that can be compared with X-WXApp-Crawler-Signature, identifying the request as coming from WeChat
The jump url within the small program page is an important source of our crawler discovery page, and the results page (url) recalled by the search engine must be able to open directly, without relying on contextual state. Special: The parameters required for the suggested page are included in the url
The program provides two ways to route pages: a. N avigator component b. Routing APIs, including navigateTo / redirectTo / switchTab / navigateBack / reLaunch, recommend navigator components that mask time locks or variable locks set for clicks when accessed by reptiles if you have to use an API.
A clear, concise, parameter-meaningful querystring can be very helpful for crawling and subsequent analysis, but using JSON data as a parameter is a poor implementation.
It is recommended that users be asked for authorization only when necessary (e.g. reading articles can be anonymous, while commenting requires a name).
We can't do that for the time being, and we may not be able to do that in the long run.
https://www.w3cschool.cn/weixinapp/weixinapp-cspq38rh.html
Page titles and thumbnails play an important role in understanding the page and improving exposure conversions. Set the title and thumbnail of the page with wx.setNavigationBarTitle or custom forwarding onShareAppMessage, plus the poster/poster-for-crawler property for video and audio components.
WeChat can be greatly enriched to include the content, and thus improve the exposure of small program content. Please refer to:
https://www.w3cschool.cn/weixinapp/weixinapp-it7838x9.html