Skip to content

Commit

Permalink
docs: improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tbdsux committed Jun 28, 2023
1 parent 50746ed commit 5de9769
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 10 deletions.
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,40 @@ https://kuryana.vercel.app/list/{id}

## Development

- Using the vercel CLI (`localhost:3000`)
- Minimum Python Version : `3.9`,

- Always make sure to create a virtualenvironment

```sh
python -m venv venv
source ./venv/bin/activate.sh # change depends on your shell and os
```
vercel dev

- Install the dependencies
```sh
pip install -r requirements.txt
```

- uvicorn (`localhost:8000`)
### Dev Server

You can start the development server in two ways:

- Using the vercel CLI (`localhost:3000`)

```sh
vercel dev
```

- The api will be `http://localhost:3000/api/*`

- Or with `uvicorn` (`localhost:8000`)

```sh
uvicorn api.main --reload
```

- The api will be `http://localhost:8000/*`

## NOTE

All Requests and SCRAPED Datas are not cached by Vercel or the API itself.
Expand Down
12 changes: 5 additions & 7 deletions api/parser.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
from typing import Dict, List, Any, Type, TypeVar, Union

from api import MYDRAMALIST_WEBSITE
from datetime import datetime
from typing import Any, Dict, List, Type, TypeVar, Union
from urllib.parse import urljoin

# bypassing cloudflare anti-bot
import cloudscraper

from bs4 import BeautifulSoup
from bs4.element import NavigableString, Tag
from datetime import datetime
from urllib.parse import urljoin

from api import MYDRAMALIST_WEBSITE

T = TypeVar("T", bound="Parser")

Expand Down Expand Up @@ -104,7 +102,7 @@ def search(self) -> Dict[str, Any]:
return {
"query": self.query,
"results": self.search_results,
"scrapte_date": datetime.utcnow(),
"scrape_date": datetime.utcnow(),
}


Expand Down

1 comment on commit 5de9769

@vercel
Copy link

@vercel vercel bot commented on 5de9769 Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kuryana – ./

kuryana.vercel.app
kuryana-git-master-theboringdude.vercel.app
kuryana-theboringdude.vercel.app

Please sign in to comment.