Code Monkey home page Code Monkey logo

gabbymediabot's Introduction

구축 개요

현재 운용중인 Plex Media Server의 컨텐츠 업로드 시 활용하기 위한 용도.

기존 프로세스의 문제점

토렌트 다운로드 프로세스의 비효율성 발생

기존 프로세스

  1. 미디어 업로드 요청 발생
  2. 토렌트 사이트 검색
  3. 토렌트 마그넷 복사 or 토렌트 파일
  4. Transmission을 통한 다운로드

변경 후 프로세스

  1. [User] Telegram Bot을 통해 검색어 입력
  2. [Bot] 토렌트 사이트 검색 결과 Telegram에 리턴
  3. [User] inline_keyboard 검색결과 선택
  4. [Bot] Transmission Magnet 주소를 통한 다운로드 Queue 추가

Tech Spec

  • Telegram Bot Api
  • Telegram App
  • NodeJS Web Server
  • NodeJS Web Crawler
  • Transmission-remote-cli

참고자료 정리


Scrap

작업일지 (작성중)

  • Telegram 봇 생성

  • Telegram 봇 실행

  • NodeJS 설치 및 실행

  • 개발환경 설정

    • Atom - Remote-FTP 연결
  • Node-Telegram 봇 NPM 설치

  • Telegram Bot -> Node 서버로 요청

    • Node 서버설정
    • Telegram Bot API 사용
      • Request
        • Telegram Bot -> Node Server로 요청
      • Response
        • Node Server -> Telegram Bot 으로 응답
  • 토렌트 크롤러 제작

    • Scraping.js
      • URL
        • ID 가 반드시 필요함
        • input : 검색어 메세지
        • output : 게시물 ID
    • Magnet parser
      • input : 게시물 ID
      • output : 마그넷 주소
    • Transmission Application
      • input : 마그넷 주소
      • output : 토렌트 다운로드 시작 명령어 구동
  • Telegram Bot - Crawler 연동

    • Request
      • Telegram Bot -> Node Server로 요청
      • 검색어 크롤링
      • 리스트 리턴
      • 텔레그램 이벤트 콜백
      • 해당 내용에 대한 토렌트 파일 검색 및 다운로드
      • transmission-remote -a magnet:?xt=urn:btih:7C82433685A1C8B65649836818C9783881FE6A47
      • sh
    • Response
      • Node Server -> Telegram Bot 으로 응답
      • 다운로드가 시작되었습니다
      • 다운로드가 완료되었습니다
      • 참고자료
  • 2차

    • 다운로드 후 스탑기능 추가
    • 다운로드 컨펌창 추가
    • 현재 다운로드 현황
    • 용량 밸리데이션

gabbymediabot's People

Contributors

heference avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.