MCPcopy Create free account

hub / github.com/ScrapeGraphAI/Scrapegraph-ai / functions

Functions904 in github.com/ScrapeGraphAI/Scrapegraph-ai

Methodhandle_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
Methodinfo
(self, msg)
tests/test_batch_api.py:332
Methodlaunch
(headless, proxy, **kwargs)
tests/test_chromium.py:277
Methodlazy_load
Yield Documents one at a time, fetching each URL synchronously.
scrapegraphai/docloaders/plasmate.py:157
Methodload
(self)
tests/test_fetch_node_timeout.py:170
Functionload_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
Functionloader_with_dummy
Fixture returning a ChromiumLoader instance with dummy scraping methods patched.
tests/test_chromium.py:62
Methodlog_message
Suppress default logging.
tests/fixtures/mock_server/server.py:26
Functionmixed_scraper
(url)
tests/test_chromium.py:1130
Functionmock_embedder_model
Mock embedder model for unit testing.
tests/conftest.py:180
Methodmock_embedder_model
(self)
tests/test_json_scraper_graph.py:15
Functionmock_llm_model
Mock LLM model for unit testing.
tests/conftest.py:170
Functionmock_llm_model
()
tests/nodes/robot_node_test.py:9
Methodmock_llm_model
(self)
tests/test_json_scraper_graph.py:11
Functionmock_playwright
()
tests/test_chromium.py:40
Functionmock_server
Start a mock HTTP server for testing.
tests/conftest.py:338
Functionmock_server_url
Get the base URL for the mock server.
tests/conftest.py:349
Functionmock_website_url
URL for the mock test website.
tests/conftest.py:355
Functionmodels_tokens
Import models_tokens directly to avoid triggering the full package init.
tests/test_minimax_models.py:11
Functionmulti_llm_config
Parametrized fixture that tests against multiple LLM providers.
tests/conftest.py:159
Functionnum_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
Functionnum_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
Functionnum_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
Functionollama_config
Ollama configuration for testing.
tests/conftest.py:79
Methodon_llm_end
Collect token usage.
scrapegraphai/utils/custom_callback.py:81
Methodon_llm_new_token
Print out the token.
scrapegraphai/utils/custom_callback.py:77
Methodon_llm_start
Print out the prompts.
scrapegraphai/utils/custom_callback.py:71
Functionopenai_config
OpenAI configuration for testing.
tests/conftest.py:49
Functionopenai_gpt4_config
OpenAI GPT-4 configuration for testing.
tests/conftest.py:64
Methodpage_source
(self)
tests/test_chromium.py:538
Functionpartial_scraper
(url)
tests/test_chromium.py:356
Functionperformance_tracker
Track performance metrics across tests.
tests/conftest.py:322
Methodpost_run_step
(self, *, state: "State", action: "Action", **future_kwargs: Any)
scrapegraphai/integrations/burr_bridge.py:41
Methodpre_run_step
(self, *, state: "State", action: "Action", **future_kwargs: Any)
scrapegraphai/integrations/burr_bridge.py:38
Methodprocess_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
Functionpytest_addoption
Add custom command line options.
tests/conftest.py:415
Functionpytest_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
Functionpytest_collection_modifyitems
Modify test collection based on markers and CLI options.
tests/conftest.py:388
Functionpytest_configure
Register custom markers.
tests/conftest.py:369
Functionrate_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
Methodreads
(self)
scrapegraphai/integrations/burr_bridge.py:57
Methodrecord_request
Record a new request.
tests/fixtures/helpers.py:374
Functionretry_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
Functionrobots_node
(mock_llm_model)
tests/nodes/robot_node_test.py:17
Methodrun
(self)
scrapegraphai/graphs/smart_scraper_multi_batch_graph.py:70
Methodrun
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
Methodrun
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/json_scraper_multi_graph.py:93
Methodrun
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/smart_scraper_multi_concat_graph.py:117
Methodrun
Abstract method to execute the graph and return the result.
scrapegraphai/graphs/abstract_graph.py:323
Methodrun
Executes the scraping process and returns the scraping content. Returns: str: The scraping content.
scrapegraphai/graphs/smart_scraper_lite_graph.py:92
Methodrun
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/document_scraper_multi_graph.py:93
Methodrun
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
Methodrun
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/xml_scraper_multi_graph.py:91
Methodrun
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
Methodrun
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
Functionsample_csv
Sample CSV content for testing.
tests/conftest.py:261
Functionsample_html
Sample HTML content for testing.
tests/conftest.py:194
Functionsample_json_data
Sample JSON data for testing.
tests/conftest.py:226
Functionsample_text
Example of text fixture.
tests/graphs/scrape_plain_text_mistral_test.py:13
Functionsample_xml
Sample XML content for testing.
tests/conftest.py:241
Functionsample_xml
Example of text
tests/graphs/scrape_xml_ollama_test.py:13
Functionsave_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
Functionscrape
Call the scrapegraph-py scrape endpoint across SDK versions.
scrapegraphai/integrations/scrapegraph_py_compat.py:80
Functionsearch
Call the scrapegraph-py search endpoint across SDK versions.
scrapegraphai/integrations/scrapegraph_py_compat.py:96
Functionselect_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
FunctionsetDEFAULT_HANDLER
Add the default handler to the root logger for the library.
scrapegraphai/utils/logging.py:150
MethodsetUp
Set up test fixtures.
tests/test_fetch_node_timeout.py:23
MethodsetUp
(self)
tests/nodes/search_internet_node_test.py:9
Functionset_api_key_env
(monkeypatch)
tests/test_script_creator_multi_graph.py:12
Functionset_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
Functionset_propagation
Enable propagation of the root logger for the library.
scrapegraphai/utils/logging.py:178
Functionset_verbosity_debug
Set the verbosity level of the root logger for the library to DEBUG.
scrapegraphai/utils/logging.py:101
Functionset_verbosity_error
Set the verbosity level of the root logger for the library to ERROR.
scrapegraphai/utils/logging.py:122
Functionset_verbosity_fatal
Set the verbosity level of the root logger for the library to FATAL.
scrapegraphai/utils/logging.py:129
Functionsetup
Setup the SearchLinkNode and initial state for testing.
tests/nodes/search_link_node_test.py:10
MethodtearDown
Clean up after tests.
tests/test_fetch_node_timeout.py:57
Functiontemp_csv_file
Create a temporary CSV file for testing.
tests/conftest.py:299
Functiontemp_html_file
Create a temporary HTML file for testing.
tests/conftest.py:283
Functiontemp_json_file
Create a temporary JSON file for testing.
tests/conftest.py:275
Functiontemp_xml_file
Create a temporary XML file for testing.
tests/conftest.py:291
Functiontest_alazy_load
Test that alazy_load asynchronously yields Document objects with dummy content and proper metadata.
tests/test_chromium.py:83
Functiontest_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
Functiontest_alazy_load_empty_urls
Test that alazy_load yields no documents when the urls list is empty.
tests/test_chromium.py:486
Functiontest_alazy_load_empty_urls
(mock_which)
tests/test_plasmate.py:269
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_alazy_load_partial_failure
Test that alazy_load propagates an exception if one of the scraping tasks fails.
tests/test_chromium.py:351
Functiontest_alazy_load_selenium_backend
Test that alazy_load correctly yields Document objects when using selenium backend.
tests/test_chromium.py:1212
Functiontest_alazy_load_skips_empty
(mock_run, mock_which)
tests/test_plasmate.py:246
Functiontest_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
Functiontest_alazy_load_yields_documents
(mock_run, mock_which)
tests/test_plasmate.py:227
Methodtest_append_node
Test that append_node correctly delegates to the graph's append_node method.
tests/graphs/abstract_graph_test.py:294
Functiontest_ascrape_playwright_browser_config
Test that ascrape_playwright passes extra browser_config kwargs to the browser launch.
tests/test_chromium.py:804
Functiontest_ascrape_playwright_calls_apply_stealth
Test that ascrape_playwright calls Malenia.apply_stealth on the browser context.
tests/test_chromium.py:1405
Functiontest_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
Functiontest_ascrape_playwright_negative_retry
Test that ascrape_playwright returns None when retry_limit is negative (loop not executed).
tests/test_chromium.py:672
Functiontest_ascrape_playwright_retry_failure
Test that ascrape_playwright retries scraping and raises RuntimeError after all attempts fail.
tests/test_chromium.py:368
Functiontest_ascrape_playwright_scroll
Test the ascrape_playwright_scroll method with various configurations.
tests/test_chromium.py:117
← previousnext →501–600 of 904, ranked by callers