Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ScrapeGraphAI/Scrapegraph-ai
/ functions
Functions
904 in github.com/ScrapeGraphAI/Scrapegraph-ai
⨍
Functions
904
◇
Types & classes
195
↳
Endpoints
27
Method
handle_file
Loads the content of a file based on its input type. Parameters: state (dict): The current state of the graph. input
scrapegraphai/nodes/fetch_node.py:145
Method
info
(self, msg)
tests/test_batch_api.py:332
Method
launch
(headless, proxy, **kwargs)
tests/test_chromium.py:277
Method
lazy_load
Yield Documents one at a time, fetching each URL synchronously.
scrapegraphai/docloaders/plasmate.py:157
Method
load
(self)
tests/test_fetch_node_timeout.py:170
Function
load_test_fixture
Load a test fixture file. Args: fixture_name: Name of the fixture file fixture_dir: Directory containing fixtures (defaults to te
tests/fixtures/helpers.py:252
Function
loader_with_dummy
Fixture returning a ChromiumLoader instance with dummy scraping methods patched.
tests/test_chromium.py:62
Method
log_message
Suppress default logging.
tests/fixtures/mock_server/server.py:26
Function
mixed_scraper
(url)
tests/test_chromium.py:1130
Function
mock_embedder_model
Mock embedder model for unit testing.
tests/conftest.py:180
Method
mock_embedder_model
(self)
tests/test_json_scraper_graph.py:15
Function
mock_llm_model
Mock LLM model for unit testing.
tests/conftest.py:170
Function
mock_llm_model
()
tests/nodes/robot_node_test.py:9
Method
mock_llm_model
(self)
tests/test_json_scraper_graph.py:11
Function
mock_playwright
()
tests/test_chromium.py:40
Function
mock_server
Start a mock HTTP server for testing.
tests/conftest.py:338
Function
mock_server_url
Get the base URL for the mock server.
tests/conftest.py:349
Function
mock_website_url
URL for the mock test website.
tests/conftest.py:355
Function
models_tokens
Import models_tokens directly to avoid triggering the full package init.
tests/test_minimax_models.py:11
Function
multi_llm_config
Parametrized fixture that tests against multiple LLM providers.
tests/conftest.py:159
Function
num_tokens_mistral
Estimate the number of tokens in a given text using Mistral's tokenization method, adjusted for different Mistral models. Args:
scrapegraphai/utils/tokenizers/tokenizer_mistral.py:10
Function
num_tokens_ollama
Estimate the number of tokens in a given text using Ollama's tokenization method, adjusted for different Ollama models. Args: te
scrapegraphai/utils/tokenizers/tokenizer_ollama.py:10
Function
num_tokens_openai
Estimate the number of tokens in a given text using OpenAI's tokenization method, adjusted for different OpenAI models. Args: te
scrapegraphai/utils/tokenizers/tokenizer_openai.py:10
Function
ollama_config
Ollama configuration for testing.
tests/conftest.py:79
Method
on_llm_end
Collect token usage.
scrapegraphai/utils/custom_callback.py:81
Method
on_llm_new_token
Print out the token.
scrapegraphai/utils/custom_callback.py:77
Method
on_llm_start
Print out the prompts.
scrapegraphai/utils/custom_callback.py:71
Function
openai_config
OpenAI configuration for testing.
tests/conftest.py:49
Function
openai_gpt4_config
OpenAI GPT-4 configuration for testing.
tests/conftest.py:64
Method
page_source
(self)
tests/test_chromium.py:538
Function
partial_scraper
(url)
tests/test_chromium.py:356
Function
performance_tracker
Track performance metrics across tests.
tests/conftest.py:322
Method
post_run_step
(self, *, state: "State", action: "Action", **future_kwargs: Any)
scrapegraphai/integrations/burr_bridge.py:41
Method
pre_run_step
(self, *, state: "State", action: "Action", **future_kwargs: Any)
scrapegraphai/integrations/burr_bridge.py:38
Method
process_links
Processes a list of links recursively up to a given depth. Args: base_url (str): The base URL for resolving relative lin
scrapegraphai/nodes/fetch_node_level_k.py:275
Function
pytest_addoption
Add custom command line options.
tests/conftest.py:415
Function
pytest_benchmark_compare
Compare current benchmark results against a baseline. Args: baseline_file: Path to baseline results JSON current_file: Path to cu
tests/fixtures/benchmarking.py:234
Function
pytest_collection_modifyitems
Modify test collection based on markers and CLI options.
tests/conftest.py:388
Function
pytest_configure
Register custom markers.
tests/conftest.py:369
Function
rate_limited
Decorator to limit the rate of function calls. Args: calls (int): Maximum number of calls allowed in the period. period (int
scrapegraphai/utils/research_web.py:92
Method
reads
(self)
scrapegraphai/integrations/burr_bridge.py:57
Method
record_request
Record a new request.
tests/fixtures/helpers.py:374
Function
retry_with_backoff
Retry a function with exponential backoff. Args: func: Function to retry max_retries: Maximum number of retry attempts in
tests/fixtures/helpers.py:386
Function
robots_node
(mock_llm_model)
tests/nodes/robot_node_test.py:17
Method
run
(self)
scrapegraphai/graphs/smart_scraper_multi_batch_graph.py:70
Method
run
Executes the full batch scraping pipeline. This will: 1. Fetch and parse all URLs concurrently 2. Submit all LLM prompts as a
scrapegraphai/graphs/smart_scraper_multi_batch_graph.py:202
Method
run
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/json_scraper_multi_graph.py:93
Method
run
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/smart_scraper_multi_concat_graph.py:117
Method
run
Abstract method to execute the graph and return the result.
scrapegraphai/graphs/abstract_graph.py:323
Method
run
Executes the scraping process and returns the scraping content. Returns: str: The scraping content.
scrapegraphai/graphs/smart_scraper_lite_graph.py:92
Method
run
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/document_scraper_multi_graph.py:93
Method
run
Executes the scraping process and returns the answer to the prompt. Returns: str: The answer to the prompt.
scrapegraphai/graphs/document_scraper_graph.py:103
Method
run
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/xml_scraper_multi_graph.py:91
Method
run
Runs the image-to-text conversion using the provided image URL. Args: image_url (str): The URL of the image to convert.
scrapegraphai/models/openai_itt.py:23
Method
run
Converts the provided text to speech and returns the bytes of the generated speech. Args: text (str): The text to conver
scrapegraphai/models/openai_tts.py:28
Function
sample_csv
Sample CSV content for testing.
tests/conftest.py:261
Function
sample_html
Sample HTML content for testing.
tests/conftest.py:194
Function
sample_json_data
Sample JSON data for testing.
tests/conftest.py:226
Function
sample_text
Example of text fixture.
tests/graphs/scrape_plain_text_mistral_test.py:13
Function
sample_xml
Sample XML content for testing.
tests/conftest.py:241
Function
sample_xml
Example of text
tests/graphs/scrape_xml_ollama_test.py:13
Function
save_test_output
Save test output to a file for debugging. Args: content: Content to save filename: Output filename output_dir: Output dir
tests/fixtures/helpers.py:269
Function
scrape
Call the scrapegraph-py scrape endpoint across SDK versions.
scrapegraphai/integrations/scrapegraph_py_compat.py:80
Function
search
Call the scrapegraph-py search endpoint across SDK versions.
scrapegraphai/integrations/scrapegraph_py_compat.py:96
Function
select_area_with_ipywidget
Allows you to manually select an image area using ipywidgets. It is recommended to use this function if your project is in Google Colab,
scrapegraphai/utils/screenshot_scraping/screenshot_preparation.py:137
Function
setDEFAULT_HANDLER
Add the default handler to the root logger for the library.
scrapegraphai/utils/logging.py:150
Method
setUp
Set up test fixtures.
tests/test_fetch_node_timeout.py:23
Method
setUp
(self)
tests/nodes/search_internet_node_test.py:9
Function
set_api_key_env
(monkeypatch)
tests/test_script_creator_multi_graph.py:12
Function
set_formatting
Set formatting for all handlers bound to the root logger for the library. The formatting is set to: "[levelname|filename:lineno] time >> mes
scrapegraphai/utils/logging.py:192
Function
set_propagation
Enable propagation of the root logger for the library.
scrapegraphai/utils/logging.py:178
Function
set_verbosity_debug
Set the verbosity level of the root logger for the library to DEBUG.
scrapegraphai/utils/logging.py:101
Function
set_verbosity_error
Set the verbosity level of the root logger for the library to ERROR.
scrapegraphai/utils/logging.py:122
Function
set_verbosity_fatal
Set the verbosity level of the root logger for the library to FATAL.
scrapegraphai/utils/logging.py:129
Function
setup
Setup the SearchLinkNode and initial state for testing.
tests/nodes/search_link_node_test.py:10
Method
tearDown
Clean up after tests.
tests/test_fetch_node_timeout.py:57
Function
temp_csv_file
Create a temporary CSV file for testing.
tests/conftest.py:299
Function
temp_html_file
Create a temporary HTML file for testing.
tests/conftest.py:283
Function
temp_json_file
Create a temporary JSON file for testing.
tests/conftest.py:275
Function
temp_xml_file
Create a temporary XML file for testing.
tests/conftest.py:291
Function
test_alazy_load
Test that alazy_load asynchronously yields Document objects with dummy content and proper metadata.
tests/test_chromium.py:83
Function
test_alazy_load_concurrency
Test that alazy_load runs tasks concurrently by measuring elapsed time. Each dummy task sleeps for 0.5 seconds. If run sequentially the total time
tests/test_chromium.py:1877
Function
test_alazy_load_empty_urls
Test that alazy_load yields no documents when the urls list is empty.
tests/test_chromium.py:486
Function
test_alazy_load_empty_urls
(mock_which)
tests/test_plasmate.py:269
Function
test_alazy_load_mixed_none_and_content
Test that alazy_load yields Document objects in order when one scraper returns None and the other valid HTML.
tests/test_chromium.py:1125
Function
test_alazy_load_non_iterable_urls
Test that alazy_load raises TypeError when urls is not an iterable (e.g., integer).
tests/test_chromium.py:1987
Function
test_alazy_load_non_string_scraper
Test that alazy_load yields Document objects with a non‐string page_content when the JS scraping function returns a non‐string value.
tests/test_chromium.py:1485
Function
test_alazy_load_order
Test that alazy_load returns documents in the same order as the input URLs even if scraping tasks complete out of order.
tests/test_chromium.py:942
Function
test_alazy_load_partial_failure
Test that alazy_load propagates an exception if one of the scraping tasks fails.
tests/test_chromium.py:351
Function
test_alazy_load_selenium_backend
Test that alazy_load correctly yields Document objects when using selenium backend.
tests/test_chromium.py:1212
Function
test_alazy_load_skips_empty
(mock_run, mock_which)
tests/test_plasmate.py:246
Function
test_alazy_load_with_single_url_string
Test that alazy_load yields Document objects when urls is a string (iterating over characters).
tests/test_chromium.py:1937
Function
test_alazy_load_yields_documents
(mock_run, mock_which)
tests/test_plasmate.py:227
Method
test_append_node
Test that append_node correctly delegates to the graph's append_node method.
tests/graphs/abstract_graph_test.py:294
Function
test_ascrape_playwright_browser_config
Test that ascrape_playwright passes extra browser_config kwargs to the browser launch.
tests/test_chromium.py:804
Function
test_ascrape_playwright_calls_apply_stealth
Test that ascrape_playwright calls Malenia.apply_stealth on the browser context.
tests/test_chromium.py:1405
Function
test_ascrape_playwright_caplog
Test that ascrape_playwright recovers on failure and that error messages are logged. This test simulates one failed attempt (via a Timeout) a
tests/test_chromium.py:2002
Function
test_ascrape_playwright_negative_retry
Test that ascrape_playwright returns None when retry_limit is negative (loop not executed).
tests/test_chromium.py:672
Function
test_ascrape_playwright_retry_failure
Test that ascrape_playwright retries scraping and raises RuntimeError after all attempts fail.
tests/test_chromium.py:368
Function
test_ascrape_playwright_scroll
Test the ascrape_playwright_scroll method with various configurations.
tests/test_chromium.py:117
← previous
next →
501–600 of 904, ranked by callers