CN104881452A - Resource locator sniffing method, device and system - Google Patents
Resource locator sniffing method, device and system Download PDFInfo
- Publication number
- CN104881452A CN104881452A CN201510254273.3A CN201510254273A CN104881452A CN 104881452 A CN104881452 A CN 104881452A CN 201510254273 A CN201510254273 A CN 201510254273A CN 104881452 A CN104881452 A CN 104881452A
- Authority
- CN
- China
- Prior art keywords
- resource
- webpage
- page
- address
- url
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000012545 processing Methods 0.000 claims description 17
- 238000010586 diagram Methods 0.000 description 7
- 230000004044 response Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9566—URL specific, e.g. using aliases, detecting broken or misspelled links
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention provides a resource locator sniffing method, device and system. The method is that the a uniform resource locator (URL) of a webpage is received by a network view from a client; the webpage data can be obtained through the URL, and the resource address of the page resource, included in the webpage can be obtained from the webpage data; then the resource address of the page resource can be sent to the client, so that the client can load the page resource through the resource address of the page resource. According to the technical scheme, the method, the device and the system can solve the problem of failure of sniffing of the resource address of the page resource.
Description
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of internet application, in particular to a resource address sniffing method, device and system.
[ background of the invention ]
With the development of internet technology, more and more websites providing various page resources are provided, and a user can browse various page resources through a third-party website. However, in the existing website providing the page resource, the resource address of the page resource is generally dynamically generated by JavaScript, and the real resource address of the dynamically generated page resource cannot be obtained by analyzing the static page through the content extraction system, and usually, the real resource address of the page resource can be obtained only when a request is initiated to the server through the client after the web page is loaded. Therefore, at present, a client can only obtain page resources, such as videos played in a webpage, display pictures or audios, from a related webpage of a third-party website, however, when obtaining the page resources from the webpage, the loading effect of the page resources is poor, for example, there are often problems that advertisements are inserted or videos cannot be played in a full screen when playing the video resources.
In order to solve the problem, in the prior art, a server continuously accesses a third-party website to sniff a resource address of a page resource and stores the resource address of the page resource in a local database, so that a client can obtain the resource address of the page resource from the server. However, since the IP address of the server is relatively fixed, it is easily blocked by the third-party website providing the page resource, thereby causing the failure of sniffing the resource address of the page resource.
[ summary of the invention ]
In view of this, embodiments of the present invention provide a method, an apparatus, and a system for sniffing a resource address, so as to solve the problem that sniffing of a resource address of a page resource fails.
In one aspect of the embodiments of the present invention, a method for sniffing a resource address is provided, including:
receiving a Uniform Resource Locator (URL) of a webpage sent by a client by a network view;
the network view acquires webpage data by using the URL, and acquires a resource address of a page resource contained in the webpage from the webpage data;
and the network view sends the resource address of the page resource to the client, so that the client loads the page resource by using the resource address of the page resource.
The above aspect and any possible implementation manner further provide an implementation manner, where the obtaining, by the web view, a resource address of a page resource included in the web page from the web page data includes:
the network view analyzes the webpage data to acquire a hypertext markup language (HTML) file of the webpage;
the network view judges whether the webpage contains the webpage resources or not according to the HTML file;
and if the webpage contains the page resource, the network view acquires the resource address of the page resource contained in the webpage from the webpage data.
The foregoing aspect and any possible implementation manner further provide an implementation manner, where the determining, by the web view, whether the web page includes the page resource according to the HTML file includes:
the network view determines the label of the page resource;
the network view judges whether the HTML file contains the label of the page resource or not;
and the network view judges whether the webpage contains the page resource according to whether the HTML file contains the label of the page resource.
The above-described aspect and any possible implementation manner further provide an implementation manner that the obtaining, by the web view, web page data by using the URL, including:
the network view sends a data acquisition request aiming at the URL to a server providing the webpage so that the server providing the webpage acquires the webpage data according to the URL;
and the network view receives the webpage data sent by the server providing the webpage.
The above aspect and any possible implementation manner further provide an implementation manner, where the web view provides the resource address of the page resource to a server, so that the server correspondingly stores the URL and the resource address of the page resource.
In one aspect of the embodiments of the present invention, a method for sniffing a resource address is provided, including:
the method comprises the steps that a client sends a Uniform Resource Locator (URL) of a webpage to a network view, so that the network view acquires webpage data by using the URL, and acquires a resource address of a webpage resource contained in the webpage from the webpage data;
the client receives a resource address of the page resource sent by the network view;
and the client loads the page resource by using the resource address of the page resource.
In one aspect of the embodiments of the present invention, a device for sniffing a resource address is provided, including:
the receiving unit is used for receiving a Uniform Resource Locator (URL) of a webpage sent by a client;
the processing unit is used for acquiring webpage data by using the URL and acquiring a resource address of a webpage resource contained in the webpage from the webpage data;
and the output unit is used for sending the resource address of the page resource to the client so that the client loads the page resource by using the resource address of the page resource.
The above-described aspect and any possible implementation further provide an implementation, where the processing unit is specifically configured to:
analyzing the webpage data to acquire a hypertext markup language (HTML) file of the webpage;
judging whether the webpage contains the page resource or not according to the HTML file;
and if the webpage contains the webpage resources, acquiring resource addresses of the webpage resources contained in the webpage from the webpage data.
As to the above-mentioned aspect and any possible implementation manner, there is further provided an implementation manner, where the processing unit is configured to, when determining, according to the HTML file, whether the web page includes the page resource, specifically:
determining a label of the page resource;
judging whether the HTML file contains the label of the page resource or not;
and judging whether the webpage contains the page resource or not according to whether the HTML file contains the label of the page resource or not.
The above-described aspect and any possible implementation further provide an implementation, where the processing unit is specifically configured to:
sending a data acquisition request aiming at the URL to a server providing the webpage so that the server providing the webpage acquires the webpage data according to the URL;
and receiving the webpage data sent by the server providing the webpage.
The above-described aspect and any possible implementation further provide an implementation, where the output unit is further configured to:
and providing the resource address of the page resource to a server, so that the server correspondingly stores the URL and the resource address of the page resource.
In one aspect of the embodiments of the present invention, a device for sniffing a resource address is provided, including:
the output unit is used for sending a Uniform Resource Locator (URL) of a webpage to a network view, so that the network view acquires webpage data by using the URL, and acquires a resource address of a webpage resource contained in the webpage from the webpage data;
a receiving unit, configured to receive a resource address of the page resource sent by the network view;
and the processing unit is used for loading the page resource by using the resource address of the page resource.
In one aspect of the embodiments of the present invention, a system for sniffing a resource address is provided, which includes a client and a network view; wherein,
the client is used for sending a Uniform Resource Locator (URL) of a webpage to the network view;
the network view is used for acquiring webpage data by using the URL, acquiring a resource address of a page resource contained in the webpage from the webpage data, and sending the resource address of the page resource to the client;
the client is further configured to load the page resource by using the resource address of the page resource.
According to the technical scheme, the embodiment of the invention has the following beneficial effects:
in the technical scheme provided by the embodiment of the invention, the network view performs the sniffing operation of the resource address of the page resource and provides the sniffing operation to the client. Because the network view cannot be blocked by the third-party website, the network view can successfully sniff the resource address of the page resource, and therefore the problem that the server fails to sniff the resource address of the page resource in the prior art is solved.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1 is a diagram of an exemplary system for use with the solution provided by the embodiments of the present invention;
fig. 2 is a flowchart illustrating a first embodiment of a method for sniffing a resource address according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a second embodiment of a method for sniffing a resource address according to an embodiment of the present invention;
FIG. 4 is a functional block diagram of a first embodiment of a device for snooping resource addresses according to the present invention;
FIG. 5 is a functional block diagram of a second embodiment of a resource address sniffing apparatus according to the present invention;
fig. 6 is a schematic structural diagram of a resource address sniffing system according to an embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
The system used by the technical scheme provided by the embodiment of the invention is shown in figure 1 and mainly comprises a client, a network view and a server.
Example one
An embodiment of the present invention provides a method for sniffing a resource address, please refer to fig. 2, which is a schematic flow chart of a first embodiment of the method for sniffing a resource address according to the embodiment of the present invention, and as shown in the figure, the method includes the following steps:
s201, receiving the uniform resource locator URL of the webpage sent by the client through the network view.
Specifically, a web view (WebView) with a browsing kernel (Webkit) may be newly created, and then the sniffing operation of the resource address in the embodiment of the present invention may be implemented by using the web view.
The sniffing operation of the resource address refers to acquiring the resource address of the page resource in the webpage by continuously accessing a third-party website providing the page resource, and sending the acquired resource address of the page resource to the client, so that the client can directly load the page resource by using the resource address of the page resource without loading the webpage containing the page resource.
Preferably, in the embodiment of the present invention, when the client needs to access a web page, the client needs to send a Uniform Resource Locator (URL) of the web page to the client.
S202, the network view acquires webpage data by using the URL, and acquires resource addresses of the webpage resources contained in the webpage from the webpage data.
Specifically, for example, the method for the web view to obtain the web page data by using the URL may include, but is not limited to:
firstly, the browsing kernel of the network view sends a data acquisition request aiming at the URL to a server providing a webpage, so that the server providing the webpage acquires webpage data corresponding to the URL according to the URL and sends the webpage data to the network view, and thus, the network view can receive the webpage data sent by the server providing the webpage.
It can be understood that the web view is a program control that includes a browsing kernel and is used for presenting web pages, and unlike a real browser, a browser generally includes an address bar, a toolbar and an interface for presenting web pages, and the web view may only include an interface for presenting web pages.
For example, in the embodiment of the present invention, a method for the web view to obtain a resource address of a page resource included in the web page from the obtained web page data may include, but is not limited to:
first, the browsing kernel of the web view analyzes the acquired web page data to acquire a Hyper Text Markup Language (HTML) file of the web page. Then, the browsing kernel of the network view judges whether the webpage contains the page resource or not according to the HTML file. And if the webpage contains the webpage resources, acquiring resource addresses of the webpage resources contained in the webpage from the webpage data.
Or if the webpage does not contain the page resource, the resource address of the page resource is not acquired from the webpage data.
Preferably, in the embodiment of the present invention, the page resources included in the web page may include, but are not limited to: at least one of video, audio, pictures, novels, and text.
Accordingly, the resource address of the page resource may include, but must be limited to: at least one of a video playing address, an audio playing address, a picture storing address, a novel storing address and a text storing address.
For example, in the embodiment of the present invention, the method for determining, by a web view, whether the web page includes the page resource according to the HTML file may include, but is not limited to:
first, the browsing kernel of the web view determines the tab of the page resource. Then, the browsing kernel of the network view judges whether the HTML file contains the label of the page resource, and the browsing kernel of the network view judges whether the webpage contains the page resource according to whether the HTML file contains the label of the page resource. If the HTML file contains the label of the page resource, determining that the webpage contains the page resource, otherwise, if the HTML file does not contain the label of the page resource, determining that the webpage does not contain the page resource.
For example, if the page resource is a video, the browsing kernel of the web view first determines that a tag of the video is a video tag, and then determines whether the HTML file includes the video tag. If the HTML file contains the video tag, the webpage is judged to contain the video, and further, the playing address of the video can be obtained from the SRC attribute of the video tag. Otherwise, if the HTML file does not contain the video tag, the webpage is judged not to contain the video.
Or, for another example, if the page resource is a picture, the browsing kernel of the web view first determines that the tag of the picture is an img tag, and then determines whether the HTML file includes the img tag. If the HTML file contains the img tag, the webpage is judged to contain the picture, and further, the storage address of the picture can be obtained from the SRC attribute of the img tag. Otherwise, if the HTML file does not contain the img tag, the webpage is judged not to contain the picture.
S203, the network view sends the resource address of the page resource to the client, so that the client loads the page resource by using the resource address of the page resource.
Specifically, the network view may send the obtained resource address of the page resource to the client by using the above method for sniffing the resource address of the page resource, so that the client may load the page resource by using the resource address of the page resource.
Optionally, after the method S202, the method may further include:
and the network view provides the resource address of the page resource to a server, so that the server correspondingly stores the URL and the resource address of the page resource.
Specifically, the method for providing the resource address of the page resource to the server by the network view may include, but is not limited to:
the server may provide an upload interface, and after the web view obtains the resource address of the page resource, the resource address of the page resource may be provided to the server through the upload interface provided by the server, so that the server obtains the resource address of the page resource.
Preferably, the server may use a built-in database to correspondingly store the URL and the resource address of the page resource, so that the server may provide the resource address of the page resource stored in the database to another client when the other client requests the resource address of the page resource.
It should be noted that the network view acquires the resource address of the page resource and can provide the resource address of the page resource to the server, and the network view cannot block the IP address by the third-party website, so that the resource address of the page resource can be successfully sniffed. The problem of in the prior art, the server sniffs the resource address of page resource and fails to reach and avoid the cache inefficacy is solved.
Moreover, the network view reports the acquired resource addresses of the page resources to the server, so that the server can realize the continuous updating of the resource addresses of the page resources, the cache of the resource addresses of the page resources is ensured to be effective, and the problem of cache failure caused by the fact that the server cannot sniff the resource addresses of the page resources in the prior art is solved.
In addition, in the embodiment of the present invention, if the page resource is a video, and the web view does not need to display the web page, in order to enable the web view to acquire the web page data faster, the web view may be configured to be in a no-image mode when the web view is newly created, so that the web page data acquired by the web view does not include image data, thereby increasing the speed of acquiring the web page data.
Example two
Please refer to fig. 3, which is a flowchart illustrating a second embodiment of a method for sniffing a resource address according to an embodiment of the present invention, wherein the method includes the following steps:
s301, a client sends a Uniform Resource Locator (URL) of a webpage to a network view, so that the network view acquires webpage data by using the URL, and acquires a resource address of a webpage resource contained in the webpage from the webpage data.
S302, the client receives the resource address of the page resource sent by the network view.
S303, the client loads the page resource by using the resource address of the page resource.
Specifically, the network view may send the obtained resource address of the page resource to the client by using the above method for sniffing the resource address of the page resource, so that the client may load the page resource by using the resource address of the page resource.
For example, the client calls a local video player to directly play the video by using the playing address of the video.
For another example, the client calls a local audio player by using the playing address of the audio to directly play the audio.
For another example, the client calls a local novel reader by using the storage address of the novel, and the novel is directly displayed.
For another example, the client calls a local picture browser by using the storage address of the picture, and directly displays the picture.
In the prior art, a page loading mode for acquiring page resources contained in a webpage by loading a complete webpage is adopted, and the page loading mode has a poor effect, such as the problems that a page flickers, an advertisement is inserted, full-screen playing cannot be performed, a small window cannot be performed, and the like. In the embodiment of the invention, the required page resource can be directly loaded by using the resource address of the page resource without loading a complete webpage. For example, the video is directly played by a local video player, so that advertisements can be shielded, played in a full screen mode, and the like. The problem of among the prior art the effect of loading mode is relatively poor is solved.
The embodiment of the invention further provides an embodiment of a device for realizing the steps and the method in the embodiment of the method.
EXAMPLE III
Please refer to fig. 4, which is a functional block diagram of a first embodiment of a device for snooping a resource address according to an embodiment of the present invention. The apparatus shown in fig. 4 is an execution subject of the sniffing method for resource addresses provided in the first embodiment. As shown, the apparatus comprises:
a receiving unit 401, configured to receive a uniform resource locator URL of a web page sent by a client;
a processing unit 402, configured to obtain web page data by using the URL, and obtain a resource address of a page resource included in the web page from the web page data;
an output unit 403, configured to send the resource address of the page resource to the client, so that the client loads the page resource by using the resource address of the page resource.
Preferably, the processing unit 402 is specifically configured to:
analyzing the webpage data to acquire a hypertext markup language (HTML) file of the webpage;
judging whether the webpage contains the page resource or not according to the HTML file;
and if the webpage contains the webpage resources, acquiring resource addresses of the webpage resources contained in the webpage from the webpage data.
Preferably, when the processing unit 402 is configured to determine whether the webpage includes the page resource according to the HTML file, specifically, the processing unit is configured to:
determining a label of the page resource;
judging whether the HTML file contains the label of the page resource or not;
and judging whether the webpage contains the page resource or not according to whether the HTML file contains the label of the page resource or not.
Preferably, the processing unit 402 is specifically configured to:
sending a data acquisition request aiming at the URL to a server providing the webpage so that the server providing the webpage acquires the webpage data according to the URL;
and receiving the webpage data sent by the server providing the webpage.
Optionally, the output unit 403 is further configured to:
and providing the resource address of the page resource to a server, so that the server correspondingly stores the URL and the resource address of the page resource.
Since each unit in the present embodiment can execute the method shown in fig. 2, reference may be made to the related description of fig. 2 for a part of the present embodiment that is not described in detail.
Example four
Please refer to fig. 5, which is a functional block diagram of a second embodiment of a resource address sniffing apparatus according to the present invention. The apparatus shown in fig. 5 is an execution subject of the sniffing method for resource addresses provided in the second embodiment. As shown, the apparatus comprises:
an output unit 501, configured to send a uniform resource locator URL of a web page to a web view, so that the web view obtains web page data by using the URL, and obtains a resource address of a page resource included in the web page from the web page data;
a receiving unit 502, configured to receive a resource address of the page resource sent by the network view;
the processing unit 503 is configured to load the page resource by using the resource address of the page resource.
Since each unit in the present embodiment can execute the method shown in fig. 3, reference may be made to the related description of fig. 3 for a part of the present embodiment that is not described in detail.
EXAMPLE six
Please refer to fig. 6, which is a schematic structural diagram of a system for sniffing resource addresses according to an embodiment of the present invention. As shown, the system includes: a client 601 and a web view 602; wherein,
the client 601 is configured to send a uniform resource locator URL of a web page to the web view 602;
the web view 602 is configured to obtain web page data by using the URL, obtain a resource address of a page resource included in the web page from the web page data, and send the resource address of the page resource to the client;
the client 601 is further configured to load the page resource by using the resource address of the page resource.
The technical scheme of the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, a network view receives a Uniform Resource Locator (URL) of a webpage sent by a client, so that webpage data are obtained by using the URL, and a resource address of a webpage resource contained in the webpage is obtained from the webpage data; and further, the resource address of the page resource is sent to the client, so that the client loads the page resource by using the resource address of the page resource.
In the technical scheme provided by the embodiment of the invention, the network view performs the sniffing operation of the resource address of the page resource and provides the sniffing operation to the client. Because the network view cannot be blocked by the third-party website, the network view can successfully sniff the resource address of the page resource, and therefore the problem that the server fails to sniff the resource address of the page resource in the prior art is solved.
In addition, the client can directly load the page resources by using the resource addresses of the page resources obtained by the network view sniffing, and the webpage containing the page resources does not need to be loaded first, and then the page resources in the webpage are loaded, so that the loading efficiency of the page resources can be improved, and the loading time and the operation cost can be reduced.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (13)
1. A method for sniffing resource addresses, the method comprising:
receiving a Uniform Resource Locator (URL) of a webpage sent by a client by a network view;
the network view acquires webpage data by using the URL, and acquires a resource address of a page resource contained in the webpage from the webpage data;
and the network view sends the resource address of the page resource to the client, so that the client loads the page resource by using the resource address of the page resource.
2. The method according to claim 1, wherein the obtaining, by the web view, the resource address of the page resource included in the web page from the web page data comprises:
the network view analyzes the webpage data to acquire a hypertext markup language (HTML) file of the webpage;
the network view judges whether the webpage contains the webpage resources or not according to the HTML file;
and if the webpage contains the page resource, the network view acquires the resource address of the page resource contained in the webpage from the webpage data.
3. The method of claim 2, wherein the determining, by the web view, whether the web page contains the page resource according to the HTML file comprises:
the network view determines the label of the page resource;
the network view judges whether the HTML file contains the label of the page resource or not;
and the network view judges whether the webpage contains the page resource according to whether the HTML file contains the label of the page resource.
4. The method according to claim 1 or 2, wherein the web view obtains web page data by using the URL, and comprises:
the network view sends a data acquisition request aiming at the URL to a server providing the webpage so that the server providing the webpage acquires the webpage data according to the URL;
and the network view receives the webpage data sent by the server providing the webpage.
5. The method of claim 1, further comprising:
and the network view provides the resource address of the page resource to a server, so that the server correspondingly stores the URL and the resource address of the page resource.
6. A method for sniffing resource addresses, the method comprising:
the method comprises the steps that a client sends a Uniform Resource Locator (URL) of a webpage to a network view, so that the network view acquires webpage data by using the URL, and acquires a resource address of a webpage resource contained in the webpage from the webpage data;
the client receives a resource address of the page resource sent by the network view;
and the client loads the page resource by using the resource address of the page resource.
7. An apparatus for sniffing resource addresses, the apparatus comprising:
the receiving unit is used for receiving a Uniform Resource Locator (URL) of a webpage sent by a client;
the processing unit is used for acquiring webpage data by using the URL and acquiring a resource address of a webpage resource contained in the webpage from the webpage data;
and the output unit is used for sending the resource address of the page resource to the client so that the client loads the page resource by using the resource address of the page resource.
8. The apparatus according to claim 7, wherein the processing unit is specifically configured to:
analyzing the webpage data to acquire a hypertext markup language (HTML) file of the webpage;
judging whether the webpage contains the page resource or not according to the HTML file;
and if the webpage contains the webpage resources, acquiring resource addresses of the webpage resources contained in the webpage from the webpage data.
9. The apparatus according to claim 8, wherein the processing unit, when determining whether the web page includes the page resource according to the HTML file, is specifically configured to:
determining a label of the page resource;
judging whether the HTML file contains the label of the page resource or not;
and judging whether the webpage contains the page resource or not according to whether the HTML file contains the label of the page resource or not.
10. The apparatus according to claim 7 or 8, wherein the processing unit is specifically configured to:
sending a data acquisition request aiming at the URL to a server providing the webpage so that the server providing the webpage acquires the webpage data according to the URL;
and receiving the webpage data sent by the server providing the webpage.
11. The apparatus of claim 7, wherein the output unit is further configured to:
and providing the resource address of the page resource to a server, so that the server correspondingly stores the URL and the resource address of the page resource.
12. An apparatus for sniffing resource addresses, the apparatus comprising:
the output unit is used for sending a Uniform Resource Locator (URL) of a webpage to a network view, so that the network view acquires webpage data by using the URL, and acquires a resource address of a webpage resource contained in the webpage from the webpage data;
a receiving unit, configured to receive a resource address of the page resource sent by the network view;
and the processing unit is used for loading the page resource by using the resource address of the page resource.
13. A resource address sniffing system, characterized in that the system comprises a client and a network view; wherein,
the client is used for sending a Uniform Resource Locator (URL) of a webpage to the network view;
the network view is used for acquiring webpage data by using the URL, acquiring a resource address of a page resource contained in the webpage from the webpage data, and sending the resource address of the page resource to the client;
the client is further configured to load the page resource by using the resource address of the page resource.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510254273.3A CN104881452B (en) | 2015-05-18 | 2015-05-18 | Resource address sniffing method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510254273.3A CN104881452B (en) | 2015-05-18 | 2015-05-18 | Resource address sniffing method, device and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104881452A true CN104881452A (en) | 2015-09-02 |
CN104881452B CN104881452B (en) | 2020-05-29 |
Family
ID=53948945
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510254273.3A Active CN104881452B (en) | 2015-05-18 | 2015-05-18 | Resource address sniffing method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104881452B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105677730A (en) * | 2015-12-29 | 2016-06-15 | 北京金山安全软件有限公司 | Method and device for reading webpage resources and electronic equipment |
CN106469044A (en) * | 2015-08-14 | 2017-03-01 | 腾讯科技(深圳)有限公司 | The method and apparatus realizing page jump |
CN110298000A (en) * | 2019-05-21 | 2019-10-01 | 平安普惠企业管理有限公司 | Acquisition methods, terminal device and the medium of page parameter |
CN111368135A (en) * | 2020-02-24 | 2020-07-03 | 郑州阿帕斯数云信息科技有限公司 | Video sniffing method and device |
CN112714365A (en) * | 2019-10-25 | 2021-04-27 | 上海哔哩哔哩科技有限公司 | Video playing method and system |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050114782A1 (en) * | 2003-11-26 | 2005-05-26 | Uwe Klinger | Providing navigation in a browser |
CN103297498A (en) * | 2013-04-19 | 2013-09-11 | 北京宽连十方数字技术有限公司 | Relevant content pushing method based on mobile phone client side |
CN103338384A (en) * | 2013-05-31 | 2013-10-02 | 优视科技有限公司 | Video play method and video play device |
CN103455600A (en) * | 2013-09-03 | 2013-12-18 | 小米科技有限责任公司 | Video URL (Uniform Resource Locator) grabbing method and device and server equipment |
CN104008328A (en) * | 2013-02-27 | 2014-08-27 | 联想(北京)有限公司 | Resource loading method and device |
CN104050253A (en) * | 2014-06-12 | 2014-09-17 | 北京金山网络科技有限公司 | Webpage display method and browser |
CN104142966A (en) * | 2013-09-26 | 2014-11-12 | 腾讯科技(深圳)有限公司 | Web page displaying method and client |
CN104216630A (en) * | 2014-08-21 | 2014-12-17 | 小米科技有限责任公司 | Interface sharing method and interface sharing device |
CN104462570A (en) * | 2014-12-26 | 2015-03-25 | 小米科技有限责任公司 | Webpage content obtaining method and device |
CN104572777A (en) * | 2013-10-28 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Webpage loading method and device based on UIWebView component |
-
2015
- 2015-05-18 CN CN201510254273.3A patent/CN104881452B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050114782A1 (en) * | 2003-11-26 | 2005-05-26 | Uwe Klinger | Providing navigation in a browser |
CN104008328A (en) * | 2013-02-27 | 2014-08-27 | 联想(北京)有限公司 | Resource loading method and device |
CN103297498A (en) * | 2013-04-19 | 2013-09-11 | 北京宽连十方数字技术有限公司 | Relevant content pushing method based on mobile phone client side |
CN103338384A (en) * | 2013-05-31 | 2013-10-02 | 优视科技有限公司 | Video play method and video play device |
CN103455600A (en) * | 2013-09-03 | 2013-12-18 | 小米科技有限责任公司 | Video URL (Uniform Resource Locator) grabbing method and device and server equipment |
CN104142966A (en) * | 2013-09-26 | 2014-11-12 | 腾讯科技(深圳)有限公司 | Web page displaying method and client |
CN104572777A (en) * | 2013-10-28 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Webpage loading method and device based on UIWebView component |
CN104050253A (en) * | 2014-06-12 | 2014-09-17 | 北京金山网络科技有限公司 | Webpage display method and browser |
CN104216630A (en) * | 2014-08-21 | 2014-12-17 | 小米科技有限责任公司 | Interface sharing method and interface sharing device |
CN104462570A (en) * | 2014-12-26 | 2015-03-25 | 小米科技有限责任公司 | Webpage content obtaining method and device |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106469044A (en) * | 2015-08-14 | 2017-03-01 | 腾讯科技(深圳)有限公司 | The method and apparatus realizing page jump |
CN105677730A (en) * | 2015-12-29 | 2016-06-15 | 北京金山安全软件有限公司 | Method and device for reading webpage resources and electronic equipment |
CN105677730B (en) * | 2015-12-29 | 2019-02-26 | 北京金山安全软件有限公司 | Method and device for reading webpage resources and electronic equipment |
CN110298000A (en) * | 2019-05-21 | 2019-10-01 | 平安普惠企业管理有限公司 | Acquisition methods, terminal device and the medium of page parameter |
CN112714365A (en) * | 2019-10-25 | 2021-04-27 | 上海哔哩哔哩科技有限公司 | Video playing method and system |
CN111368135A (en) * | 2020-02-24 | 2020-07-03 | 郑州阿帕斯数云信息科技有限公司 | Video sniffing method and device |
CN111368135B (en) * | 2020-02-24 | 2023-09-05 | 郑州阿帕斯数云信息科技有限公司 | Video sniffing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104881452B (en) | 2020-05-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6382276B2 (en) | Ads present in the view | |
KR102278657B1 (en) | Automatically determining a size for a content item for a web page | |
US9754043B2 (en) | Rendering structured documents with place-markers | |
CN102629273B (en) | Advertising information pushing method based on browser, device and browser system | |
US9923793B1 (en) | Client-side measurement of user experience quality | |
US8689117B1 (en) | Webpages with conditional content | |
US9606712B1 (en) | Placement of user interface elements in a browser based on navigation input | |
US20120101907A1 (en) | Securing Expandable Display Advertisements in a Display Advertising Environment | |
CN104881452B (en) | Resource address sniffing method, device and system | |
US9870578B2 (en) | Scrolling interstitial advertisements | |
CN110442815B (en) | Page generation method, system, device and computer readable storage medium | |
US20120240019A1 (en) | Method and system for tracking web link usage | |
JP2016532915A (en) | Estimating the visibility of content items | |
US20140337147A1 (en) | Presentation of Engagment Based Video Advertisement | |
US10235712B1 (en) | Generating product image maps | |
US20180131779A1 (en) | Recording And Triggering Web And Native Mobile Application Events With Mapped Data Fields | |
CN110598149A (en) | Webpage access method, device and storage medium | |
US20210192563A1 (en) | Webpage advertisement anti-blocking method, content delivery network, and client terminal | |
CN111339456B (en) | Preloading method and device | |
EP2544106A1 (en) | Handling content related to digital visual objects | |
US20220078161A1 (en) | Method and apparatus for advertisement anti-blocking | |
KR20190059943A (en) | Method and system for real-time content delivery | |
US11620681B2 (en) | Methods, systems, and media for dynamically detecting mobile environment information | |
EP2915072A1 (en) | Sytem and method for processing content of a web resource for display | |
KR20110087444A (en) | Method and mobile phone for supporting play moving picture in webpage |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |