Fix js_snipprt issue 0.4.21
bump to 0.4.22
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
include requirements.txt
|
include requirements.txt
|
||||||
|
recursive-include crawl4ai/js_snippet *.js
|
||||||
@@ -142,6 +142,7 @@ async def extract_structured_data_using_llm(provider: str, api_token: str = None
|
|||||||
crawler_config = CrawlerRunConfig(
|
crawler_config = CrawlerRunConfig(
|
||||||
cache_mode=CacheMode.BYPASS,
|
cache_mode=CacheMode.BYPASS,
|
||||||
word_count_threshold=1,
|
word_count_threshold=1,
|
||||||
|
page_timeout = 80000,
|
||||||
extraction_strategy=LLMExtractionStrategy(
|
extraction_strategy=LLMExtractionStrategy(
|
||||||
provider=provider,
|
provider=provider,
|
||||||
api_token=api_token,
|
api_token=api_token,
|
||||||
@@ -497,21 +498,21 @@ async def main():
|
|||||||
|
|
||||||
# Advanced examples
|
# Advanced examples
|
||||||
# await extract_structured_data_using_css_extractor()
|
# await extract_structured_data_using_css_extractor()
|
||||||
# await extract_structured_data_using_llm("openai/gpt-4o", os.getenv("OPENAI_API_KEY"))
|
await extract_structured_data_using_llm("openai/gpt-4o", os.getenv("OPENAI_API_KEY"))
|
||||||
# await crawl_dynamic_content_pages_method_1()
|
# await crawl_dynamic_content_pages_method_1()
|
||||||
# await crawl_dynamic_content_pages_method_2()
|
# await crawl_dynamic_content_pages_method_2()
|
||||||
|
|
||||||
# Browser comparisons
|
# Browser comparisons
|
||||||
await crawl_custom_browser_type()
|
# await crawl_custom_browser_type()
|
||||||
|
|
||||||
# Performance testing
|
# Performance testing
|
||||||
# await speed_comparison()
|
# await speed_comparison()
|
||||||
|
|
||||||
# Screenshot example
|
# Screenshot example
|
||||||
await capture_and_save_screenshot(
|
# await capture_and_save_screenshot(
|
||||||
"https://www.example.com",
|
# "https://www.example.com",
|
||||||
os.path.join(__location__, "tmp/example_screenshot.jpg")
|
# os.path.join(__location__, "tmp/example_screenshot.jpg")
|
||||||
)
|
# )
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
asyncio.run(main())
|
asyncio.run(main())
|
||||||
3
setup.py
3
setup.py
@@ -57,6 +57,9 @@ setup(
|
|||||||
author_email="unclecode@kidocode.com",
|
author_email="unclecode@kidocode.com",
|
||||||
license="MIT",
|
license="MIT",
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
|
package_data={
|
||||||
|
'crawl4ai': ['js_snippet/*.js'] # This matches the exact path structure
|
||||||
|
},
|
||||||
install_requires=default_requirements
|
install_requires=default_requirements
|
||||||
+ ["playwright", "aiofiles"], # Added aiofiles
|
+ ["playwright", "aiofiles"], # Added aiofiles
|
||||||
extras_require={
|
extras_require={
|
||||||
|
|||||||
Reference in New Issue
Block a user