Git Product home page Git Product logo

paywall-reader's Introduction

Paywall Reader

A web app that lets you read articles on popular news sites that get hidden behind paywalls.

URL: https://reader.dangerous.dev

Supported Sites

  • New York Times (nytimes.com)
  • New York Times Cooking (cooking.nytimes.com)
  • The New Yorker (newyorker.com)
  • The Economist (economiste.com)
  • Washington Post (washingtonpost.com)
  • LA Times (latimes.com)
  • The Athletic (theathletic.com)
  • Business Insider (businessinsider.com)
  • Bloomberg (bloomberg.com)
  • Vogue (vogue.com)
  • The Atlantic (theatlantic.com)
  • Forbes (forbes.com)

Prerequisites

  1. Register a custom Google search engine by going to https://developers.google.com/custom-search/v1/introduction and pressing "Get A Key"
  2. As per their site:

Once it is created, you can find the engine's ID in the Setup > Basics > Search Engine ID section of the Control Panel

This is where you will configure what sites your search will search in. For the purposes of this app in its current state, we will just use bloomberg.com (*.bloomberg.com/*) and newyorker.com (*.newyorker.com/*)

Take note of your API key and Search Engine ID.

Installation

git clone https://github.com/joshterrill/paywall-reader
cd paywall-reader/
cp .env.example .env
# replace GOOGLE_API_KEY and GOOGLE_SEARCH_ID with values from prerequisites section
npm i
npm start

Running npm test will check all supported sites for output verification, making sure that the selectors that extract the text from the sites have not changed.

Adding More Sites

Pull requests would gladly be accepted for adding support for more sites. If you can't submit a pull request, open a Github issue and I'll get to it when I have time.

Todo

  • Fix relative and absolute links in embedded html to point to domain they should be coming from
  • Add dom sanitization for incoming HTML
  • Add checks for source and URL fields on requests to ensure the URL matches the URL in the news-source-map.json file

paywall-reader's People

Contributors

joshterrill 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

Watchers

 avatar  avatar  avatar  avatar

paywall-reader's Issues

Fix broken web.archive snapshots

It appears that recently there have been several sites that haven't been returning snapshots via the Way Back Machine archive API. As part of #3 I'll need to create unit tests for checking all of these sources and article parsing methods on some sort of a Github Action scheduler so that if things break in the future, I'm made aware of it sooner.

Blmbrg

Are you able to add bloomberg.com? Thanks in advance.

Unsupported sites?

It's mentioned that there's an Unsupported sites section, where can I find that?

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.