Skip to content

Commit

Permalink
Merge pull request #25 from RadekBucki/docs
Browse files Browse the repository at this point in the history
TikTok and YouTube downloader docs
  • Loading branch information
Damian2057 committed Dec 5, 2023
2 parents 8aceda6 + 3423b41 commit a59f2da
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
- [Database design](docs/DATA_LAYER.md)
- [AI module](docs/AI.md)
- [API module](docs/API.md)
- [Socket module](docs/SOCKET.md)
- [Socket module](docs/SOCKET.md)
- [YouTube and TikTok download](docs/YT_AND_TIKTOK.md)
25 changes: 25 additions & 0 deletions docs/YT_AND_TIKTOK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# YOUTUBE AND TIKTOK DOWNLOAD

## Youtube

Video is fetched using pytube library (downloaded as mp4 with video and converted to mp3 audio), all required operations are performed in YouTubeDownloader class.

Usage:
```python
from backend.video_parser.YouTubeDownloader import YouTubeDownloader

res = YouTubeDownloader.download("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
```
Response returned from method is base64 encoded mp3 file.

## TikTok

TikTok (TikTokDownloader) downloading is based on pyktok library. It's implementation was not enough and it was not working (it required using webdriver as well). We made the implementation simpler to just download mp4 video files for us. Later the file is converted to mp3 audio as in YoutubeDownloader

Usage:
```python
from backend.video_parser.TikTokDownloader import TikTokDownloader

res = TikTokDownloader.download("https://www.tiktok.com/@tiktok/video/7106594312292453675?is_copy_url=1&is_from_webapp=v1")
```
Response returned from method is base64 encoded mp3 file.

0 comments on commit a59f2da

Please sign in to comment.