Giter VIP home page Giter VIP logo

Comments (6)

tolbahadi avatar tolbahadi commented on July 22, 2024

From what I read in the readme file, this is a single page app. It uses javascript to ajax-request actual content of the article.

Pocket is probably using some kind of html scraping to get the content from the first response, and the first response of this app will have nothing but javascript and the basic templates.

You can confirm this by disabling javascript and reloading the article page.

from manshar.

zakelfassi avatar zakelfassi commented on July 22, 2024

Exactly as @tolbahadi explained - For the Pocket case, you can save the article in pocket, except that it wouldn't have a proper title/description.

Maybe there should be a fallback rails route that would check for the useragent string, and when appropriate render a plain HTML file?

from manshar.

tolbahadi avatar tolbahadi commented on July 22, 2024

That is a good solution @zakelfassi +1

from manshar.

mkhatib avatar mkhatib commented on July 22, 2024

Unfortunately I just spent some time trying to figure out if Pocket sends a special request that we can detect. We already have a fallback in place for all other crawlers (Google, Facebook, Twitter...etc) and I just sent PR #222 to detect more bots (incl. Slack bots).

I've done some debugging and it doesn't seem Pocket sends anything special with the request, they don't use the ?_escaped_fragment_= recommendation or use a custom user-agent to fetch. I've contacted them and hoping to hear from them.

If anybody has any insights in this please let us know :-)

from manshar.

mkhatib avatar mkhatib commented on July 22, 2024

btw, heard back from Pocket support they might add us to a whitelist to crawl our content using the ?_escaped_fragment_= way. Not sure how long will that take to be in place. They also told me they're working on fixing this by developing a better detection mechanism for pages that load content through ajax.

from manshar.

mkhatib avatar mkhatib commented on July 22, 2024

I'll be closing this one as there is no easy way to fix this without Pocket help. However, pocket support told me that they're working on better crawling of ajax-based sites.

from manshar.

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.