Code Monkey home page Code Monkey logo

pttrss's Introduction

Ptt RSS

Self-hosted Ptt RSS service

Please checkout how do I combine Ptt RSS with IFTTT push notification service to make life more easier. 😂

自造:PTT 新文章、關鍵字 手機通知服務

Install

git clone https://github.com/imZack/PttRSS
npm install

Usage

Start RSS Server

λ ~/ptt-to-rss/ PORT=8000 npm start

Example

  • Get RSS of drama-ticket
curl http://localhost:8000/drama-ticket.xml

Example output:

<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title><![CDATA[drama-ticket]]></title>
    <description><![CDATA[PTT: drama-ticket]]></description>
    <link>https://www.ptt.cc/bbs/drama-ticket/index.html</link>
    <generator>PttRSS</generator>
    <lastBuildDate>Wed, 01 Jul 2015 16:12:40 GMT</lastBuildDate>
    <pubDate>Wed, 01 Jul 2015 16:12:40 GMT</pubDate>
    <item>
      <title><![CDATA[[售票] 江蕙8/8 台北小巨蛋演唱會 黃3D$2800一張]]></title>
      <link>https://www.ptt.cc/bbs/Drama-Ticket/M.1435766811.A.8A7.html</link>
      <guid isPermaLink="true">https://www.ptt.cc/bbs/Drama-Ticket/M.1435766811.A.8A7.html</guid>
      <dc:creator><![CDATA[pierrebebe]]></dc:creator>
      <pubDate>Wed, 01 Jul 2015 16:00:00 GMT</pubDate>
    </item>
    <item>
      <title><![CDATA[Re: [換票] 江蕙演唱會7/28紅1C連號換其他天]]></title>
      <link>https://www.ptt.cc/bbs/Drama-Ticket/M.1435767028.A.72C.html</link>
      <guid isPermaLink="true">https://www.ptt.cc/bbs/Drama-Ticket/M.1435767028.A.72C.html</guid>
      <dc:creator><![CDATA[yinfan]]></dc:creator>
      <pubDate>Wed, 01 Jul 2015 16:00:00 GMT</pubDate>
    </item>
    <item>
      <title><![CDATA[[公告] 版規-發文前請務必看完]]></title>
      <link>https://www.ptt.cc/bbs/Drama-Ticket/M.1351960651.A.0B0.html</link>
      <guid isPermaLink="true">https://www.ptt.cc/bbs/Drama-Ticket/M.1351960651.A.0B0.html</guid>
      <dc:creator><![CDATA[nickapple]]></dc:creator>
      <pubDate>Sat, 03 Jan 2015 16:00:00 GMT</pubDate>
    </item>
  </channel>
</rss>
  • Match article title
// Single keyword
curl http://localhost:8000/Gossiping.xml?title=肥宅

// Multiple keywords (OR)
curl http://localhost:8000/Gossiping.xml?title=肥宅&title=國民黨

// Multiple exclude keywords
curl http://localhost:8000/Gossiping.xml?extitle=肥宅

// Push count filter
curl http://localhost:8000/Gossiping.xml?push=100 only get > 100 push

Example output:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>
      <![CDATA[Gossiping]]>
    </title>
    <description>
      <![CDATA[PTT: Gossiping]]>
    </description>
    <link>https://www.ptt.cc/bbs/Gossiping/index.html</link>
    <generator>PttRSS</generator>
    <lastBuildDate>Sun, 20 Dec 2015 06:17:04 GMT</lastBuildDate>
    <pubDate>Sun, 20 Dec 2015 06:17:04 GMT</pubDate>
    <item>
      <title>
        <![CDATA[[問卦] 如果有「愛的號碼牌」肥宅會拿到幾號呢?]]>
      </title>
      <link>https://www.ptt.cc/bbs/Gossiping/M.1450590925.A.F95.html</link>
      <guid isPermaLink="true">https://www.ptt.cc/bbs/Gossiping/M.1450590925.A.F95.html</guid>
      <dc:creator>
        <![CDATA[nobel777]]>
      </dc:creator>
      <pubDate>Sat, 19 Dec 2015 16:00:00 GMT</pubDate>
    </item>
    <item>
      <title>
        <![CDATA[[問卦] 有沒有這個肥宅網友到底想幹嘛的八卦?]]>
      </title>
      <link>https://www.ptt.cc/bbs/Gossiping/M.1450590385.A.80F.html</link>
      <guid isPermaLink="true">https://www.ptt.cc/bbs/Gossiping/M.1450590385.A.80F.html</guid>
      <dc:creator>
        <![CDATA[poppylove]]>
      </dc:creator>
      <pubDate>Sat, 19 Dec 2015 16:00:00 GMT</pubDate>
    </item>
    <item>
      <title>
        <![CDATA[[問卦] 肥宅去參加系上舞會有搞頭嗎?]]>
      </title>
      <link>https://www.ptt.cc/bbs/Gossiping/M.1450590531.A.491.html</link>
      <guid isPermaLink="true">https://www.ptt.cc/bbs/Gossiping/M.1450590531.A.491.html</guid>
      <dc:creator>
        <![CDATA[yuimoest]]>
      </dc:creator>
      <pubDate>Sat, 19 Dec 2015 16:00:00 GMT</pubDate>
    </item>
  </channel>
</rss>

Author

YuLun Shih

License

MIT

pttrss's People

Contributors

dependabot[bot] avatar imzack avatar weiting-tw 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

Watchers

 avatar  avatar  avatar  avatar  avatar

pttrss's Issues

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.