Giter VIP home page Giter VIP logo

pttlibrary's Introduction

PTT Library

Package Version Build Status Codacy Badge Requirements Status License: GPL v3 Join the chat at https://gitter.im/PTTLibrary/Lobby

Do you want PTT in Python? import PTT !

PTT Library 是一個由 Python 寫成用來操作 PTT 的函式庫,你可以在任何可以使用 Python 的地方,執行你的 PTT 機器人。

版本

0.6.0

安裝

pip3 install PTTLibrary

基本使用

from PTTLibrary import PTT

PTTBot = PTT.Library(ID, Password)
ErrCode = PTTBot.login()
if ErrCode != PTT.ErrorCode.Success:
    PTTBot.Log('登入失敗')
    sys.exit()

......

PTTBot.logout()
你可以參考 Test.py 裡面有 API 的範例與說明

詳細說明

請參考 Test.py

需求

Python 3.6

相依函式庫

progressbar2
paramiko

API

getVersion 取得版本資訊
login 登入
logout 登出
post PO 文
push 根據文章編號推文
mail 寄信給使用者
getPost 取得文章資訊 內含推文清單
getNewestIndex 取得該看板最新的文章編號或者信箱最新信件編號
giveMoney 給予使用者 P 幣
getTime 取得 PTT 系統時間
getUser 取得該使用者資訊
crawlBoard 多線程爬蟲 以多重登入增加爬蟲速度 可傳入 call back 自訂存檔格式
getMail 取得信件資訊
Log 顯示訊息
changePassword 修改密碼
replyPost 回覆文章
throwWaterBall 丟水球
delPost 刪除文章

贊助

如果這個專案減少了你的開發時間,你可以贊助我一杯咖啡 :D
XMR 贊助位址
448CUe2q4Ecf9tx6rwanrqM9kfCwqpNbhJ5jtrTf9FHqHNq7Lvv9uBoQ74SEaAu9FFceNBr6p3W1yhqPcxPPSSTv2ctufnQ

pttlibrary's People

Contributors

changingtecadmin avatar truth1987 avatar

Watchers

Yu-De Chen 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.