73 lines
5.5 KiB
HTML
73 lines
5.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
<title>paywall jump</title>
|
|
<link rel="stylesheet" type="text/css" media="all" charset="utf-8" href="acaro/css/common.css">
|
|
<link rel="stylesheet" type="text/css" media="screen" charset="utf-8" href="acaro/css/screen.css">
|
|
<link rel="stylesheet" type="text/css" media="print" charset="utf-8" href="acaro/css/print.css">
|
|
<style type="text/css">
|
|
ul.pagetitle{
|
|
display: inline;
|
|
margin: 0;
|
|
padding: 0;
|
|
font-size: 1.5em;
|
|
}
|
|
li.pagetitle{
|
|
display: inline;
|
|
margin: 0;
|
|
}
|
|
td.noborder {
|
|
border: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<table>
|
|
<tr>
|
|
<td class="noborder">
|
|
<img src="logo.png" width="85" height="85">
|
|
</td>
|
|
<td class="noborder">
|
|
<ul class="pagetitle">
|
|
<li class="pagetitle"><a class="backlink">paywall jump</a>
|
|
</ul>
|
|
<br><br>
|
|
[<a href="FrontPage.html">FrontPage</a>]
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<hr>
|
|
<div id="page">
|
|
<div dir="ltr" id="content" lang="en"><span class="anchor" id="top"></span>
|
|
<span class="anchor" id="line-1-1"></span><p class="line874">Come leggere il dannato articolo protetto da un paywall. <span class="anchor" id="line-2-1"></span><span class="anchor" id="line-3-1"></span><p class="line867">
|
|
<h2 id="add-on_per_browser">add-on per browser</h2>
|
|
<span class="anchor" id="line-4-1"></span><span class="anchor" id="line-5-1"></span><p class="line867"><a class="https" href="https://github.com/magnolia1234/bypass-paywalls-firefox-clean/blob/master/README.md">https://github.com/magnolia1234/bypass-paywalls-firefox-clean/blob/master/README.md</a> <span class="anchor" id="line-6-1"></span><span class="anchor" id="line-7-1"></span><p class="line867"><a class="https" href="https://github.com/iamadamdev/bypass-paywalls-firefox">https://github.com/iamadamdev/bypass-paywalls-firefox</a> <span class="anchor" id="line-8-1"></span><span class="anchor" id="line-9-1"></span><p class="line867"><a class="https" href="https://github.com/iamadamdev/bypass-paywalls-chrome">https://github.com/iamadamdev/bypass-paywalls-chrome</a> <span class="anchor" id="line-10-1"></span><span class="anchor" id="line-11-1"></span><p class="line867"><a class="https" href="https://lbolla.info/fuckrep">https://lbolla.info/fuckrep</a> <span class="anchor" id="line-12-1"></span><span class="anchor" id="line-13-1"></span><p class="line862">un <a class="https" href="https://rep.repubblica.it/pwa/intervista/2020/04/09/news/shoshana_zuboff_altro_che_privacy_le_app_per_il_controllo_della_pandemia_devono_essere_obbligatorie_come_i_vaccini_-253587046/">articolo con cui fare la prova..</a> <span class="anchor" id="line-14-1"></span><span class="anchor" id="line-15-1"></span><p class="line867">
|
|
<h2 id="uno_script_in_python">uno script in python</h2>
|
|
<span class="anchor" id="line-16-1"></span><span class="anchor" id="line-17-1"></span><p class="line874">Mi spiace ma non ricordo chi me l'ha passato. Comunque grazie! <span class="anchor" id="line-18-1"></span><span class="anchor" id="line-19-1"></span><p class="line867"><span class="anchor" id="line-20-1"></span><span class="anchor" id="line-21-1"></span><span class="anchor" id="line-22"></span><span class="anchor" id="line-23"></span><span class="anchor" id="line-24"></span><span class="anchor" id="line-25"></span><span class="anchor" id="line-26"></span><span class="anchor" id="line-27"></span><span class="anchor" id="line-28"></span><span class="anchor" id="line-29"></span><span class="anchor" id="line-30"></span><span class="anchor" id="line-31"></span><span class="anchor" id="line-32"></span><span class="anchor" id="line-33"></span><span class="anchor" id="line-34"></span><span class="anchor" id="line-35"></span><span class="anchor" id="line-36"></span><span class="anchor" id="line-37"></span><span class="anchor" id="line-38"></span><span class="anchor" id="line-39"></span><span class="anchor" id="line-40"></span><span class="anchor" id="line-41"></span><span class="anchor" id="line-42"></span><span class="anchor" id="line-43"></span><pre><span class="anchor" id="line-1"></span>incollare in ~/bin/saltafosso.py, chmod 755 saltafosso.py
|
|
<span class="anchor" id="line-2"></span>uso: saltafosso.py [link articolo]
|
|
<span class="anchor" id="line-3"></span>
|
|
<span class="anchor" id="line-4"></span>(da questa riga esclusa in poi)
|
|
<span class="anchor" id="line-5"></span>
|
|
<span class="anchor" id="line-6"></span>#!/usr/bin/env python
|
|
<span class="anchor" id="line-7"></span>
|
|
<span class="anchor" id="line-8"></span>import lxml.html
|
|
<span class="anchor" id="line-9"></span>import urllib2
|
|
<span class="anchor" id="line-10"></span>import re
|
|
<span class="anchor" id="line-11"></span>import sys
|
|
<span class="anchor" id="line-12"></span>
|
|
<span class="anchor" id="line-13"></span>def get_rep_text(url):
|
|
<span class="anchor" id="line-14"></span> text_url = re.sub(r'/pwa/', '/ws/detail/', url)
|
|
<span class="anchor" id="line-15"></span> page = urllib2.urlopen(text_url).read()
|
|
<span class="anchor" id="line-16"></span> root = lxml.html.fromstring(page)
|
|
<span class="anchor" id="line-17"></span> for div in root.xpath('//div[@class="paywall"]'):
|
|
<span class="anchor" id="line-18"></span> print div.text_content()
|
|
<span class="anchor" id="line-19"></span>
|
|
<span class="anchor" id="line-20"></span>if __name__ == '__main__':
|
|
<span class="anchor" id="line-21"></span> get_rep_text(sys.argv[1])</pre><span class="anchor" id="line-44"></span><span class="anchor" id="bottom"></span></div>
|
|
</div>
|
|
<hr>
|
|
Ultimo cambiamento: 10-04-2020
|
|
</body>
|
|
</html>
|