Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Small doc updates #3

Merged
merged 3 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions book/src/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ from spider_rs import Website
async def main():
website = Website("https://jeffmendez.com")
website.crawl()
print(website.links)
# print(website.pages)
print(website.get_links())

asyncio.run(main())
```
Expand Down Expand Up @@ -63,20 +62,3 @@ async def main():
website = Website("https://choosealicense.com")
website.crawl(Subscription())
```

## Shortcut

You can use the `crawl` shortcut method to collect contents quickly without configuration.

```ts
import asyncio

from spider_rs import crawl

async def main():
website = crawl("https://jeffmendez.com")
print(website.links)
# print(website.pages)

asyncio.run(main())
```
6 changes: 3 additions & 3 deletions book/src/website.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ import asyncio
from spider_rs import Website

async def main():
website = Website("https://choosealicense.com").with_tlds(True)
website = Website("https://choosealicense.com").with_tld(True)

asyncio.run(main())
```
Expand Down Expand Up @@ -247,8 +247,8 @@ async def main():
website = (
Website("https://google.com")
.with_openai({
"model": "gpt-3.5-turbo",
"prompt": "Search for movies",
"model": "gpt-3.5-turbo",
"prompt": "Search for movies",
"maxTokens": 300
})
)
Expand Down
Loading