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
↓ 436 callers
Method
get
(self, url)
tests/test_chromium.py:530
↓ 88 callers
Method
info
(self, msg)
tests/test_generate_answer_node.py:25
↓ 67 callers
Method
run
(self)
tests/graphs/abstract_graph_test.py:108
↓ 57 callers
Method
get_execution_info
Returns the execution information of the graph. Returns: dict: The execution information of the graph.
scrapegraphai/graphs/abstract_graph.py:306
↓ 46 callers
Method
update
(self, result: dict, state: State)
scrapegraphai/integrations/burr_bridge.py:69
↓ 44 callers
Function
prettify_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 callers
Method
invoke
(self, inputs)
tests/test_generate_answer_node.py:156
↓ 29 callers
Function
safe_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 callers
Method
execute
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 callers
Method
lazy_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 callers
Method
get_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 callers
Method
run
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 callers
Function
_make_loader
(urls=None, **kwargs)
tests/test_plasmate.py:17
↓ 16 callers
Function
assert_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 callers
Method
get_url
Get full URL for a given path.
tests/fixtures/mock_server/server.py:335
↓ 16 callers
Method
warning
(self, msg)
tests/test_batch_api.py:336
↓ 15 callers
Method
ascrape_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 callers
Method
scrape
(self, url: str)
scrapegraphai/docloaders/chromium.py:75
↓ 14 callers
Method
alazy_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 callers
Function
get_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 callers
Function
scrape_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 callers
Method
ascrape_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 callers
Function
_mock_run
Return a mock subprocess.CompletedProcess.
tests/test_plasmate.py:23
↓ 11 callers
Method
execute
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 callers
Method
launch
(headless, proxy, **kwargs)
tests/test_chromium.py:282
↓ 10 callers
Method
error
(self, msg)
tests/test_generate_answer_node.py:28
↓ 10 callers
Method
execute
(self, inputs)
tests/test_omni_search_graph.py:12
↓ 9 callers
Function
_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 callers
Method
ascrape_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 callers
Function
convert_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 callers
Method
load
Load all documents synchronously.
scrapegraphai/docloaders/chromium.py:438
↓ 7 callers
Method
_send_html_response
Send HTML response.
tests/fixtures/mock_server/server.py:282
↓ 7 callers
Method
ascrape_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 callers
Function
get_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 callers
Method
run
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 callers
Method
run
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/script_creator_multi_graph.py:90
↓ 6 callers
Method
goto
(self, url, wait_until)
tests/test_chromium.py:248
↓ 6 callers
Method
new_page
(self)
tests/test_chromium.py:258
↓ 6 callers
Method
run
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 callers
Method
run
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 callers
Function
search_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 callers
Method
to_jsonl_line
Convert to a JSONL line for the Batch API input file.
scrapegraphai/utils/batch_api.py:50
↓ 5 callers
Function
_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 callers
Method
close
(self)
tests/test_chromium.py:265
↓ 5 callers
Function
extract_code
Module for extracting code
scrapegraphai/utils/cleanup_code.py:8
↓ 5 callers
Function
minify_html
minify_html function
scrapegraphai/utils/cleanup_html.py:104
↓ 5 callers
Method
new_context
(self, **kwargs)
tests/test_chromium.py:262
↓ 5 callers
Function
parse_or_search_proxy
Parses a proxy configuration or searches for a matching one via broker.
scrapegraphai/utils/proxy_rotation.py:191
↓ 5 callers
Function
reduce_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 callers
Method
run
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/search_graph.py:103
↓ 5 callers
Function
set_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 callers
Method
_build_cmd
Build the plasmate CLI command for a given URL.
scrapegraphai/docloaders/plasmate.py:107
↓ 4 callers
Method
content
(self)
tests/test_chromium.py:254
↓ 4 callers
Function
dynamic_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 callers
Function
evaluate_simple_expression
(exp)
scrapegraphai/utils/parse_state_keys.py:75
↓ 4 callers
Function
get_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 callers
Function
get_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 callers
Function
get_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 callers
Method
invoke_with_timeout
Helper method to invoke chain with timeout
scrapegraphai/nodes/generate_answer_node.py:75
↓ 4 callers
Function
is_ipv4_address
If a proxy address conforms to a IPv4 address
scrapegraphai/utils/proxy_rotation.py:182
↓ 4 callers
Method
model_json_schema
(self)
tests/test_generate_answer_node.py:245
↓ 4 callers
Method
record
Record a benchmark result.
tests/fixtures/benchmarking.py:65
↓ 4 callers
Function
retrieve_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 callers
Function
test_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 callers
Method
_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 callers
Function
_detect_api
()
scrapegraphai/integrations/scrapegraph_py_compat.py:15
↓ 3 callers
Method
_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 callers
Function
_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 callers
Function
_unwrap_result
(result: Any)
scrapegraphai/integrations/scrapegraph_py_compat.py:42
↓ 3 callers
Function
cleanup_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 callers
Method
get_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 callers
Function
normalize_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 callers
Function
num_tokens_calculus
Returns the number of tokens in a text string.
scrapegraphai/utils/tokenizer.py:8
↓ 3 callers
Method
process
Process the input state and generate an answer.
scrapegraphai/nodes/generate_answer_node.py:90
↓ 3 callers
Function
run
()
tests/test_plasmate.py:234
↓ 3 callers
Method
run
Executes the web scraping and searching process. Returns: str: The answer to the prompt.
scrapegraphai/graphs/csv_scraper_multi_graph.py:92
↓ 3 callers
Function
search_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 callers
Method
set_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 callers
Function
split_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 callers
Function
srcfile_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 callers
Method
start
Start the mock server in a background thread.
tests/fixtures/mock_server/server.py:320
↓ 3 callers
Function
transform_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 callers
Method
_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 callers
Method
_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 callers
Function
_create_sample_file
creates a sample file at some path with some content
tests/utils/test_sys_dynamic_import.py:9
↓ 2 callers
Function
_delete_sample_file
deletes a sample file at some path
tests/utils/test_sys_dynamic_import.py:15
↓ 2 callers
Method
_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 callers
Method
_fallback_fetch
Fall back to ChromiumLoader when Plasmate returns empty content.
scrapegraphai/docloaders/plasmate.py:148
↓ 2 callers
Method
_get_format_instructions
Get format instructions based on the schema configuration.
scrapegraphai/nodes/batch_generate_answer_node.py:100
↓ 2 callers
Function
_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 callers
Method
_serve_404
Serve 404 error.
tests/fixtures/mock_server/server.py:197
↓ 2 callers
Function
assert_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 callers
Function
browser_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 callers
Method
evaluate
(self, script)
tests/test_chromium.py:1278
↓ 2 callers
Function
evaluate_expression
(expression)
scrapegraphai/utils/parse_state_keys.py:82
↓ 2 callers
Method
execute
(self, state: dict)
scrapegraphai/nodes/rag_node.py:43
↓ 2 callers
Method
execute
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 callers
Method
execute_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 callers
Function
extract_from_script_tags
(soup)
scrapegraphai/utils/cleanup_html.py:13
↓ 2 callers
Method
extract_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