Skip to content

Commit

Permalink
Refactoring flask code to allow smoother integration of future python…
Browse files Browse the repository at this point in the history
… features
  • Loading branch information
kevin-huang-cc committed Jan 31, 2025
1 parent 9ba4c1b commit af16a8c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ def create_app():
app = create_app()
print(app.url_map)
if __name__ == "__main__":
app.run(port=5000, debug=True)
app.run(host="0.0.0.0", port=5000, debug=True)
3 changes: 3 additions & 0 deletions flask/routes/youtube_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@


@youtube_bp.route('/get-videos', methods=['POST', 'OPTIONS'])

def get_videos():
print(f"Received request in Flask: {request.json}") # Add debug

if request.method == 'OPTIONS':
return '', 200

Expand Down
Binary file modified flask/services/__pycache__/youtube_service.cpython-39.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions flask/services/youtube_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def getValidTranscript(keyword, limit=5):
break
count += 1


def getAutoGeneratedSubtitle(yt_video_id):
video_id = yt_video_id # Replace with the YouTube video ID
title = getVideoTitle(video_id)
Expand Down

0 comments on commit af16a8c

Please sign in to comment.