Grab: A Powerful Python Web Scraping Framework
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Grab is a robust Python web scraping framework designed to simplify complex data extraction tasks. It provides comprehensive tools for handling network requests, processing scraped content, and managing asynchronous operations through its powerful Spider component. Developers can leverage features like automatic cookie support, HTTP/SOCKS proxies, and XPath queries for efficient web data collection.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Grab is a powerful Python web scraping framework designed to streamline the process of making network requests, scraping websites, and processing the extracted content. It offers a rich set of features including automatic cookie management, support for HTTP and SOCKS proxies, and robust tools for interacting with web forms. For advanced asynchronous scraping, Grab includes its Spider component, enabling efficient parallel processing of thousands of queries.
Recently, the Grab project underwent a significant update to ensure compatibility across a wide range of Python versions, from 2.7 up to 3.13. This update, culminating in version 1.0, focuses on stability and modern Python support, making Grab a reliable choice for current development. Please note a backward-incompatible change: DataNotFound and InvalidResponseError exceptions are now located in grab.errors instead of weblib.error.
Installation
Installing Grab is straightforward. You can get started by running the following command:
pip install -U grab
For more detailed instructions and platform-specific guidance, please refer to the official documentation: https://grab.readthedocs.io/en/stable/usage/installation.html
Examples
Grab Example
Here’s a basic example demonstrating how to use Grab to log into a GitHub account and list repositories:
import logging
from grab import Grab
logging.basicConfig(level=logging.DEBUG)
g = Grab()
g.go('https://github.com/login')
g.doc.set_input('login', '****')
g.doc.set_input('password', '****')
g.doc.submit()
g.doc.save('/tmp/x.html')
g.doc('//ul[@id="user-links"]//button[contains(@class, "signout")]').assert_exists()
home_url = g.doc('//a[contains(@class, "header-nav-link name")]/@href').text()
repo_url = home_url + '?tab=repositories'
g.go(repo_url)
for elem in g.doc.select('//h3[@class="repo-list-name"]/a'):
print('%s: %s' % (elem.text(),
g.make_url_absolute(elem.attr('href'))))
Grab::Spider Example
For asynchronous scraping, Grab's Spider component allows you to define tasks and process them in parallel:
import logging
from grab.spider import Spider, Task
logging.basicConfig(level=logging.DEBUG)
class ExampleSpider(Spider):
def task_generator(self):
for lang in 'python', 'ruby', 'perl':
url = 'https://www.google.com/search?q=%s' % lang
yield Task('search', url=url, lang=lang)
def task_search(self, grab, task):
print('%s: %s' % (task.lang,
grab.doc('//div[@class="s"]//cite').text()))
bot = ExampleSpider(thread_number=2)
bot.run()
Why Use Grab?
Grab stands out as a versatile web scraping framework due to its comprehensive feature set and robust architecture. It provides:
- Full-featured HTTP Client: Handles cookies, proxies (HTTP/SOCKS), Keep-Alive, and IDN support automatically.
- Powerful Data Extraction: Utilizes XPath queries for precise and efficient data extraction from HTML documents.
- Asynchronous Capabilities: The integrated Spider framework allows for high-performance, parallel scraping, automatically managing network errors and task queues.
- Web Form Interaction: Simplifies working with web forms, including easy multipart file uploads.
- Active Maintenance: Recently updated to support modern Python versions (2.7 to 3.13), ensuring ongoing compatibility and stability.
- Community Support: Access to Telegram chat groups for discussions and assistance.
Links
- GitHub Repository: https://github.com/lorien/grab
- Official Documentation: https://grab.readthedocs.io/en/stable/
- Telegram Chat (English): https://t.me/grablab
- Telegram Chat (Russian): https://t.me/grablab_ru
Related repositories
Similar repositories that may be relevant next.

oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory
September 17, 2026
oh-my-hermes is an all-in-one plugin designed to significantly enhance the Hermes Agent. It provides advanced coding intelligence, a robust long-term memory system, and optimized workflow packages, transforming standard Hermes requests into structured, actionable tasks with clear operational layers.
ASC: A Super Fast Android Decompiler for Mobile Reverse Engineering
September 17, 2026
ASC is an innovative and exceptionally fast Android decompiler front-end, specifically designed for mobile researchers and agents. It redefines traditional decompilation by directly querying compiled artifacts, offering on-demand code extraction and analysis without heavy preprocessing. This approach results in significantly reduced memory usage and lightning-fast performance, even on large APKs.

Open Index: A Deterministic Memory Layer for Your AI Agents
September 16, 2026
Open Index is a powerful tool for building domain-specific, accurate, and structured data that AI agents can effectively operate on. It enables the creation of a "brain," a searchable and continuously improving context graph tailored to any domain. This system ensures agents have access to reliable, up-to-date information, enhancing their capabilities and decision-making processes.
tooltrim: Drastically Reduce LLM Agent Tool Output Tokens, Improve Accuracy
September 16, 2026
tooltrim provides drop-in compression for LLM agent tool outputs, drastically cutting tokens while often improving answer accuracy. This provider-agnostic solution offers content-aware compression, faithfulness benchmarks, and seamless integration with popular frameworks or as an OpenAI-compatible proxy.
Source repository
Open the original repository on GitHub.
14 counted GitHub visits