Giter Club home page Giter Club logo

pttautologinpost's Introduction

PttAutoLoginPost

PTT自動登入發文(Python) for Windows and Linux

update -2017/5/1

此範例使用 Python 3.4.3

如要使用 python 2.7.3 可參考 20a029ab14f55e81b

特色

  • 自動登入PTT發文,再登出PTT

使用方法

請將下列程式碼修改為自己的PTT ID 以及 Password

user = 'Your PTT ID'
password = 'Your PTT Password'

執行範例

python PttAuto.py

預設為在 PTT Test板 發文

標題 : 發文文字測試

內文 : 這是一篇測試,哇哈哈

post('test', u'發文文字測試', u'這是一篇測試,哇哈哈')

執行過程

alt tag

執行環境

Ubuntu 12.04

Python 3.4.3

Donation

文章都是我自己研究內化後原創,如果有幫助到您,也想鼓勵我的話,歡迎請我喝一杯咖啡:laughing:

alt tag

贊助者付款

License

MIT license

pttautologinpost's People

Contributors

twtrubiks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pttautologinpost's Issues

\xe5錯誤

您好
我直接將py檔載下來執行會發生以下錯誤
SyntaxError: Non-ASCII character '\xe5' in file PttAuto.py on line 17, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

在第一行補上#coding=utf-8後,內文的中文字卻變成亂碼了
請問該如何解決呢

無法正確執行

這個版本的code跟DEMO影片的code不一樣,clone下來之後無法直接執行

第一行似乎要加上
#coding=utf-8

做了1之後,可以登入到PTT,但在發文時會出錯
Traceback (most recent call last):
File "PttAuto.py", line 121, in
main()
File "PttAuto.py", line 116, in main
ptt.post('test', '發文文字測試', '這是一篇測試,哇哈哈')
File "PttAuto.py", line 94, in post
self._telnet.write(title.encode('big5') + b'\r\n')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 0: ordinal not in range(128)

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.