recently, Mini Program is working on a project on article data analysis. At this stage, the article is displayed in Mini Program by climbing the official account of Wechat. The article content parsing plug-in used by Mini Program is wxParse, but when it is found that the data of the article is obtained through the interface (equivalent to the entire html source code, But excluding all script and style tags), there is a problem that the invokeWebviewMethod data transfer length of 1227297 has exceeded the maximum length of 1048576. In other words, the size of Mini Program"s data in a request cannot exceed 1m.
my own solution is:
the background splits and transmits the article of an article, and then Mini Program uses multiple wxParse to parse and display the article fragments, but I don"t know how to deal with the split transmission. For example, the structure of an article is as follows:
<html>
<head>
</head>
<body>
<div>
<section>
<div>
</div>
</section>
</div>
</body>
</html>
for example, the above is the overall content of an article, with a size of more than 1m. At this time, it needs to be split and transferred to the front end, that is, the entire html code is intercepted. However, this interception rule and how to implement it cannot be implemented for the time being. I hope you can give us some help.