Gherila
raw JSON → 1.1.9 verified Sat May 09 auth: no python
An async Python package designed to fetch information from different platforms (e.g., Discord, Telegram, Twitter, GitHub). Current version 1.1.9, with monthly releases. Intended for web scraping and social media data extraction.
pip install gherila Common errors
error ModuleNotFoundError: No module named 'gherila.scrape' ↓
cause The scrape submodule was removed in v1.1.0.
fix
Install gherila >=1.1.0 and use
from gherila import fetch. error AttributeError: module 'gherila' has no attribute 'fetch_sync' ↓
cause The synchronous fetch_sync function was removed in v1.1.0.
fix
Use async
fetch function: await gherila.fetch(...). error TypeError: fetch() missing 1 required positional argument: 'url' ↓
cause The url parameter must be provided as a positional argument, not keyword.
fix
Call
await fetch('https://example.com') or await fetch(url='https://example.com'). Warnings
deprecated The synchronous `fetch_sync` function is removed in v1.1.0+. Use async `fetch` only. ↓
fix Convert code to async/await pattern.
gotcha `fetch` does not support custom headers by default; pass headers as a dict to `Session`. ↓
fix Initialize `Session(headers={'User-Agent': '...'})` and use `session.fetch()`.
breaking The `gherila.scrape` module was removed in v1.1.0. Use `gherila.fetch` instead. ↓
fix Replace `from gherila.scrape import ...` with `from gherila import fetch`.
Imports
- fetch wrong
import gherilacorrectfrom gherila import fetch - Session
from gherila import Session
Quickstart
import asyncio
from gherila import fetch
async def main():
data = await fetch('https://api.github.com/repos/br4nch/gherila')
print(data)
asyncio.run(main())