Skip to main content

Smart web page content extractor.

Project description

Constractor (derived from “Content Extractor’) allows one to use machine learning for web pages content extraction. Library provide following functionality:

  • Extendable features api.
  • Gui tools for simple train-set creation.
  • Simple training and testing process.
  • Simple usage of trained model.
  • Models dumping.
  • etc


NOTE: Project was developed and tested under Ubuntu 12.04. Other operation systems may require enhancements of library.

Ubuntu >=12.04 instructions:

  • Install apt dependecies: sudo apt-get install pip gcc g++ python-dev python-qt4
  • Install constractor: sudo pip install constractor


Following code will run gui train helper:

#!/usr/bin/env python
from constractor.train import GuiTrainer

if __name__ == '__main__':

And following code will print html of predicted element in DOM:

#!/usr/bin/env python
from constractor.parser import Parser

if __name__ == '__main__':
    predicted = Parser('', model_file='model.txt').predicted
    for element in predicted:
        print unicode(element.toInnerXml()).encode('utf-8')


Project is completely open for contribution. See more on bitbucket repo:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for constractor, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size constractor-0.1.0.tar.gz (10.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page