Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AI4Finance Foundation FinGPT AntiBot HTTP Requests

From Leeroopedia
Knowledge Sources
Domains Web_Scraping, Anti_Bot_Evasion, RAG
Last Updated 2026-10-18 00:00 GMT

Overview

Concrete tool for making anti-bot-protected HTTP requests with ZenRows JS rendering and randomized headers provided by the FinGPT RAG multisource_retrieval subproject.

Description

The requests_url module provides `requests_get` which uses ZenRowsClient with JS rendering and antibot bypass, randomized user agents, random sleep delays (1-5s), and session-based requests. A `requests_get_for_seeking_alpha` variant adds site-specific referer headers for Seeking Alpha scraping.

Usage

Import `requests_get` when you need to fetch pages from financial news sites that have anti-bot protections. Requires a ZenRows API key.

Code Reference

Source Location

Signature

def requests_get(url, proxy=None):
    """Fetch a URL with ZenRows anti-bot bypass and randomized headers.

    Args:
        url: target URL
        proxy: optional proxy (unused in current implementation)

    Returns:
        requests.Response or None on error
    """

def requests_get_for_seeking_alpha(url, subject):
    """Fetch a Seeking Alpha search URL with site-specific headers."""

Import

from requests_url import requests_get, requests_get_for_seeking_alpha

I/O Contract

Inputs

Name Type Required Description
url str Yes Target URL to fetch
proxy str No Optional proxy (unused currently)
subject str Yes (SA) Search subject for Seeking Alpha variant

Outputs

Name Type Description
response None HTTP response or None on error

Usage Examples

Fetch a Protected Page

from requests_url import requests_get

response = requests_get("https://seekingalpha.com/symbol/AAPL/news")
if response and response.status_code == 200:
    print(response.text[:500])

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment