A method of purification browser page
Technical field
The invention belongs to page processing technology field, in particular to a kind of method for purifying browser page.
Background technique
With the development of computer technology and network technology, network electronic information resources become normal in people's daily life
With resource, such as browser, network picture etc..And the third party website for providing browser is even more innumerable, but each third party
The style and features of website are even more to let a hundred schools contend, is different, and while bringing user's more visual enjoyments, also band dim eyesight is entangled
Random application experience, causes a variety of different user experiences, and the visual experience for making user read Chinese character generates fluctuation, influences user
Browsing mood.
Summary of the invention
The present invention to solve the above-mentioned problems, provides a kind of method for purifying browser page, improves user to browser
The attention rate of content improves the visual experience for being used for reading and browsing device.
The present invention is realized using following technical scheme:
A method of purification browser page, comprising:
Read the source code of website locating for browser;
The purification frame of browser page, the compiling according to the source code are matched according to the Compiler Structure of the source code
The step of purification frame of structure matching browser page, comprising: identify Chinese character start of text and end of text in the source code
Symbol;
According to website locating for the feature of the start of text and the symbol of end of text difference browser;
Purification frame corresponding with website locating for the browser is selected, browser body text content is shown in institute
It states in purification frame, step browser body text content being shown in the purification frame, comprising: described in extraction
The text of browser body text;According to specified typesetting mode to text typesetting again.
Preferably, the step of text for extracting the browser body text, comprising: according to the start of text and
The layout scope of the symbol location Chinese character body text of end of text;Extract the text paragraph in the layout scope.
Preferably, it is described according to specified typesetting mode to the text again typesetting the step of, comprising: by the text paragraph
In each text set be embedded into it is described purification frame specified typesetting mode in.
The beneficial effects of the present invention are:
It after the present invention is by purifying third party's browser page, then is shown in the application program of client, is user
Browser reading service is provided, advertisement and the other content of third party website are effectively filtered out, each browser website is provided
Browser body text content is only shown in specified purification frame by browser, improves concern of the user to browser content
Degree improves the visual experience for being used for reading and browsing device.
Specific embodiment
The technical solution in embodiment will be clearly and completely described below.Obviously, described embodiment is only
It is a part of the embodiments of the present invention, instead of all the embodiments.Based on the embodiment of the present invention, ordinary skill people
Member's every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
A method of purification browser page, comprising:
Read the source code of website locating for browser;
The purification frame of browser page, the compiling according to the source code are matched according to the Compiler Structure of the source code
The step of purification frame of structure matching browser page, comprising: identify Chinese character start of text and end of text in the source code
Symbol;
According to website locating for the feature of the start of text and the symbol of end of text difference browser;
Purification frame corresponding with website locating for the browser is selected, browser body text content is shown in institute
It states in purification frame, step browser body text content being shown in the purification frame, comprising: described in extraction
The text of browser body text;According to specified typesetting mode to text typesetting again.
Preferably, the step of text for extracting the browser body text, comprising: according to the start of text and
The layout scope of the symbol location Chinese character body text of end of text;Extract the text paragraph in the layout scope.
Preferably, it is described according to specified typesetting mode to the text again typesetting the step of, comprising: by the text paragraph
In each text set be embedded into it is described purification frame specified typesetting mode in.
The present invention is not limited to examples detailed above, in claims of the present invention limited range, art technology
The various deformations or amendments that personnel can make without creative work are protected by this patent.