728x90

Python 4

줄서기 시스템

✅ 구성👤 사용자 화면이름 + 전화번호 입력내 번호 확인실시간 대기열 확인🧑‍💼 관리자 화면다음 사람 호출 버튼현재 호출 번호 전체 화면 강조호출 시 소리 알림실시간 갱신🔒 서버Mutex (threading.Lock)동시 접속 안전AJAX 기반 (새로고침 없음)📁 파일 구조queue_system/ ├ app.py └ templates/ ├ user.html └ admin.html1️⃣ app.py (서버)from flask import Flask, render_template, request, jsonifyimport threadingapp = Flask(__name__)queue = []queue_lock = threading.Lock()next_id = 1current_person..

Python 2026.02.05

yt-dlp 라이브러리 사용하여 youtube 동영상 다운 받는 코드 작성

1️⃣ 라이브러리 설치pip install yt-dlp2️⃣ 재생목록 전체 다운로드 (최고 화질)from yt_dlp import YoutubeDLplaylist_url = "https://www.youtube.com/playlist?list=재생목록ID"ydl_opts = { "format": "bestvideo+bestaudio/best", "merge_output_format": "mp4", "outtmpl": "downloads/%(playlist_title)s/%(playlist_index)s - %(title)s.%(ext)s", "ignoreerrors": True, # 오류 영상은 건너뜀}with YoutubeDL(ydl_opts) as ydl: ydl.dow..

Python 2026.01.20

Slack Bot 만들기

https://api.slack.com/ 에 접속 Slack은 생산성 플랫폼입니다 Slack은 팀과 커뮤니케이션할 수 있는 새로운 방법입니다. 이메일보다 빠르고, 더 조직적이며, 훨씬 안전합니다. slack.com 화면 오른쪽 상단에 Your apps 클릭 -> Ceate New App From scrate 선택 -> App 이름과 적용할 workspace 선택 후 Crate App 버튼 클릭 oAuth & Permissions 메뉴 선택하고 Bot의 기능 선택 Features - Incoming Webhooks에서 Active Incoming Webhooks를 on으로 설정하고 Add New Webhook to Workspace Python 으로 짠 코드로 메시지 전송하기 1 2 3 4 5 6 7 8 ..

Python 2024.03.22
728x90