skip to navigation
skip to content

grab 0.6.30

Web Scraping Framework

Package Documentation


What is Grab?

Grab is a python web scraping framework. Grab provides tons of helpful methods to scrape web sites and to process the scraped content:

  • Automatic cookies (session) support
  • HTTP and SOCKS proxy with and without authorization
  • Keep-Alive support
  • IDN support
  • Tools to work with web forms
  • Easy multipart file uploading
  • Flexible customization of HTTP requests
  • Automatic charset detection
  • Powerful API of extracting info from HTML documents with XPATH queries
  • Asynchronous API to make thousands of simultaneous queries. This part of library called Spider and it is too big to even list its features in this README.
  • Python 3 ready

Grab Example

from grab import Grab
import logging

g = Grab()
g.set_input('login', '***')
g.set_input('password', '***')

g.doc('//span[contains(@class, "octicon-sign-out")]').assert_exists()
home_url = g.doc('//a[contains(@class, "header-nav-link name")]/@href').text()
repo_url = home_url + '?tab=repositories'

for elem in'//h3[@class="repo-list-name"]/a'):
    print('%s: %s' % (elem.text(),

Grab::Spider Example

from grab.spider import Spider, Task
import logging

class ExampleSpider(Spider):
    def task_generator(self):
        for lang in ('python', 'ruby', 'perl'):
            url = '' % lang
            yield Task('search', url=url, lang=lang)

    def task_search(self, grab, task):
        print('%s: %s' % (task.lang,

bot = ExampleSpider()


Pip is recommended way to install Grab and its dependencies:

$ pip install -U grab

See details here

Documentation and Help


English mailing list:

Russian mailing list:


To report a bug please use github issue tracker:

If you want to develop new feature in Grab please use issue tracker to describe what you want to do or contact me at

File Type Py Version Uploaded on Size
grab-0.6.30.tar.gz (md5) Source 2015-11-22 93KB
  • Downloads (All Versions):
  • 327 downloads in the last day
  • 2786 downloads in the last week
  • 11609 downloads in the last month