Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
firofame authored Jul 2, 2024
1 parent 3b37cb2 commit 143782c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ def extract_movie_details(html_content):

def write_to_readme(movies):
with open('README.md', 'w', encoding='utf-8') as f:
f.write("# Einthusan Movie Details\n\n")
for movie in movies:
f.write("# Watch List\n\n")
for idx, movie in enumerate(movies, 1):
if movie: # Only write non-empty movie dictionaries
f.write(f"## {movie.get('title', 'Unknown Title')} ({movie.get('year', 'N/A')}) ")
f.write(f"{idx}. **{movie.get('title', 'Unknown Title')}** ({movie.get('year', 'N/A')}) ")

# Write IMDb and Trailer links if available
extras = movie.get('extras', {})
Expand Down

0 comments on commit 143782c

Please sign in to comment.