🎬 Movie Collection
+Discover and collect your favorite movies
+diff --git a/Web_app/pages/Favorite_Movie.py b/Web_app/pages/Favorite_Movie.py new file mode 100644 index 00000000..bd15977f --- /dev/null +++ b/Web_app/pages/Favorite_Movie.py @@ -0,0 +1,325 @@ +import streamlit as st +import requests +import time +from datetime import datetime +import json + +# Initialize session state for favorites +if "favorites" not in st.session_state: + st.session_state.favorites = set() + +# TMDB API Configuration +API_KEY = "Imdb_api_key" +BASE_URL = "https://api.themoviedb.org/3" + + +def fetch_movies(list_type="trending"): + """Fetch movies from TMDB API""" + if list_type == "trending": + url = f"{BASE_URL}/trending/movie/week?api_key={API_KEY}" + else: + url = f"{BASE_URL}/movie/popular?api_key={API_KEY}" + + try: + response = requests.get(url) + return response.json()["results"] if response.status_code == 200 else [] + except: + st.error("Failed to fetch movies") + return [] + + +# Page Configuration +st.set_page_config(page_title="Movie Collection", page_icon="🎬", layout="wide") + +# Custom CSS for the new compact design +st.markdown( + """ + + """, + unsafe_allow_html=True, +) + +# Header +st.markdown( + """ +
Discover and collect your favorite movies
+Try adjusting your filters or check back later for new movies.
+