forked from unclecode/crawl4ai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README, add manifest, make selenium optional library
- Loading branch information
Showing
5 changed files
with
41 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,30 @@ | ||
from .web_crawler import WebCrawler | ||
# __init__.py | ||
|
||
from .async_webcrawler import AsyncWebCrawler | ||
from .models import CrawlResult | ||
|
||
__version__ = "0.3.0" | ||
|
||
__all__ = [ | ||
"WebCrawler", | ||
"AsyncWebCrawler", | ||
"CrawlResult", | ||
] | ||
|
||
def is_sync_version_installed(): | ||
try: | ||
import selenium | ||
return True | ||
except ImportError: | ||
return False | ||
|
||
if is_sync_version_installed(): | ||
try: | ||
from .web_crawler import WebCrawler | ||
__all__.append("WebCrawler") | ||
except ImportError: | ||
import warnings | ||
print("Warning: Failed to import WebCrawler even though selenium is installed. This might be due to other missing dependencies.") | ||
else: | ||
WebCrawler = None | ||
import warnings | ||
print("Warning: Synchronous WebCrawler is not available. Install crawl4ai[sync] for synchronous support. However, please note that the synchronous version will be deprecated soon.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[options] | ||
include_package_data = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters