-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
908e67f
commit 1252494
Showing
4 changed files
with
14 additions
and
16 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
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,16 +1,12 @@ | ||
import os | ||
from scrapegraph_py.scrape import scrape | ||
from dotenv import load_dotenv # Import load_dotenv | ||
import os # Import os to access environment variables | ||
import json # Import json for beautifying output | ||
from dotenv import load_dotenv | ||
|
||
def main(): | ||
"""Main function to execute the scraping process.""" | ||
load_dotenv() | ||
api_key = os.getenv("SCRAPEGRAPH_API_KEY") | ||
url = "https://scrapegraphai.com/" | ||
prompt = "What does the company do?" | ||
|
||
result = scrape(api_key, url, prompt) | ||
print(result) | ||
if __name__ == "__main__": | ||
main() | ||
load_dotenv() | ||
api_key = os.getenv("SCRAPEGRAPH_API_KEY") | ||
url = "https://scrapegraphai.com/" | ||
prompt = "What does the company do?" | ||
|
||
result = scrape(api_key, url, prompt) | ||
print(result) |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .scrape import scrape | ||
from .credits import credits | ||
from .feedback import feedback |