Python crawler Combat (1): Crawl a list of Drupal forum posts

Source: Internet
Author: User
Tags xslt drupal python web crawler

1, Introduction

in the the Python Instant web crawler project: Definition of content extractor we've defined a generic Python web crawler that expects to save more than half the programmer's time through this project. This article will use an example to explain how to use this reptile. We will crawl collection of old forum, is a use Drupal forum.

2, Technical points

we are saying in multiple articles: Save the programmer time. The key is to omit the time to write the extraction rules, especially the correctness of the debugging rules takes time. quickly generate XSLT for Web content extraction in 1 minutes "demonstrates how to quickly generate extraction rules, and then we get the extraction rules in real time through the API interface of Gooseeker and crawl the Web pages." This example has the following two key technical points:

    • Real-time access to XSLT for page extraction via the Gooseeker API
    • Use the Gooseeker extractor gsextractor to extract multiple field contents at once from a Web page.


3,python Source Code

Source code download location see GitHub Source at the end of the article.

4, crawl results

Run the code of the previous section, you can print out the extract results in the console, is an XML file, if you add a newline indent, the content such as:


5, related documents
1, Python instant web crawler project: Definition of content extractor

6, set search Gooseeker source code Download
1,gooseeker Open Source python web crawler github source

7, Document modification history
1, 2016-06-07:v1.0
2,2016-06-07:v2.0
3,2016-06-07:v2.1, add github download source

Python crawler Combat (1): Crawl a list of Drupal forum posts

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.