Home Routes Documentation¶
app.routes.home_routes
¶
analyze_playlist()
¶
This function processes a YouTube playlist URL submitted via POST request, extracts playlist information, and returns analyzed data including video count, durations, and playback speed calculations.
Returns:
Name | Type | Description |
---|---|---|
str | str | Rendered HTML template containing: - Playlist statistics (video count, average length, total duration) - Playback duration at different speeds (1.25x - 2.00x) - Chart data with video titles and durations |
Raises:
Type | Description |
---|---|
InvalidYoutubePlaylistLink | If the provided playlist URL is invalid or malformed |
Exception | For any other unexpected errors during processing |
Example usage
POST / with form data containing: { "search_string": "https://www.youtube.com/playlist?list=PLAYLIST_ID" }
Source code in app/routes/home_routes.py
home()
¶
This route function serves the home page of the application by rendering the 'home.html' template.
Returns:
Name | Type | Description |
---|---|---|
str | str | The rendered HTML content of the home page. |
Example
When accessing the root URL ('/'), this function will be called and return the rendered home page template.