API description - Download gsExtractor content extractor
1, interface name
Download content extractor
2, interface description
If you want to write a web crawler program, you will find that most of the time is spent debugging web pages In terms of content extraction rules, regardless of how weird the syntax of regular expressions is, even if you use XPath, you have to write and debug them one by one.
If you want to extract many fields from a web page, debugging XPath one by one will be very time-consuming. Through this interface, you can directly obtain a debugged extractor script program, which is a standard XSLT program. You only need to run it against the DOM of the target web page to obtain the results in XML format, with all fields obtained at once.
This XSLT extractor can be generated by you using MS software, or it can be shared with you by others. As long as you have read permission, you can download and use it.
In web crawler programs used for data analysis and data mining, the content extractor is a key obstacle to universality. If this extractor is obtained from the API, your web crawler program can be written as a universal framework.
3, Interface specification
3.1, Interface address (URL)
http://www.gooseeker.com/api/getextractor
3.2, Request type (contentType)
No limit
3.3, Request method
HTTP GET
3.4, request parameter
key Required: Yes; Type: String; Description: AppKey assigned when applying for API
theme Required: Yes; Type: String; Description: Extractor name, which is used The rule name defined by MS Mooshutai
middle Required: No; Type: String; Description: Rule number. If multiple rules are defined under the same rule name, you need to fill in
bname Required: No; Type: String; Description: Sorting box name. If the rule contains multiple sorting boxes, you need to fill in
3.5, return type (contentType)
text/xml; charset=UTF-8
3.6, return parameters
Parameters in the HTTP message header , as follows:
more-extractor Type: String; Description: How many extractors are there under the same rule name. Usually you only need to pay attention to this parameter when the optional parameters are not filled in to remind the client that there are multiple rules and sorting boxes. The client decides whether to carry clear parameters when sending the request
3.7 and return an error message
Message layer errors are returned with HTTP 400. For example, the parameters in the URL do not comply with this specification.
Application layer errors are returned with HTTP 200 OK. The specific error code is placed in the message body in an XML file. The XML structure is as follows:
<return> <code>具体的错误码</code> </return>
Specific The code value is as follows: keyError: Permission verification failed
keyError:权限验证失败 paramError:URL中传来的参数有误,比如,参数名称或值不正确
4, usage example (python language)
Sample code:
# -*- coding: utf-8 -*- from urllib import request url = 'http://www.gooseeker.com/api/getextractor?key=您的key&theme=您的提取器名' resp = request.urlopen(url) content = resp.read() if(content): print(content)
Next I will test this API

To maximize the efficiency of learning Python in a limited time, you can use Python's datetime, time, and schedule modules. 1. The datetime module is used to record and plan learning time. 2. The time module helps to set study and rest time. 3. The schedule module automatically arranges weekly learning tasks.

Python excels in gaming and GUI development. 1) Game development uses Pygame, providing drawing, audio and other functions, which are suitable for creating 2D games. 2) GUI development can choose Tkinter or PyQt. Tkinter is simple and easy to use, PyQt has rich functions and is suitable for professional development.

Python is suitable for data science, web development and automation tasks, while C is suitable for system programming, game development and embedded systems. Python is known for its simplicity and powerful ecosystem, while C is known for its high performance and underlying control capabilities.

You can learn basic programming concepts and skills of Python within 2 hours. 1. Learn variables and data types, 2. Master control flow (conditional statements and loops), 3. Understand the definition and use of functions, 4. Quickly get started with Python programming through simple examples and code snippets.

Python is widely used in the fields of web development, data science, machine learning, automation and scripting. 1) In web development, Django and Flask frameworks simplify the development process. 2) In the fields of data science and machine learning, NumPy, Pandas, Scikit-learn and TensorFlow libraries provide strong support. 3) In terms of automation and scripting, Python is suitable for tasks such as automated testing and system management.

You can learn the basics of Python within two hours. 1. Learn variables and data types, 2. Master control structures such as if statements and loops, 3. Understand the definition and use of functions. These will help you start writing simple Python programs.

How to teach computer novice programming basics within 10 hours? If you only have 10 hours to teach computer novice some programming knowledge, what would you choose to teach...

How to avoid being detected when using FiddlerEverywhere for man-in-the-middle readings When you use FiddlerEverywhere...


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

SublimeText3 Linux new version
SublimeText3 Linux latest version