WO2018010573A1 - 一种脚本生成方法与装置 - Google Patents
一种脚本生成方法与装置 Download PDFInfo
- Publication number
- WO2018010573A1 WO2018010573A1 PCT/CN2017/091674 CN2017091674W WO2018010573A1 WO 2018010573 A1 WO2018010573 A1 WO 2018010573A1 CN 2017091674 W CN2017091674 W CN 2017091674W WO 2018010573 A1 WO2018010573 A1 WO 2018010573A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- webpage
- script
- content
- code
- determined
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/951—Indexing; Web crawling techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Definitions
- the present application relates to the field of computer technology, and in particular, to a script generation method and apparatus.
- web crawlers can be widely used in the fields of search, data mining, and the like because they can capture text content in web pages.
- a web crawler can crawl all of the content on a web page or crawl some of the content on a web page.
- the staff in order to use the web crawler to crawl the target content in the target webpage, the staff must first write a script to capture the target content, and the web crawler can capture the target content according to the script.
- HTML HyperText Markup Language
- the above web crawler can crawl the content of the webpage by the above method, it is inefficient to manually write a crawl script.
- the embodiment of the present invention provides a method and a device for generating a script, which are used to solve the problem of low efficiency in manually writing a crawling script when crawling webpage content by using a web crawler in the prior art.
- a script generation method including:
- a crawl script is generated according to the webpage code.
- a script generating device comprising:
- a content determining module that determines a webpage content selected by the user in the displayed webpage
- the code determining module determines, according to the determined webpage content, a webpage code corresponding to the webpage content
- a script generation module generates a crawl script according to the webpage code.
- the script generating method provided by the embodiment of the present application is determined by determining the webpage content selected by the user in the webpage, and the webpage is determined by determining the webpage content selected by the user in the webpage.
- FIG. 2a is a specific flowchart of a script generating method according to an embodiment of the present application
- Figure 2b is a page for determining an HTML attribute value according to an embodiment of the present application
- 2c is a page for inquiring a user to crawl which webpage content according to an embodiment of the present application
- FIG. 2 is a page displayed after a user selects a webpage content according to an embodiment of the present application
- FIG. 2 e is a page displayed after the user selects the content of the web page twice according to the embodiment of the present application;
- FIG. 3 is a schematic structural diagram of a script generating apparatus according to an embodiment of the present disclosure.
- the embodiment of the present application provides a script generating method.
- the execution body of the method may be, but not limited to, a user terminal such as a mobile phone, a tablet computer or a personal computer (PC), or an application (Application, APP) running on the user terminals, or may be a server or the like. device.
- a user terminal such as a mobile phone, a tablet computer or a personal computer (PC), or an application (Application, APP) running on the user terminals, or may be a server or the like. device.
- Step 11 Display the web page.
- the webpage when the user wants to use the web crawler to crawl the webpage content in the webpage, the webpage may be accessed through a browser installed in the PC or another browser-enabled application, so that the PC can display the webpage.
- This page is for easy follow-up.
- follow the browser as an example.
- the user can input a web address in a web address input box in the browser, and access the web address, and the PC displays the web page corresponding to the web address.
- Step 12 Determine the content of the webpage selected by the user in the displayed webpage.
- the user can select the webpage content to be crawled in the webpage according to actual needs, so that the browser can determine the content of the webpage selected by the user in the webpage, and then perform subsequent operations, and finally generate Crawl the script.
- the reason why the user can select the content of the webpage in the webpage is because the first script exists in the webpage code of the webpage.
- the first script is used to provide the function of selecting web content in a web page.
- the first script includes Cascading Style Sheets (CSS) scripts.
- CCS Cascading Style Sheets
- the first script is located at the top or bottom of the page's webpage code. This is because if the first script is embedded in the middle of the webpage code of the webpage, when the browser performs subsequent operations, the first script may be mistaken as part of the webpage code of the webpage, thereby affecting the final crawling script. generate. Therefore, the first script is generally embedded Enter at the top or bottom of the page code.
- the first script exists in the webpage code of the webpage, possibly because the user already has the first script in the webpage code of the webpage returned by the server after accessing the webpage through the browser, or it may be because the user is determined Before the selected webpage content in the webpage, the browser embeds the preset first script into the webpage code returned by the server.
- the server receives the webpage code request of the webpage sent by the browser, and then the preset A script is embedded in the webpage code of the webpage, and then the webpage code is sent to the browser; it is also possible that the developer of the browser consults with the developer of the webpage in advance, and the developer of the webpage writes the webpage code of the webpage. , the first script is embedded in the webpage code.
- the first script exists in the webpage code returned by the server. Among them, the first script does not affect the rendering of the webpage by the browser.
- Step 13 Determine, according to the determined webpage content, a webpage code corresponding to the webpage content.
- the browser may determine the webpage code corresponding to the webpage content according to the webpage content determined by performing step 12.
- the browser embeds the preset second script into the webpage code of the webpage, so that the browser
- the webpage code corresponding to the target content may be determined by the second script according to the target content.
- the second script includes a Javascript (JS) script.
- a second script exists in the webpage code returned by the server.
- the browser can determine the webpage code corresponding to the content of the webpage by using the second script according to the content of the webpage.
- the reason that the second script exists in the webpage code returned by the server may be that the server inserts the preset second script into the webpage code of the webpage after receiving the webpage code request of the webpage sent by the browser, and then The webpage code is sent to the browser; it is also possible that the developer of the web browser negotiates with the developer of the webpage in advance, and the developer of the webpage embeds the second script in the webpage code when writing the webpage code of the webpage. . Then, the server A second script exists in the returned webpage code. Among them, the second script does not affect the browser's rendering of the web page.
- the browser determines, by using the second script, a specific implementation manner of the webpage code corresponding to the webpage content, as follows:
- the browser determines the minimum dom tree corresponding to the webpage content in the webpage code of the webpage by using the second script according to the webpage content determined by performing step 12, and then determines, in the smallest dom tree, the webpage content corresponding to the webpage content.
- the value of the HTML attribute is the value of the HTML attribute.
- the browser can render the webpage content and the webpage code mapping relationship according to the webpage code, or establish a mapping relationship between the coordinate point of the webpage content in the webpage and the webpage code. Therefore, the browser can determine the webpage code corresponding to the webpage content, that is, the minimum dom tree corresponding to the webpage content, according to the webpage content determined by performing step 12 according to the mapping relationship. If the content of the webpage determined by performing step 12 corresponds to a minimum dom tree, then in the smallest dom tree, the HTML attribute value corresponding to the webpage content determined by performing step 12 is determined. Among them, the HTML attribute value can be class, or id and class.
- the browser can display an inquiry page on the screen of the PC where the browser is located, to ask the user to determine the id and class in the smallest dom tree, or determine the smallest dom.
- the class in the tree For example, as shown in Figure 2b, the page includes controls that determine the id and class, and controls that determine the class. If the user clicks on the control that determines the id and class, the browser determines the id and class. If the user clicks on the control that determines the class, the browser determines the class.
- the HTML attribute values corresponding to the webpage content determined by performing step 12 are respectively determined in the smallest dom trees.
- the browser can display an inquiry page as shown in FIG. 2b on the screen of the PC where the browser is located, to ask the user to determine the id and class in each of the smallest dom trees, or to determine The class in each of the smallest dom trees.
- the user can determine which control to click according to actual needs, so that the browser determines the corresponding HTML attribute value according to the user's selection.
- step 14 can be executed to finally generate a crawl script.
- Step 14 Generate a crawl script according to the webpage code.
- the browser can add the HTML attribute value in the determined webpage code corresponding to the webpage content that is to be crawled to the preset script generation template to generate a crawl script.
- the crawl script is used to capture the content of the webpage that matches the value of the HTML attribute.
- the browser can save the crawl script locally after generating the crawl script.
- the browser can also save the smallest dom tree corresponding to the content of the webpage determined by performing step 12 and all the webpage code locally, so that the browser can use the above-mentioned crawling script and the smallest dom in subsequent operations. Tree and webpage code to crawl web content.
- the browser can pop up a page in the PC where the browser is located to inform the user that the crawl script has been generated and ask the user whether to crawl the webpage content.
- the page can be as shown in Figure 2c.
- the page includes a first grab control and a second grab control. If the user clicks on the first grab control, the browser sends the crawl script and the smallest dom tree corresponding to the webpage content determined by step 12 to the parsing engine. If the id and class are included in the crawling script, the parsing engine finds the smallest dom tree in which the id is located according to the id, and extracts the user in the smallest dom tree according to the class in which the id exists in the same combination.
- the content of the web page taken For example, if the determined user wants to grab the minimum dom tree corresponding to the price of $149.99 in the web page shown in FIG. 1 is:
- the browser can extract the web content matching the class in all the smallest dom trees that are sent to the parsing engine according to the class.
- the browser sends the crawl script and the webpage code of the web page to the parsing engine. If the id and class are included in the crawling script, the parsing engine finds the smallest dom tree in which the id is located according to the id, and extracts the user in the smallest dom tree according to the class in which the id exists in the same combination. The content of the web page taken.
- the browser can extract the content of the webpage matching the class in the webpage code of the webpage according to the class.
- the execution bodies of the steps of the method provided by the embodiment of the present application may be the same or different.
- the browser may send the determined webpage code and the HTML attribute value to the server, so that the server generates a crawling script according to the webpage code.
- the foregoing is only an exemplary description of a browser installed in a PC.
- the execution body of the embodiment of the present application may be a browser installed in a PC, or may be another browser installed in the PC.
- the application of the function may also be an APP with a browser function in the mobile terminal, which is not limited in this application.
- the user when the browser performs the step 12, specifically, in an embodiment, the user can start to confirm the content of the webpage selected by the user once the user starts to select the frame in the webpage. Or, after the user box is selected, the selected target content is framed by a rectangular box, and the control box that continues to select, submit, and cancel is displayed in the web page.
- the target content that is framed by the rectangular box may be displayed in a highlighted display manner, or may be displayed in an initial display manner of the target content when the web page is displayed, which may be set according to user requirements. There is no limit to this. For example, as shown in FIG. 2d, the page displayed in FIG.
- 2d is a page displayed after the user selects the price information of an item in a certain shopping website that he wants to capture.
- the price information on this page is framed by a rectangular box, and the controls that continue to frame, submit, and cancel are displayed on the right side of the price information. Among them, the framed price information is not highlighted, but is displayed in the initial display state.
- the user wants to continue to select other content, he can click the continue to select the control and continue to select other content. If the user no longer wants to select other content, he can click the submit control, and the browser determines the content of the web page selected by the user as the target content. If the user wants to cancel the previously selected content and select other content, click the Cancel control to re-select it.
- the user when the user selects the webpage content to be crawled in the webpage, the user may first perform a rough selection, and the browser may determine the webpage according to the content of the webpage selected by the user for the first time. The smallest dom corresponding to the content. Then, the user makes a second selection based on the content of the first selected webpage, and the browser can confirm the smallest dom determined.
- the HTML attribute value in the webpage code corresponding to the web content of the second selected webpage is determined. For example, as shown in FIG. 2e, if the user wants to capture the price information of " ⁇ 175" in the webpage, the user can roughly select the webpage content including the price information of " ⁇ 175" when the first selection is made.
- the browser can determine the smallest dom tree corresponding to the content of the webpages according to the content of the first selection.
- the browser can determine the HTML attribute value corresponding to " ⁇ 175" in the smallest dom tree.
- Fig. 2e There are two rectangular boxes in Fig. 2e, wherein all the contents in the larger rectangular box are the content selected by the user for the first time, and the content of the web page in the smaller rectangular box is the content selected by the user for the second time.
- the script generating method provided in the embodiment of the present application may be implemented by using a script generating apparatus.
- FIG. 3 is a schematic structural diagram of a script generating apparatus according to an embodiment of the present application, which mainly includes the following apparatus:
- the content determining module 31 determines the webpage content selected by the user in the displayed webpage.
- the code determining module 32 determines a webpage code corresponding to the webpage content according to the determined webpage content.
- the script generation module 33 generates a crawl script according to the webpage code.
- the device further includes:
- the first embedding module embeds the preset first script into the webpage code of the webpage before the content determining module 31 determines that the webpage content selected by the user in the displayed webpage.
- the first script is configured to provide a function of selecting webpage content in the webpage, and the first script includes a cascading style sheet CSS script.
- the device further includes:
- a second embedding module before the code determining module 32 determines the webpage code corresponding to the webpage content according to the determined webpage content, embedding a preset second script into the webpage code of the webpage, where the second script includes JS script.
- the code determining module 32 determines, according to the determined webpage content, by the second script The webpage code corresponding to the content of the webpage.
- the code determining module 32 determines, in the webpage code of the webpage, a minimum document object model dom tree corresponding to the webpage content
- a hypertext markup language HTML attribute value corresponding to the webpage content is determined.
- the script generating module 33 adds the determined HTML attribute value to a preset script generation template to generate a crawl script, and the crawl script is used to capture the HTML attribute.
- the value of the page matches the content of the page.
- the device further includes:
- the content parsing module sends the crawling script and the webpage code to the parsing engine, and the corresponding webpage content is captured by the parsing engine.
- the script generating method provided by the embodiment of the present application is determined by determining the webpage content selected by the user in the webpage, and the webpage is determined by determining the webpage content selected by the user in the webpage.
- embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
- a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
- RAM random access memory
- ROM read only memory
- Memory is an example of a computer readable medium.
- Computer readable media includes both permanent and non-persistent, removable and non-removable media.
- Information storage can be implemented by any method or technology.
- the information can be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
- computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
- embodiments of the present application can be provided as a method, system, or computer program product.
- the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
- the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Transfer Between Computers (AREA)
Abstract
一种脚本生成方法与装置,用于解决现有技术中利用网络爬虫抓取网页内容时,人工编写抓取脚本效率较低的问题。该方法包括:确定用户在显示的网页中选定的网页内容(22);根据确定的网页内容,确定显示的网页内容对应的网页代码(23);根据所述网页代码,生成抓取脚本(24)。
Description
本申请涉及计算机技术领域,尤其涉及一种脚本生成方法与装置。
在现有技术中,由于网络爬虫可以抓取网页中的文本内容,目前被广泛的应用于搜索、数据挖掘等领域中。网络爬虫可以抓取网页中的全部内容,也可以抓取网页中的部分内容。
目前,若要利用网络爬虫去抓取目标网页中的目标内容,工作人员需先编写抓取目标内容的脚本,网络爬虫才能够根据该脚本,抓取到目标内容。
例如,若现在想要利用网络爬虫抓取如图1中所示的网页中的商品的价格信息,即“价钱:$149.99”。那么,工作人员便要通过浏览器访问相应的网页,然后在该网页对应的网页代码中查找“价钱:$149.99”对应的网页代码,即“价钱:$149.99”对应的最小的文档对象模型(Document Object Model,dom)树。
其中,“价钱:$149.99”对应的最小的dom树如下所示:
<div id="kfs_family_16"class="kfs-inner-container kfs-selected"style="width:20%;left:40%;background-image:url(https://images-na.ssl-images-amazon.com/ima ges/G/01/kindle/stripe/kfs-selector-2._CB386844303_.gif);"
onClick="javascript:(function(){})()">
<a class="kfs-current kfs-link">
<imgclass="kfs-img"style="margin-top:9px;"src="https://images-na.ssl-images-amazon.com/images/G/01/kindle/dp/2015/848470/famnav/fs-m._CB292709393_.png"/>
<br/>
Fire HD 8
<br/>
<span class="kfs-price">
$149.99
</span>
<br/>
</a>
<divid="kfs_popover_content_16"=class="kfs-popover-container"style="display:none;">Incredibly thin and light,designed for entertainment</div>
在查找到“价钱:$149.99”对应的最小的dom树后,获取“价钱:$149.99”对应的超文本标记语言(HyperText Markup Language,HTML)属性值信息,比如id="kfs_family_16"、class="kfs-price"等。工作人员根据该些属性值信息,编写出包含该些HTML属性值信息的抓取脚本。将编写好的脚本以及该商品对应的网页代码一并送入解析引擎中,以使得解析引擎可以根据抓取脚本中的id以及class,查找到“价钱:$149.99”对应的最小的dom树,并在该最小的dom树中提取出“价钱:$149.99”这一价格信息。
虽然通过上述方法,网络爬虫能够抓取网页中的内容,但是需要人工编写抓取脚本,效率较低。
发明内容
本申请实施例提供一种脚本生成方法与装置,用于解决现有技术中利用网络爬虫抓取网页内容时,人工编写抓取脚本效率较低的问题。
本申请实施例采用下述技术方案:
一种脚本生成方法,包括:
确定用户在显示的网页中选定的网页内容;
根据确定的网页内容,确定所述网页内容对应的网页代码;
根据所述网页代码,生成抓取脚本。
一种脚本生成装置,包括:
内容确定模块,确定用户在显示的网页中选定的网页内容;
代码确定模块,根据确定的网页内容,确定所述网页内容对应的网页代码;
脚本生成模块,根据所述网页代码,生成抓取脚本。
本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:
与现有技术中利用网络爬虫抓取网页内容时,需人工编写抓取脚本相比,采用本申请实施例提供的脚本生成方法,通过确定用户在网页中选定的网页内容,确定出该网页内容对应的网页代码,并根据该网页代码生成抓取脚本,从而解决了现有技术中利用网络爬虫抓取网页内容时,人工编写抓取脚本效率较低的问题。
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1为现有技术中的目标网页中的内容;
图2a为本申请实施例提供的一种脚本生成方法的具体流程图;
图2b为本申请实施例提供的确定HTML属性值的页面;
图2c为本申请实施例提供的询问用户抓取哪一种网页内容的页面;
图2d为本申请实施例提供的用户框选网页内容后显示出的页面;
图2e为本申请实施例提供的用户两次框选网页内容后显示出的页面;
图3为本申请实施例提供的一种脚本生成装置的具体结构示意图。
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
以下结合附图,详细说明本申请实施例提供的技术方案。
为了解决了现有技术中利用网络爬虫抓取网页内容时,人工编写抓取脚本效率较低的问题,本申请实施例提供一种脚本生成方法。
该方法的执行主体,可以但不限于为手机、平板电脑或个人电脑(Personal Computer,PC)等用户终端,或者该些用户终端上运行的应用(Application,APP),或者,还可以是服务器等设备。
为便于描述,下文以该方法的执行主体为PC为例,对该方法的实施方式进行介绍。可以理解,该方法的执行主体为PC只是一种示例性的说明,并不应理解为对该方法的限定。
该方法的具体流程示意图如图2a所示,包括下述步骤:
步骤11,显示网页。
在本申请实施例中,当用户想要利用网络爬虫抓取网页中的网页内容时,可以通过PC中安装的浏览器或者其他具有浏览器功能的应用访问该网址,以使得该PC可以显示出该网页,便于后续操作。后续以浏览器为例进行说明。
具体的,用户可以在浏览器中的网址输入框中输入网址,并访问该网址,该PC便显示出该网址对应的网页。
步骤12,确定用户在显示的网页中选定的网页内容。
在PC显示出网页后,用户可以根据实际需求,在该网页中选定想要抓取的网页内容,以使得浏览器可以确定用户在网页中选定的网页内容,进而进行后续操作,最终生成抓取脚本。
用户之所以可以在网页中选定网页内容,是因为网页的网页代码中存在第一脚本。该第一脚本用于提供在网页中选定网页内容的功能。第一脚本包括层叠样式表(Cascading Style Sheets,CSS)脚本。一般情况下,第一脚本位于网页的网页代码中的顶部或底部。这是因为若将第一脚本嵌入到网页的网页代码的中间位置,在浏览器执行后续操作时,有可能会误将该第一脚本作为网页的网页代码的一部分,进而影响最终抓取脚本的生成。因此,一般将第一脚本嵌
入在网页代码的顶部或底部。
在实际应用中,网页的网页代码中存在第一脚本,有可能是因为用户在通过浏览器访问网址后,服务器返回的网页的网页代码中已经存在第一脚本了,也有可能是因为在确定用户在所述网页中选定的网页内容之前,浏览器将预设的第一脚本嵌入到了服务器返回的网页代码中。
若在通过浏览器访问网址后,服务器返回的网页的网页代码中已经存在第一脚本了,这有可能是服务器在接收到浏览器发送的获取网页的网页代码请求后,便将预设的第一脚本嵌入了网页的网页代码中,然后再将该网页代码发送给浏览器;也有可能是浏览器的开发人员事先与网页的开发人员协商好,网页的开发人员在编写该网页的网页代码时,便将第一脚本嵌入了该网页代码中。于是,服务器返回的网页代码中存在第一脚本。其中,第一脚本并不会影响浏览器对网页的渲染。
步骤13,根据确定的网页内容,确定所述网页内容对应的网页代码。
在执行完毕步骤12后,浏览器可以根据通过执行步骤12确定的网页内容,确定所述网页内容对应的网页代码。
这是因为在浏览器根据通过执行步骤12确定的网页内容,确定所述网页内容对应的网页代码之前,浏览器便将预设的第二脚本嵌入到了网页的网页代码中,以使得该浏览器可以根据目标内容,通过第二脚本,确定目标内容对应的网页代码。其中,第二脚本包括Javascript(JS)脚本。
或者,用户在浏览器中访问网页对应的网址后,服务器返回的网页代码中便存在第二脚本。这样,浏览器便可以根据网页内容,通过第二脚本,确定该网页内容对应的网页代码。其中,服务器返回的网页代码中存在第二脚本的原因可能是服务器在接收到浏览器发送的获取网页的网页代码请求后,便将预设的第二脚本嵌入了网页的网页代码中,然后再将该网页代码发送给浏览器;也有可能是浏览器的开发人员事先与网页的开发人员协商好,网页的开发人员在编写该网页的网页代码时,便将第二脚本嵌入了该网页代码中。于是,服务器
返回的网页代码中存在第二脚本。其中,第二脚本并不会影响浏览器对网页的渲染。
那么,浏览器根据通过执行步骤12确定的网页内容,通过第二脚本,确定该网页内容对应的网页代码的具体实施方式可以如下所述:
浏览器根据通过执行步骤12确定的网页内容,通过第二脚本,在网页的网页代码中,确定出该网页内容对应的最小dom树,然后在该最小的dom树中,确定出该网页内容对应的HTML属性值。
由于浏览器在根据网页代码渲染网页时,可以建立网页内容与网页代码的映射关系,或者建立网页中的网页内容所在的坐标点与网页代码之间的映射关系。因此,浏览器可以根据上述映射关系,根据通过执行步骤12确定的网页内容,确定出该网页内容对应的网页代码,即该网页内容对应的最小dom树。若通过执行步骤12确定的网页内容对应着一个最小的dom树,那在该最小的dom树中,确定出通过执行步骤12确定的网页内容对应的HTML属性值。其中,HTML属性值可以为class,也可以为id和class。具体的,在浏览器确定HTML属性值之前,浏览器可以在该浏览器所在PC的屏幕中显示出一个询问页面,用以询问用户确定最小的dom树中的id和class,还是确定最小的dom树中的class。例如,如图2b所示的页面,该页面中包括确定id和class的控件,以及确定class的控件。若用户点击确定id和class的控件,则浏览器确定id和class,若用户点击确定class的控件,则浏览器确定class。
若通过执行步骤12确定的网页内容对应着至少两个最小的dom树,那在该些最小的dom树中,分别确定出通过执行步骤12确定的网页内容对应的HTML属性值。在确定HTML属性值之前,浏览器可以在该浏览器所在的PC的屏幕中显示出如图2b所示的询问页面,用以询问用户确定每一个最小的dom树中的id和class,还是确定每一个最小的dom树中的class。用户便可根据实际需要,确定点击哪一个控件,从而使得浏览器根据用户的选择,确定相应的HTML属性值。
在确定出上述HTML属性值之后,便可执行步骤14,最终生成抓取脚本。
步骤14,根据所述网页代码,生成抓取脚本。
在执行完毕步骤13后,浏览器便可将确定出的想要抓取的网页内容对应的网页代码中的HTML属性值添加到预设的脚本生成模板中,生成抓取脚本。其中,该抓取脚本用于抓取与HTML属性值相匹配的网页内容。
其中,若浏览器确定出的HTML属性值为id和class,那么浏览器便可以分别将确定出的每一个dom中的id和class以{id=XXX,class=XXX}这种组合形式添加到预设的脚本生成模板中,生成抓取脚本。若浏览器确定出的HTML属性值为class,那么浏览器便可以分别将确定出的每一个dom中的class以{class=XXX}这种组合形式添加到预设的脚本生成模板中,生成抓取脚本。
其中,浏览器在生成抓取脚本后,可以将该抓取脚本保存在本地。另外,浏览器还可以将与通过执行步骤12确定出的网页内容对应的最小的dom树以及全部网页代码保存在本地,以使得浏览器可以在后续操作中可以运用上述抓取脚本、最小的dom树以及网页代码,抓取网页内容。
在生成抓取脚本后,浏览器可以在该浏览器所在的PC中弹出一个页面,用以告知用户抓取脚本已经生成,并询问用户是否抓取网页内容。
例如,该页面可以如图2c所示。该页面中包括第一抓取控件和第二抓取控件。若用户点击第一抓取控件,浏览器便将抓取脚本以及通过执行步骤12确定出的网页内容对应的最小的dom树,发送给解析引擎。若抓取脚本中包含id和class,解析引擎根据id找到该id所在的最小的dom树,再根据与该id存在于同一个组合中的class,提取出最小的dom树中的用户想要抓取的网页内容。例如,若确定出的用户想要抓取如图1所示的网页中的“价钱:$149.99对应的最小的dom树为:
<div id="kfs_family_16"class="kfs-inner-container kfs-selected"style="width:20%;left:40%;background-image:url(https://images-na.ssl-images-amazon.com/ima ges/G/01/kindle/stripe/kfs-selector-2._CB386844303_.gif);"
onClick="javascript:(function(){})()">
<a class="kfs-current kfs-link">
<imgclass="kfs-img"style="margin-top:9px;"src="https://images-na.ssl-images-amazon.com/images/G/01/kindle/dp/2015/848470/famnav/fs-m._CB292709393_.png"/>
<br/>
Fire HD 8
<br/>
<span class="kfs-price">
$149.99
</span>
<br/>
</a>
<divid="kfs_popover_content_16"=class="kfs-popover-container"style="display:none;">Incredibly thin and light,designed for entertainment</div>
抓取“价钱:$149.99”的抓取脚本中包含id="kfs_family_16",以及“价钱:$149.99”对应的class="kfs-price"。
那么,用户点击第一抓取控件,浏览器便可将上述最小的dom树以及抓取脚本一并发送给解析引擎,解析引擎便可根据id="kfs_family_16"找到该id所在的最小的dom树,再根据class="kfs-price"从该dom树中提取出“价钱:$149.99”这一价格信息。
若抓取脚本中不包含id,只包含class,浏览器根据class便可提取出发送到解析引擎中的所有的最小的dom树中的与class相匹配的网页内容。
当用户点击第二抓取控件后,浏览器便将抓取脚本与网页的网页代码发送给解析引擎。若抓取脚本中包含id和class,解析引擎根据id找到该id所在的最小的dom树,再根据与该id存在于同一个组合中的class,提取出最小的dom树中的用户想要抓取的网页内容。
若抓取脚本中不包含id,只包含class,浏览器根据class便可提取出网页的网页代码中的与class相匹配的网页内容。
需要说明的是,本申请实施例所提供方法的各步骤的执行主体可以相同,也可以不同。例如,在浏览器执行完毕步骤13后,浏览器可以将确定出的网页代码以及HTML属性值发送给服务器,以使得服务器根据所述网页代码,生成抓取脚本。另外,上述只是以PC中安装的浏览器为例的一种示例性说明,本申请实施例的执行主体除了可以是PC中安装的浏览器之外,也可以是PC中安装的其他具有浏览器功能的应用,还可以是移动终端中的具有浏览器功能的APP,本申请对此不进行任何限定。
在本申请实施例中,浏览器在执行步骤12时,具体的,在一种实施方式中,用户一旦开始在网页中进行框选,浏览器便可以开始确认用户框选的网页内容。或者,在用户框选结束后,被框选的目标内容被矩形方框框住,且该网页中会显示出继续框选、提交和取消的控件。其中,被矩形方框框住的目标内容,可以以高亮的显示方式显示,也可以以该网页被显示出来时该目标内容的最初显示方式显示,这可以根据用户需求进行设置,本申请实施例对此不进行任何限定。例如,如图2d所示,图2d中显示的页面便为用户框选想要抓取的某一购物网站中的某一商品的价格信息后所显示出的页面。该页面中的价格信息被一个矩形方框框住,且在价格信息的右侧分别显示出继续框选、提交和取消的控件。其中,被框住的价格信息并未高亮显示,而是以最初显示状态显示。
在网页中出现继续框选、提交和取消的控件后,若用户想要继续框选其他的内容,便可点击继续框选控件,继续框选其他内容。若用户不再想框选其他内容,便可点击提交控件,浏览器便将用户框选的网页内容确定为目标内容。若用户想取消之前框选的内容,框选其他的内容,那么点击取消控件,便可重新框选。
另外,本申请实施例提供的脚本生成方法中,用户在网页中选择想要抓取的网页内容时,可以先进行一次粗略选择,浏览器可以根据用户第一次选择的网页内容确定出该网页内容对应的最小的dom。然后,用户再在第一次选择的网页内容的基础上进行第二次选择,浏览器便可以在确定出的最小的dom中确
定出第二次选择的网页内容对应的网页代码中的HTML属性值。比如,如图2e所示,若用户想要抓取网页中的“¥175”的价格信息,在第一次选定时,用户可以粗略的将包含“¥175”这一价格信息的网页内容一并进行选择,浏览器便可根据该第一次选择的内容,确定出该些网页内容对应的最小的dom树。在用户在第二次选择时,可以只选择“¥175”,那么浏览器便可以在该最小的dom树确定出“¥175”对应的HTML属性值。图2e中有两个矩形方框,其中,较大的矩形方框中的所有内容为用户第一次选择的内容,较小的矩形方框中的网页内容为用户第二次选择的内容。
在本申请实施例中,还可通过一种脚本生成装置,来实现本申请实施例中提供的脚本生成方法。
如图3所示,为本申请实施例提供的一种脚本生成装置的结构示意图,主要包括下述装置:
内容确定模块31,确定用户在显示的网页中选定的网页内容。
代码确定模块32,根据确定的网页内容,确定所述网页内容对应的网页代码。
脚本生成模块33,根据所述网页代码,生成抓取脚本。
在一种实施方式中,所述装置还包括:
第一嵌入模块,在内容确定模块31确定用户在显示的网页中选定的网页内容之前,将预设的第一脚本嵌入到所述网页的网页代码中。其中,所述第一脚本用于提供在所述网页中选定网页内容的功能,所述第一脚本包括层叠样式表CSS脚本。
在一种实施方式中,所述装置还包括:
第二嵌入模块,在代码确定模块32根据确定的网页内容,确定所述网页内容对应的网页代码之前,将预设的第二脚本嵌入到所述网页的网页代码中,所述第二脚本包括JS脚本。
则代码确定模块32,根据确定的网页内容,通过所述第二脚本,确定所述
网页内容对应的网页代码。
在一种实施方式中,代码确定模块32,在所述网页的网页代码中,确定所述网页内容对应的最小的文档对象模型dom树;
在所述最小的dom树中,确定所述网页内容对应的超文本标记语言HTML属性值。
在一种实施方式中,脚本生成模块33,将确定出的所述HTML属性值添加到预设的脚本生成模板中,生成抓取脚本,所述抓取脚本用于抓取与所述HTML属性值相匹配的网页内容。
在一种实施方式中,所述装置还包括:
内容解析模块,将所述抓取脚本以及网页代码发送给解析引擎,通过解析引擎,抓取相应的网页内容。
与现有技术中利用网络爬虫抓取网页内容时,需人工编写抓取脚本相比,采用本申请实施例提供的脚本生成方法,通过确定用户在网页中选定的网页内容,确定出该网页内容对应的网页代码,并根据该网页代码生成抓取脚本,从而解决了现有技术中利用网络爬虫抓取网页内容时,人工编写抓取脚本效率较低的问题。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算
机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排
他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。
Claims (12)
- 一种脚本生成方法,其特征在于,所述方法包括:确定用户在显示的网页中选定的网页内容;根据确定的网页内容,确定所述网页内容对应的网页代码;根据所述网页代码,生成抓取脚本。
- 如权利要求1所述的方法,其特征在于,确定用户在显示的网页中选定的网页内容之前,所述方法还包括:将预设的第一脚本嵌入到所述网页的网页代码中;其中,所述第一脚本用于提供在所述网页中选定网页内容的功能,所述第一脚本包括层叠样式表CSS脚本。
- 如权利要求1所述的方法,其特征在于,根据确定的网页内容,确定所述网页内容对应的网页代码之前,所述方法还包括:将预设的第二脚本嵌入到所述网页的网页代码中,所述第二脚本包括JS脚本;根据确定的网页内容,确定所述网页内容对应的网页代码,具体包括:根据确定的网页内容,通过所述第二脚本,确定所述网页内容对应的网页代码。
- 如权利要求1所述的方法,其特征在于,确定所述网页内容对应的网页代码,具体包括:在所述网页的网页代码中,确定所述网页内容对应的最小的文档对象模型dom树;在所述最小的dom树中,确定所述网页内容对应的超文本标记语言HTML属性值。
- 如权利要求4所述的方法,其特征在于,根据所述网页代码,生成脚 本,具体包括:将确定出的所述HTML属性值添加到预设的脚本生成模板中,生成抓取脚本,所述抓取脚本用于抓取与所述HTML属性值相匹配的网页内容。
- 如权利要求5所述的方法,其特征在于,所述方法还包括:将所述抓取脚本以及网页代码发送给解析引擎,通过解析引擎,抓取相应的网页内容。
- 一种脚本生成装置,其特征在于,所述装置包括:内容确定模块,确定用户在显示的网页中选定的网页内容;代码确定模块,根据确定的网页内容,确定所述网页内容对应的网页代码;脚本生成模块,根据所述网页代码,生成抓取脚本。
- 如权利要求7所述的装置,其特征在于,所述装置还包括:第一嵌入模块,在内容确定模块确定用户在显示的网页中选定的网页内容之前,将预设的第一脚本嵌入到所述网页的网页代码中;其中,所述第一脚本用于提供在所述网页中选定网页内容的功能,所述第一脚本包括层叠样式表CSS脚本。
- 如权利要求7所述的装置,其特征在于,所述装置还包括:第二嵌入模块,在代码确定模块根据确定的网页内容,确定所述网页内容对应的网页代码之前,将预设的第二脚本嵌入到所述网页的网页代码中,所述第二脚本包括JS脚本;则代码确定模块,根据确定的网页内容,通过所述第二脚本,确定所述网页内容对应的网页代码。
- 如权利要求7所述的装置,其特征在于,代码确定模块,在所述网页的网页代码中,确定所述网页内容对应的最小的文档对象模型dom树;在所述最小的dom树中,确定所述网页内容对应的超文本标记语言HTML属性值。
- 如权利要求10所述的装置,其特征在于,脚本生成模块,将确定出 的所述HTML属性值添加到预设的脚本生成模板中,生成抓取脚本,所述抓取脚本用于抓取与所述HTML属性值相匹配的网页内容。
- 如权利要求11所述的装置,其特征在于,所述装置还包括:内容解析模块,将所述抓取脚本以及网页代码发送给解析引擎,通过解析引擎,抓取相应的网页内容。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610551151.5 | 2016-07-13 | ||
| CN201610551151.5A CN106886547A (zh) | 2016-07-13 | 2016-07-13 | 一种脚本生成方法与装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018010573A1 true WO2018010573A1 (zh) | 2018-01-18 |
Family
ID=59176754
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/091674 Ceased WO2018010573A1 (zh) | 2016-07-13 | 2017-07-04 | 一种脚本生成方法与装置 |
Country Status (3)
| Country | Link |
|---|---|
| CN (1) | CN106886547A (zh) |
| TW (1) | TWI683225B (zh) |
| WO (1) | WO2018010573A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111460259A (zh) * | 2020-03-31 | 2020-07-28 | 腾讯科技(深圳)有限公司 | 一种同类元素确定方法、装置、计算机设备及存储介质 |
| WO2020253366A1 (zh) * | 2019-06-17 | 2020-12-24 | 深圳壹账通智能科技有限公司 | 网页邮箱数据的爬取方法、装置、终端和存储介质 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106886547A (zh) * | 2016-07-13 | 2017-06-23 | 阿里巴巴集团控股有限公司 | 一种脚本生成方法与装置 |
| CN107689951A (zh) * | 2017-07-26 | 2018-02-13 | 上海壹账通金融科技有限公司 | 网页数据爬取方法、装置、用户终端及可读存储介质 |
| CN107609150A (zh) * | 2017-08-28 | 2018-01-19 | 湖北省楚天云有限公司 | 一种基于页面元素选取的交互式网络爬虫创建方法及系统 |
| CN113742550B (zh) * | 2021-08-20 | 2024-04-19 | 广州市易工品科技有限公司 | 基于浏览器的数据获取方法、装置和系统 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101894138A (zh) * | 2010-06-25 | 2010-11-24 | 优视科技有限公司 | 可视化页面内容订阅处理方法及系统 |
| CN105243159A (zh) * | 2015-10-28 | 2016-01-13 | 福建亿榕信息技术有限公司 | 一种基于可视化脚本编辑器的分布式网络爬虫系统 |
| CN105468730A (zh) * | 2015-11-20 | 2016-04-06 | 广州华多网络科技有限公司 | 一种网页信息提取方法及其设备 |
| CN106886547A (zh) * | 2016-07-13 | 2017-06-23 | 阿里巴巴集团控股有限公司 | 一种脚本生成方法与装置 |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EA201301239A1 (ru) * | 2013-10-28 | 2015-04-30 | Общество С Ограниченной Ответственностью "Параллелз" | Способ размещения сетевого сайта с использованием виртуального хостинга |
-
2016
- 2016-07-13 CN CN201610551151.5A patent/CN106886547A/zh active Pending
-
2017
- 2017-06-08 TW TW106119133A patent/TWI683225B/zh not_active IP Right Cessation
- 2017-07-04 WO PCT/CN2017/091674 patent/WO2018010573A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101894138A (zh) * | 2010-06-25 | 2010-11-24 | 优视科技有限公司 | 可视化页面内容订阅处理方法及系统 |
| CN105243159A (zh) * | 2015-10-28 | 2016-01-13 | 福建亿榕信息技术有限公司 | 一种基于可视化脚本编辑器的分布式网络爬虫系统 |
| CN105468730A (zh) * | 2015-11-20 | 2016-04-06 | 广州华多网络科技有限公司 | 一种网页信息提取方法及其设备 |
| CN106886547A (zh) * | 2016-07-13 | 2017-06-23 | 阿里巴巴集团控股有限公司 | 一种脚本生成方法与装置 |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2020253366A1 (zh) * | 2019-06-17 | 2020-12-24 | 深圳壹账通智能科技有限公司 | 网页邮箱数据的爬取方法、装置、终端和存储介质 |
| CN111460259A (zh) * | 2020-03-31 | 2020-07-28 | 腾讯科技(深圳)有限公司 | 一种同类元素确定方法、装置、计算机设备及存储介质 |
| CN111460259B (zh) * | 2020-03-31 | 2023-04-14 | 腾讯科技(深圳)有限公司 | 一种同类元素确定方法、装置、计算机设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| TW201804340A (zh) | 2018-02-01 |
| CN106886547A (zh) | 2017-06-23 |
| TWI683225B (zh) | 2020-01-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018010573A1 (zh) | 一种脚本生成方法与装置 | |
| CN110069683B (zh) | 一种基于浏览器爬取数据的方法及装置 | |
| US20120317486A1 (en) | Embedded web viewer for presentation applications | |
| CN104714982A (zh) | 一种网页的加载方法和系统 | |
| WO2017124952A1 (zh) | 一种网页脚本加载方法和装置 | |
| CN106484383A (zh) | 页面渲染方法、装置及设备 | |
| TW201723897A (zh) | 資訊顯示方法、裝置及智能終端 | |
| US9967370B2 (en) | OData enabled mobile software applications | |
| US11562037B2 (en) | Crawlability of single page applications | |
| US11720407B2 (en) | Resource pre-fetch using age threshold | |
| EP4180951B1 (en) | Generating lossless static object models of dynamic webpages | |
| CN108228181A (zh) | 在html页面中嵌入html页面的方法及装置 | |
| TWI539302B (zh) | 用於網路服務的延後資源當地語系化連結 | |
| CN110619103A (zh) | 网页图文检测方法、装置及存储介质 | |
| CN106648821B (zh) | 一种网页优化方法及装置 | |
| CN106886398A (zh) | 一种层叠样式表的提取方法和设备 | |
| CN104239325B (zh) | 区块定位方法和装置 | |
| WO2016050124A1 (zh) | 网页转码方法、装置以及服务器 | |
| US10846361B2 (en) | User-specific customization of web pages | |
| US20150169567A1 (en) | Search result image display environment and background | |
| US11151216B2 (en) | Caching of a site model in a hierarchical modeling system for network sites | |
| KR20240090928A (ko) | 인공 지능 기반 통합 프레임워크 | |
| US11003728B1 (en) | Native application search results | |
| CN117421503A (zh) | 页面渲染方法、装置、计算机设备和存储介质 | |
| CN112667934A (zh) | 动态模拟图展示方法、装置、电子设备和计算机可读介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17826910 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17826910 Country of ref document: EP Kind code of ref document: A1 |