MCPcopy Create free account

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

Functions904 in github.com/ScrapeGraphAI/Scrapegraph-ai

↓ 436 callersMethodget
(self, url)
tests/test_chromium.py:530
↓ 88 callersMethodinfo
(self, msg)
tests/test_generate_answer_node.py:25
↓ 67 callersMethodrun
(self)
tests/graphs/abstract_graph_test.py:108
↓ 57 callersMethodget_execution_info
Returns the execution information of the graph. Returns: dict: The execution information of the graph.
scrapegraphai/graphs/abstract_graph.py:306
↓ 46 callersMethodupdate
(self, result: dict, state: State)
scrapegraphai/integrations/burr_bridge.py:69
↓ 44 callersFunctionprettify_exec_info
Formats the execution information of a graph showing node statistics. Args: complete_result (list[dict]): The execution information
scrapegraphai/utils/prettify_exec_info.py:8
↓ 35 callersMethodinvoke
(self, inputs)
tests/test_generate_answer_node.py:156
↓ 29 callersFunctionsafe_deepcopy
Safely create a deep copy of an object, handling special cases. Args: obj: Object to copy Returns: Deep copy of the obj
scrapegraphai/utils/copy.py:35
↓ 27 callersMethodexecute
Executes the graph by either using BurrBridge or the standard method. Args: initial_state (dict): The initial state to p
scrapegraphai/graphs/base_graph.py:344
↓ 24 callersMethodlazy_load
Lazily load text content from the provided URLs. This method yields Documents one at a time as they're scraped, instead of w
scrapegraphai/docloaders/chromium.py:446
↓ 22 callersMethodget_input_keys
Determines the necessary state keys based on the input specification. Args: state (dict): The current state of the graph
scrapegraphai/nodes/base_node.py:98
↓ 21 callersMethodrun
Executes the scraping process and returns the answer to the prompt. Returns: str: The answer to the prompt.
scrapegraphai/graphs/smart_scraper_graph.py:281
↓ 19 callersFunction_make_loader
(urls=None, **kwargs)
tests/test_plasmate.py:17
↓ 16 callersFunctionassert_valid_scrape_result
Assert that a scraping result is valid. Args: result: The scraping result to validate expected_keys: Optional list of keys that s
tests/fixtures/helpers.py:22
↓ 16 callersMethodget_url
Get full URL for a given path.
tests/fixtures/mock_server/server.py:335
↓ 16 callersMethodwarning
(self, msg)
tests/test_batch_api.py:336
↓ 15 callersMethodascrape_with_js_support
Asynchronously scrape the content of a given URL by rendering JavaScript using Playwright. Args: url (str): The URL to s
scrapegraphai/docloaders/chromium.py:381
↓ 15 callersMethodscrape
(self, url: str)
scrapegraphai/docloaders/chromium.py:75
↓ 14 callersMethodalazy_load
Asynchronously load text content from the provided URLs. This method leverages asyncio to initiate the scraping of all provided URLs
scrapegraphai/docloaders/chromium.py:467
↓ 13 callersFunctionget_logger
Get a logger with the specified name. If no name is provided, the root logger for the library is returned. Args: name (Optional
scrapegraphai/utils/logging.py:62
↓ 13 callersFunctionscrape_do_fetch
Fetches the IP address of the machine associated with the given URL using Scrape.do. Args: token (str): The API token for Scrape.do
scrapegraphai/docloaders/scrape_do.py:14
↓ 12 callersMethodascrape_playwright_scroll
Asynchronously scrape the content of a given URL using Playwright's sync API and scrolling. Notes: - The user gets to decide
scrapegraphai/docloaders/chromium.py:165
↓ 11 callersFunction_mock_run
Return a mock subprocess.CompletedProcess.
tests/test_plasmate.py:23
↓ 11 callersMethodexecute
Executes the node's logic to fetch HTML content from a specified URL and update the state with this content.
scrapegraphai/nodes/fetch_node.py:93
↓ 11 callersMethodlaunch
(headless, proxy, **kwargs)
tests/test_chromium.py:282
↓ 10 callersMethoderror
(self, msg)
tests/test_generate_answer_node.py:28
↓ 10 callersMethodexecute
(self, inputs)
tests/test_omni_search_graph.py:12
↓ 9 callersFunction_get_library_root_logger
Get the root logger for the library. Returns: logging.Logger: The root logger for the library.
scrapegraphai/utils/logging.py:25
↓ 9 callersMethodascrape_playwright
Asynchronously scrape the content of a given URL using Playwright's async API. Args: url (str): The URL to scrape.
scrapegraphai/docloaders/chromium.py:322
↓ 9 callersFunctionconvert_to_md
Convert HTML to Markdown. This function uses the html2text library to convert the provided HTML content to Markdown format. The function r
scrapegraphai/utils/convert_to_md.py:10
↓ 8 callersMethodload
Load all documents synchronously.
scrapegraphai/docloaders/chromium.py:438
↓ 7 callersMethod_send_html_response
Send HTML response.
tests/fixtures/mock_server/server.py:282
↓ 7 callersMethodascrape_undetected_chromedriver
Asynchronously scrape the content of a given URL using undetected chrome with Selenium. Args: url (str): The URL to scra
scrapegraphai/docloaders/chromium.py:86
↓ 7 callersFunctionget_pydantic_output_parser
Get the correct output parser for the LLM model. Returns: JsonOutputParser: The output parser object.
scrapegraphai/utils/output_parser.py:30
↓ 7 callersMethodrun
Executes the web scraping process and returns the answer to the prompt. Returns: str: The answer to the prompt.
scrapegraphai/graphs/json_scraper_graph.py:88
↓ 7 callersMethodrun
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/script_creator_multi_graph.py:90
↓ 6 callersMethodgoto
(self, url, wait_until)
tests/test_chromium.py:248
↓ 6 callersMethodnew_page
(self)
tests/test_chromium.py:258
↓ 6 callersMethodrun
Executes the web scraping process and returns the answer to the prompt. Returns: str: The answer to the prompt.
scrapegraphai/graphs/xml_scraper_graph.py:87
↓ 6 callersMethodrun
Executes the scraping process and returns the answer to the prompt. Returns: str: The answer to the prompt.
scrapegraphai/graphs/speech_graph.py:103
↓ 6 callersFunctionsearch_on_web
Search web function with improved error handling, validation, and security features. Args: query (str): Search query search_
scrapegraphai/utils/research_web.py:160
↓ 6 callersMethodto_jsonl_line
Convert to a JSONL line for the Batch API input file.
scrapegraphai/utils/batch_api.py:50
↓ 5 callersFunction_set_library_root_logger
Set up the root logger for the library. This function sets up the default handler for the root logger, if it has not already been set up
scrapegraphai/utils/logging.py:35
↓ 5 callersMethodclose
(self)
tests/test_chromium.py:265
↓ 5 callersFunctionextract_code
Module for extracting code
scrapegraphai/utils/cleanup_code.py:8
↓ 5 callersFunctionminify_html
minify_html function
scrapegraphai/utils/cleanup_html.py:104
↓ 5 callersMethodnew_context
(self, **kwargs)
tests/test_chromium.py:262
↓ 5 callersFunctionparse_or_search_proxy
Parses a proxy configuration or searches for a matching one via broker.
scrapegraphai/utils/proxy_rotation.py:191
↓ 5 callersFunctionreduce_html
Reduces the size of the HTML content based on the specified level of reduction. Args: html (str): The HTML content to reduce.
scrapegraphai/utils/cleanup_html.py:124
↓ 5 callersMethodrun
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/search_graph.py:103
↓ 5 callersFunctionset_verbosity
Set the verbosity level of the root logger for the library. Args: verbosity (int): The verbosity level to set.
scrapegraphai/utils/logging.py:90
↓ 4 callersMethod_build_cmd
Build the plasmate CLI command for a given URL.
scrapegraphai/docloaders/plasmate.py:107
↓ 4 callersMethodcontent
(self)
tests/test_chromium.py:254
↓ 4 callersFunctiondynamic_import
imports a python module at runtime Args: modname: The module name in the scope message: The display message in case of error
scrapegraphai/utils/sys_dynamic_import.py:48
↓ 4 callersFunctionevaluate_simple_expression
(exp)
scrapegraphai/utils/parse_state_keys.py:75
↓ 4 callersFunctionget_optimal_analysis_template
Returns the optimal prompt template based on the error type. Args: error_type (str): Type of error to analyze. Returns:
scrapegraphai/utils/code_error_analysis.py:87
↓ 4 callersFunctionget_optimal_correction_template
Returns the optimal prompt template for code correction based on the error type. Results are cached for performance. Args: error
scrapegraphai/utils/code_error_correction.py:66
↓ 4 callersFunctionget_structured_output_parser
Get the correct output parser for the LLM model. Returns: Callable: The output parser function.
scrapegraphai/utils/output_parser.py:12
↓ 4 callersMethodinvoke_with_timeout
Helper method to invoke chain with timeout
scrapegraphai/nodes/generate_answer_node.py:75
↓ 4 callersFunctionis_ipv4_address
If a proxy address conforms to a IPv4 address
scrapegraphai/utils/proxy_rotation.py:182
↓ 4 callersMethodmodel_json_schema
(self)
tests/test_generate_answer_node.py:245
↓ 4 callersMethodrecord
Record a benchmark result.
tests/fixtures/benchmarking.py:65
↓ 4 callersFunctionretrieve_batch_results
Retrieve and parse results from a completed batch. Args: client: An initialized OpenAI client. batch_info: A BatchJobInfo from a
scrapegraphai/utils/batch_api.py:250
↓ 4 callersFunctiontest_scraper_with_analysis
Test scraper for the given backend and URLs, then analyze content with ScrapegraphAI. Args: scraper (ChromiumLoader): The ChromiumLo
examples/extras/chromium_selenium.py:53
↓ 3 callersMethod_create_graph
Creates the graph of nodes representing the workflow for web scraping and searching. Returns: BaseGraph: A graph instance
scrapegraphai/graphs/script_creator_multi_graph.py:55
↓ 3 callersFunction_detect_api
()
scrapegraphai/integrations/scrapegraph_py_compat.py:15
↓ 3 callersMethod_get_model_name
Extract the OpenAI model name from the LLM configuration. Returns: The model name string (e.g., 'gpt-4o-mini').
scrapegraphai/nodes/batch_generate_answer_node.py:80
↓ 3 callersFunction_parse_proxy
parses a proxy configuration with known server Args: proxy: The proxy configuration to parse. Returns: A 'playwright' compli
scrapegraphai/utils/proxy_rotation.py:134
↓ 3 callersFunction_unwrap_result
(result: Any)
scrapegraphai/integrations/scrapegraph_py_compat.py:42
↓ 3 callersFunctioncleanup_html
Processes HTML content by removing unnecessary tags, minifying the HTML, and extracting the title and body content. Args: html_c
scrapegraphai/utils/cleanup_html.py:48
↓ 3 callersMethodget_state
"" Get the final state of the graph. Args: key (str, optional): The key of the final state to retrieve. Returns
scrapegraphai/graphs/abstract_graph.py:281
↓ 3 callersFunctionnormalize_dict
Recursively normalizes the values in a dictionary. Args: d (Dict[str, Any]): The dictionary to normalize. Returns: Dict
scrapegraphai/utils/dict_content_compare.py:15
↓ 3 callersFunctionnum_tokens_calculus
Returns the number of tokens in a text string.
scrapegraphai/utils/tokenizer.py:8
↓ 3 callersMethodprocess
Process the input state and generate an answer.
scrapegraphai/nodes/generate_answer_node.py:90
↓ 3 callersFunctionrun
()
tests/test_plasmate.py:234
↓ 3 callersMethodrun
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/csv_scraper_multi_graph.py:92
↓ 3 callersFunctionsearch_proxy_servers
search for proxy servers that match the specified broker criteria Args: anonymous: whether proxy servers should have minimum level-1 anon
scrapegraphai/utils/proxy_rotation.py:47
↓ 3 callersMethodset_common_params
Pass parameters to every node in the graph unless otherwise defined in the graph. Args: params (dict): Common parameters
scrapegraphai/graphs/abstract_graph.py:107
↓ 3 callersFunctionsplit_text_into_chunks
Splits the text into chunks based on the number of tokens. Args: text (str): The text to split. chunk_size (int): The maximu
scrapegraphai/utils/split_text_into_chunks.py:10
↓ 3 callersFunctionsrcfile_import
imports a python module from its srcfile Args: modpath: The srcfile absolute path modname: The module name in the scope
scrapegraphai/utils/sys_dynamic_import.py:15
↓ 3 callersMethodstart
Start the mock server in a background thread.
tests/fixtures/mock_server/server.py:320
↓ 3 callersFunctiontransform_schema
Transform the pydantic schema into a more comprehensible JSON schema. Args: pydantic_schema (dict): The pydantic schema. Return
scrapegraphai/utils/schema_trasform.py:6
↓ 2 callersMethod_async_execute
asynchronously executes the node's logic with multiple graph instances running in parallel, using a semaphore of some size for concurrency reg
scrapegraphai/nodes/graph_iterator_node.py:81
↓ 2 callersMethod_create_edges
Helper method to create a dictionary of edges from the given iterable of tuples. Args: edges (iterable): An iterable of
scrapegraphai/graphs/base_graph.py:83
↓ 2 callersFunction_create_sample_file
creates a sample file at some path with some content
tests/utils/test_sys_dynamic_import.py:9
↓ 2 callersFunction_delete_sample_file
deletes a sample file at some path
tests/utils/test_sys_dynamic_import.py:15
↓ 2 callersMethod_extract_urls
Extracts URLs from the given text. Args: text (str): The text to extract URLs from. Returns: Tuple[
scrapegraphai/nodes/parse_node.py:131
↓ 2 callersMethod_fallback_fetch
Fall back to ChromiumLoader when Plasmate returns empty content.
scrapegraphai/docloaders/plasmate.py:148
↓ 2 callersMethod_get_format_instructions
Get format instructions based on the schema configuration.
scrapegraphai/nodes/batch_generate_answer_node.py:100
↓ 2 callersFunction_search_proxy
searches for a proxy server matching the specified broker criteria Args: proxy: The proxy configuration to search for. Returns:
scrapegraphai/utils/proxy_rotation.py:163
↓ 2 callersMethod_serve_404
Serve 404 error.
tests/fixtures/mock_server/server.py:197
↓ 2 callersFunctionassert_execution_info_valid
Assert that execution info is valid and contains expected fields. Args: exec_info: Execution info dictionary
tests/fixtures/helpers.py:37
↓ 2 callersFunctionbrowser_base_fetch
BrowserBase Fetch This module provides an interface to the BrowserBase API. Args: api_key (str): The API key provided by Browse
scrapegraphai/docloaders/browser_base.py:9
↓ 2 callersMethodevaluate
(self, script)
tests/test_chromium.py:1278
↓ 2 callersFunctionevaluate_expression
(expression)
scrapegraphai/utils/parse_state_keys.py:82
↓ 2 callersMethodexecute
(self, state: dict)
scrapegraphai/nodes/rag_node.py:43
↓ 2 callersMethodexecute
Execute the Burr application with the given initial state. Args: initial_state (dict): The initial state to pass to the
scrapegraphai/integrations/burr_bridge.py:211
↓ 2 callersMethodexecute_async
Processes images from the state, generates answers, consolidates the results, and updates the state asynchronously.
scrapegraphai/nodes/generate_answer_from_image_node.py:69
↓ 2 callersFunctionextract_from_script_tags
(soup)
scrapegraphai/utils/cleanup_html.py:13
↓ 2 callersMethodextract_links
Extracts all hyperlinks from the HTML content. Args: html_content (str): The HTML content to extract links from.
scrapegraphai/nodes/fetch_node_level_k.py:150
next →1–100 of 904, ranked by callers