A free, MIT-licensed Python web scraping starter: scrape a list page to CSV or JSON with requests + BeautifulSoup and CSS selectors, with robots.txt checks, rate limiting and retries built in — plus a Telegram auto-reply bot (python-telegram-bot v21). Includes 10 step-by-step guides.
Two small, working building blocks for automation jobs:
telegram_autoreply/— Telegram bot that answers by keyword rules from a YAML file (/reloadwithout restart). python-telegram-bot v21.scraper/— polite list scraper: robots.txt check, rate limiting, retries with backoff, CSV/JSON export, CSS selectors in a JSON config.
cd scraper
pip install -r requirements.txt
python static_list_scraper.py https://quotes.toscrape.com/ -c configs/quotes.json -o quotes.csvSet a real --user-agent with your contact info, and only scrape sites whose terms allow it. Run with -h for all options.
Config format:
{ "item": "div.quote",
"fields": { "text": "span.text", "author": "small.author", "author_url": "span a@href" } }cd telegram_autoreply
pip install -r requirements.txt
cp .env.example .env # put your BotFather token here, never commit .env
python bot.pyEdit rules.yaml to change replies, then send /reload to the bot.
The same CSS-selector extraction is available as a hosted API (free tier: 100 requests/month): Scrape to JSON on RapidAPI — https://rapidapi.com/%EA%B0%95%EC%A0%95%EC%8B%9D/api/scrape-to-json1
This repo is 2 of 15 blocks. The Automation Script Pack adds:
- Telegram group moderator, Discord auto-reply and moderation bots (discord.js v14), Telegram → Discord bridge
- Paginated scraper, Selenium headless scraper, RSS collector, pandas data cleaner
- OpenAPI 3.1 spec + Postman collection with tests
👉 $39 — https://raxsoft.gumroad.com/l/fkits
Need something built for your stack? Open an issue or email raxsoft@gmail.com.
MIT for the code in this repository (see LICENSE).