Closed bdunogier closed 5 years ago
It seems that Graby's configuration allows to rewrite urls on the fly. Wouldn'it be possible to use that for "abonnés" to redirect any lemonde.fr to abonnes.lemonde.fr?
Edit: I confirm that the redirection via the User Agent works perfectly (as expected), via the modification of HttpClient.php
'rewrite_url' => array(
'docs.google.com' => array('/Doc?' => '/View?'),
'tnr.com' => array('tnr.com/article/' => 'tnr.com/print/article/'),
'.m.wikipedia.org' => array('.m.wikipedia.org' => '.wikipedia.org'),
'm.vanityfair.com' => array('m.vanityfair.com' => 'www.vanityfair.com'),
'www.lemonde.fr' => array('www.lemonde.fr' => 'abonnes.lemonde.fr'),
),
However, it would work with everyone, no matter the presence of credentials or not.
I think Le Monde's laywers would have something to say about that.
I think Le Monde's laywers would have something to say about that.
I don't know if it could be possible to configure that in the graby-site-config instead that in the sources of graby directly, and that redirection to be done only if the login form checked the credentials. It is obvious that the proposed workaround here is an exploiting of a bug and that modifications should be made to not authorize anyone to download abonnes articles!
It is not yet possible to put condition for other option regarding url rewrite. But like for the monde diplomatique, maybe we can build a custom subscriber to change that: https://github.com/wallabag/guzzle-site-authenticator/blob/master/lib/Guzzle/FixupMondeDiplomatiqueUriSubscriber.php
Edit: related to issue https://github.com/wallabag/wallabag/issues/2909#issuecomment-410640134
Pushing to this upstream as I don't believe that this custom configuration belongs with the original repo.
Adds paywall config for lemonde.fr. But it doesn't "really" work, because of how their paywall is implemented. If you request
lemonde.fr
, you will always get the truncated version. If you requestabonnes.lemonde.fr
, you will always get the full version. Even if you don't have an account.Unless graby supports some kind of string substitution for the URL, then the only solution is to use the
abonnes.lemonfr.fr
url.