Video Gallery made by scraping YouTube API
- python 3.9
- Pipenv
- Docker (for integration tests)
- Activate Pipenv environment with
pipenv shell
- Install dependencies with
pipenv install --dev
- Copy
.env.example
to.env
and modify the required values. - Apply migrations to database using
flask db upgrade
- Run tests with
make tests
- Copy
.env.example
to.env
and modify the required values. - Run
docker compose -f docker-compose.yml -f docker-compose.deploy.yml up
to bring the project up - Apply migrations with
docker compose -f docker-compose.yml -f docker-compose.deploy.yml exec app flask db upgrade
Params:
limit
-- [Integer] Count of videos to returnbefore
-- [Date] Ex: 2021-04-25T07:42:56Z
GET localhost:5000/v1/videos?limit=2&since=2021-04-25T07:42:56Z
Connection: close
Content-Length: 1146
Content-Type: application/json
Date: Sun, 25 Apr 2021 11:41:37 GMT
Server: gunicorn
[
{
"description": "More cats on catkotes2 channel.",
"id": "yt-7yryWp2b-HI",
"publishedAt": "2021-04-25T11:37:55Z",
"thumbnailUrl": "https://i.ytimg.com/vi/7yryWp2b-HI/default.jpg",
"title": "funny cat 10 sec"
},
{
"description": "More cats on catkotes2 channel.",
"id": "yt-YC1ETK2ouQs",
"publishedAt": "2021-04-25T11:36:55Z",
"thumbnailUrl": "https://i.ytimg.com/vi/YC1ETK2ouQs/default.jpg",
"title": "what cats hate"
}
]
Params:
limit
-- [Integer] Count of videos to returnbefore
-- [Date] Date filter Ex: 2021-04-25T07:42:56Zq
-- [String] Search string
GET localhost:5000/v1/videos?limit=2&since=2021-04-25T07:42:56Z
Connection: close
Content-Length: 1146
Content-Type: application/json
Date: Sun, 25 Apr 2021 11:41:37 GMT
Server: gunicorn
[
{
"description": "More cats on catkotes2 channel.",
"id": "yt-7yryWp2b-HI",
"publishedAt": "2021-04-25T11:37:55Z",
"thumbnailUrl": "https://i.ytimg.com/vi/7yryWp2b-HI/default.jpg",
"title": "funny cat 10 sec"
},
{
"description": "More cats on catkotes2 channel.",
"id": "yt-YC1ETK2ouQs",
"publishedAt": "2021-04-25T11:36:55Z",
"thumbnailUrl": "https://i.ytimg.com/vi/YC1ETK2ouQs/default.jpg",
"title": "what cats hate"
}
]