Git Product home page Git Product logo

Comments (8)

nixterrimus avatar nixterrimus commented on June 8, 2024

Here's the conversation that press has with the fever plugin:

   POST http://reader.press.com/rss/plugins/fever/?api&groups
          ← 200 application/json 869B
   POST http://reader.press.com/rss/plugins/fever/?api&feeds
        ← 200 application/json 24.12kB
   POST http://reader.press.com/rss/plugins/fever/?api&items&since_id=17632
        ← 200 application/json 97B
   POST http://reader.press.com/rss/plugins/fever/?api&items&since_id=17682
        ← 200 application/json 97B
   POST http://reader.press.com/rss/plugins/fever/?api&items&since_id=17782
        ← 200 application/json 97B
   POST http://reader.press.com/rss/plugins/fever/?api&items&since_id=17732
        ← 200 application/json 97B
   POST http://reader.press.com/rss/plugins/fever/?api&unread_item_ids
        ← 200 application/json 4.05kB
   POST http://reader.press.com/rss/plugins/fever/?api&saved_item_ids
        ← 200 application/json 29.15kB
   POST http://reader.press.com/rss/plugins/fever/?api&links&range=7&offset=0&page=1
        ← 200 application/json 75B
   POST http://reader.press.com/rss/plugins/fever/?api&links&range=7&offset=0&page=2
        ← 200 application/json 75B
   POST http://reader.press.com/rss/plugins/fever/?api&links&range=7&offset=0&page=3
        ← 200 application/json 75B
   POST http://reader.press.com/rss/plugins/fever/?api&links&range=7&offset=0&page=4
        ← 200 application/json 75B

from tinytinyrss-fever-plugin.

nixterrimus avatar nixterrimus commented on June 8, 2024

I watched the traffic for Press talking to a real Fever server and the emulated API through tiny tiny RSS. My handwriting is a hard to read; here's what I found:

small-note

The real API is on the left, the emulated on the right. The conversation goes normally until we get to ?api&items&since_id=####. At this step, the real API returns a JSON response with items containing lots of items. The emulated API returns an empty array.

The #### that is used is the smallest item from the previous step (?api&unread_items).

Next questions:

  • Is ?api&unread_items returning the correct set of items?
  • Is press using the right since_id?
  • Should ?api&items&since_id=#### have the items field populated?

from tinytinyrss-fever-plugin.

ivanm avatar ivanm commented on June 8, 2024

I think it's a problem with Press. This is a sample call for unread items:

parameter: {"api":"","unread_item_ids":"","api_key":"<api_key>"}
answer   : {"api_version":3,"auth":1,"last_refreshed_on_time":"1376697185","unread_item_ids":"23517,23520,23521,23522,23461,23415,23362,23243,22298,22296,22297,22525,22512,22465,22295,23103,23000,22584,22299,23527,23528,23529,23530,23531,23532,23533,23534,23535,23536"}

parameter: {"api":"","items":"","since_id":"2295","api_key":"<api_key>"}
answer   : {"api_version":3,"auth":1,"last_refreshed_on_time":"1376697185","total_items":"15496","items":[]}

parameter: {"api":"","items":"","since_id":"2345","api_key":"<api_key>"}
answer   : {"api_version":3,"auth":1,"last_refreshed_on_time":"1376697185","total_items":"15496","items":[]}

parameter: {"api":"","items":"","since_id":"2395","api_key":"<api_key>"}
answer   : {"api_version":3,"auth":1,"last_refreshed_on_time":"1376697185","total_items":"15496","items":[]}

Press thinks the lower id is '2295' (instead of 22295?). Maybe it can't understand id's with more than 4 digits.

After that it asks for the next '50' elements, 2345, 2395, etc...

from tinytinyrss-fever-plugin.

ivanm avatar ivanm commented on June 8, 2024

Switching from

$where .= "id > " . db_escape_string($since_id*1000) . " "; // NASTY hack for Mr. Reader 2.0 on iOS and TinyTiny 

to

$where .= "id > " . db_escape_string($since_id) . " ";

Solves the issue but may break Mr. Reader...

from tinytinyrss-fever-plugin.

nixterrimus avatar nixterrimus commented on June 8, 2024

What about sniffing out the user agent? My user agent, from press: Dalvik/1.6.0 (Linux; U; Android 4.3; Nexus 4 Build/JWR66V) It'll vary slightly for different people. Maybe an option for the user to paste in theirs in the admin interface? It would be way easier if press would send a user agent for the app. Maybe something like Press-App/APP_VERSION and it looks not that hard to set a user agent for Android apps

from tinytinyrss-fever-plugin.

nixterrimus avatar nixterrimus commented on June 8, 2024

Ah, no better!

Mr. Reader is the one that needs the ugly hack so it makes sense to sniff out its user agent. AAAAND it has a nice user agent string: Mr. Reader 2.0.2 rv:1209.

from tinytinyrss-fever-plugin.

ivanm avatar ivanm commented on June 8, 2024

Awesome!

from tinytinyrss-fever-plugin.

dasmurphy avatar dasmurphy commented on June 8, 2024

Shoule be working now....
https://github.com/dasmurphy/tinytinyrss-fever-plugin/releases/tag/1.4.7

from tinytinyrss-fever-plugin.

Related Issues (19)

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.