Coder Social home page Coder Social logo

Comments (3)

Truth1987 avatar Truth1987 commented on May 19, 2024

我看了一下,這些是從 PTT 接到的耶...

from pyptt.

eight04 avatar eight04 commented on May 19, 2024

抱歉,標題不夠清楚。我想表達的是「移位碼並未被處理」。在不處理移位碼的情況下,文章內容甚至會整個遺失(非 rawData)。例如這篇文章︰
#1RA8BG7g (Test) [ptt.cc] [測試]
https://www.ptt.cc/bbs/Test/M.1529381584.A.1EA.html

執行以下程式抓取文章內容

from pprint import pprint
from PTTLibrary import PTT

bot = PTT.Library(kickOtherLogin=False)
bot.login(USER, PASSWORD)
err, post = bot.getPost("test", "1RA8BG7g")
pprint((
	post.getBoard(),
	post.getID(),
	post.getAuthor(),
	post.getContent()
))

可以看到兩行文字都消失了︰

[06-19 12:25:26][資訊] 偵測到前景執行使用編碼: utf-8
[06-19 12:25:26][資訊] 使用者帳號:
[06-19 12:25:26][資訊] 密碼:
[06-19 12:25:26][資訊] 產生 SSH 金鑰完成
[06-19 12:25:26][資訊] 連線頻道 0 啟動
[06-19 12:25:36][資訊] 頻道 0 建立互動通道成功
[06-19 12:25:36][資訊] 頻道 0 輸入帳號
[06-19 12:25:36][資訊] 頻道 0 輸入密碼
[06-19 12:25:36][資訊] 頻道 0 讀取 PTT 畫面..
[06-19 12:25:37][資訊] 不刪除重複登入的連線
[06-19 12:25:39][資訊] 任意鍵繼續
[06-19 12:25:39][資訊] 頻道 0 登入成功
('test',
 '1RA8BG7g',
 'eight0 (人類)',
 '--▉▏                                      '
 '▉▏                                       '
 '▊▎                                     '
 'e▆e  \u3000
    '
 'e      e                                   \n'
 '\n'
 '--')

from pyptt.

Truth1987 avatar Truth1987 commented on May 19, 2024

好,沒問題。

from pyptt.

Related Issues (20)

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.