1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-07 16:15:32 +02:00

update lazy image fixing code

This commit is contained in:
Jan Lukas Gernert 2023-03-27 21:10:48 +02:00
parent 2189f527d7
commit d8a9d0a757
17 changed files with 7566 additions and 25 deletions

View file

@ -13,7 +13,7 @@
<meta itemprop="url" content="https://cdn.citylab.com/media/img/citylab/2019/04/mr1/300.jpg?mod=1556645448"> <meta itemprop="url" content="https://cdn.citylab.com/media/img/citylab/2019/04/mr1/300.jpg?mod=1556645448">
<picture> <picture>
<source srcset="https://cdn.citylab.com/media/img/citylab/2019/04/mr1/300.jpg?mod=1556645448" media="(max-width: 575px)"></source> <source srcset="https://cdn.citylab.com/media/img/citylab/2019/04/mr1/300.jpg?mod=1556645448" media="(max-width: 575px)"></source>
<img src="https://cdn.citylab.com/media/img/citylab/2019/04/mr1/300.jpg?mod=1556645448" alt=""> <img src="https://cdn.citylab.com/media/img/citylab/2019/04/mr1/300.jpg?mod=1556645448" alt="" srcset="https://cdn.citylab.com/media/img/citylab/2019/04/mr1/300.jpg?mod=1556645448">
</picture> </picture>
<figcaption> <figcaption>
@ -117,7 +117,7 @@
</p> </p>
<figure> <figure>
<picture> <picture>
<img alt="" data-srcset="https://cdn.theatlantic.com/assets/media/img/posts/2019/04/AP_8912060228/cbd32b0e1.jpg"> <img alt="" data-srcset="https://cdn.theatlantic.com/assets/media/img/posts/2019/04/AP_8912060228/cbd32b0e1.jpg" src="https://cdn.theatlantic.com/assets/media/img/posts/2019/04/AP_8912060228/cbd32b0e1.jpg">
</picture> </picture>
<figcaption> <figcaption>
Workers remove a hammer and sickle from a neon sign that reads “Glory to Communism,” Workers remove a hammer and sickle from a neon sign that reads “Glory to Communism,”
@ -167,7 +167,7 @@
</p> </p>
<figure> <figure>
<picture> <picture>
<img alt="" data-srcset="https://cdn.theatlantic.com/assets/media/img/posts/2019/04/AP_945361213236/888fdd750.jpg"> <img alt="" data-srcset="https://cdn.theatlantic.com/assets/media/img/posts/2019/04/AP_945361213236/888fdd750.jpg" src="https://cdn.theatlantic.com/assets/media/img/posts/2019/04/AP_945361213236/888fdd750.jpg">
</picture> </picture>
<figcaption> <figcaption>
Martin Wartman, a student at Northern Kentucky University, works on a neon sign at Martin Wartman, a student at Northern Kentucky University, works on a neon sign at

View file

@ -1,7 +1,7 @@
<article><DIV id="readability-page-1"> <article><DIV id="readability-page-1">
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="Illustration for article titled The Spectacular Story Of Metroid"> <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="Illustration for article titled The Spectacular Story Of Metroid">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Natus eaque totam provident obcaecati nisi praesentium iusto velit fuga debitis quidem ut repellat corrupti, eligendi inventore quibusdam perspiciatis delectus omnis pariatur excepturi quasi fugit? A adipisci natus nostrum, qui aperiam, at culpa corrupti autem enim earum vitae. Nostrum et officiis facere ex recusandae tenetur, delectus odit provident soluta id perferendis ducimus quibusdam corporis rerum voluptatem architecto sequi beatae quod mollitia voluptatibus earum tempora inventore ut. Deserunt reprehenderit recusandae nostrum, eaque fuga cum, repellat, perspiciatis ducimus in non consequatur ratione. Sint rerum necessitatibus deleniti odio earum voluptatum eos modi ab dolor minus.</p> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Natus eaque totam provident obcaecati nisi praesentium iusto velit fuga debitis quidem ut repellat corrupti, eligendi inventore quibusdam perspiciatis delectus omnis pariatur excepturi quasi fugit? A adipisci natus nostrum, qui aperiam, at culpa corrupti autem enim earum vitae. Nostrum et officiis facere ex recusandae tenetur, delectus odit provident soluta id perferendis ducimus quibusdam corporis rerum voluptatem architecto sequi beatae quod mollitia voluptatibus earum tempora inventore ut. Deserunt reprehenderit recusandae nostrum, eaque fuga cum, repellat, perspiciatis ducimus in non consequatur ratione. Sint rerum necessitatibus deleniti odio earum voluptatum eos modi ab dolor minus.</p>
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="Illustration for article titled The Spectacular Story Of Metroid" data-srcset="https://i.kinja-img.com/gawker-media/image/upload/c_fill,f_auto,fl_progressive,g_center,h_80,q_80,w_80/18zu12g5xzyxojpg.jpg 80w, https://i.kinja-img.com/gawker-media/image/upload/c_fit,fl_progressive,q_80,w_320/18zu12g5xzyxojpg.jpg 320w, https://i.kinja-img.com/gawker-media/image/upload/c_fit,f_auto,fl_progressive,q_80,w_470/18zu12g5xzyxojpg.jpg 470w, https://i.kinja-img.com/gawker-media/image/upload/c_scale,f_auto,fl_progressive,q_80,w_800/18zu12g5xzyxojpg.jpg 800w"> <img alt="Illustration for article titled The Spectacular Story Of Metroid" data-srcset="https://i.kinja-img.com/gawker-media/image/upload/c_fill,f_auto,fl_progressive,g_center,h_80,q_80,w_80/18zu12g5xzyxojpg.jpg 80w, https://i.kinja-img.com/gawker-media/image/upload/c_fit,fl_progressive,q_80,w_320/18zu12g5xzyxojpg.jpg 320w, https://i.kinja-img.com/gawker-media/image/upload/c_fit,f_auto,fl_progressive,q_80,w_470/18zu12g5xzyxojpg.jpg 470w, https://i.kinja-img.com/gawker-media/image/upload/c_scale,f_auto,fl_progressive,q_80,w_800/18zu12g5xzyxojpg.jpg 800w" srcset="https://i.kinja-img.com/gawker-media/image/upload/c_fill,f_auto,fl_progressive,g_center,h_80,q_80,w_80/18zu12g5xzyxojpg.jpg 80w, https://i.kinja-img.com/gawker-media/image/upload/c_fit,fl_progressive,q_80,w_320/18zu12g5xzyxojpg.jpg 320w, https://i.kinja-img.com/gawker-media/image/upload/c_fit,f_auto,fl_progressive,q_80,w_470/18zu12g5xzyxojpg.jpg 470w, https://i.kinja-img.com/gawker-media/image/upload/c_scale,f_auto,fl_progressive,q_80,w_800/18zu12g5xzyxojpg.jpg 800w">
<p>Quae veniam recusandae vel cupiditate doloribus pariatur, dolorum saepe hic quos mollitia harum nihil molestias magni modi maiores? Ea accusamus velit vel doloremque pariatur voluptate? Consequuntur dolorum fugit facere architecto eveniet beatae eligendi rerum nisi maxime, voluptatum a repellendus perferendis dolores eius repudiandae accusamus animi eum esse adipisci voluptatibus incidunt necessitatibus! Adipisci id, quos libero dolor odit dignissimos et, cum explicabo est facere aliquid mollitia! Iure nihil nobis beatae quibusdam, dolor saepe reiciendis, exercitationem hic accusamus quasi commodi modi molestiae ipsum, maxime non nesciunt deserunt itaque quo cupiditate rerum ipsa ad minus vel quod. Earum dolorum velit aut minus hic?</p> <p>Quae veniam recusandae vel cupiditate doloribus pariatur, dolorum saepe hic quos mollitia harum nihil molestias magni modi maiores? Ea accusamus velit vel doloremque pariatur voluptate? Consequuntur dolorum fugit facere architecto eveniet beatae eligendi rerum nisi maxime, voluptatum a repellendus perferendis dolores eius repudiandae accusamus animi eum esse adipisci voluptatibus incidunt necessitatibus! Adipisci id, quos libero dolor odit dignissimos et, cum explicabo est facere aliquid mollitia! Iure nihil nobis beatae quibusdam, dolor saepe reiciendis, exercitationem hic accusamus quasi commodi modi molestiae ipsum, maxime non nesciunt deserunt itaque quo cupiditate rerum ipsa ad minus vel quod. Earum dolorum velit aut minus hic?</p>
<img src="data:image/svg+xml;utf8,&lt;svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'&gt;&lt;path%20d='M512%20512H0V0h512v512z'/&gt;&lt;/svg&gt;"> <img src="data:image/svg+xml;utf8,&lt;svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'&gt;&lt;path%20d='M512%20512H0V0h512v512z'/&gt;&lt;/svg&gt;">
<p>Quidem nam tempore ex harum repellat modi expedita quia rerum est ut ullam, quisquam repudiandae at dolorum. Sint atque fugit facere id blanditiis dolor omnis rem repudiandae, laboriosam unde delectus illo voluptate dolorem consectetur rerum expedita quas debitis deleniti iure amet. At sequi distinctio facere eaque, esse molestiae tenetur, unde sapiente fugit minus eos ex aperiam atque? Animi soluta, dolorem sequi doloremque pariatur in. Impedit, voluptates dolorem natus perspiciatis pariatur eligendi labore rerum facilis est error. Illum eveniet nostrum atque nobis molestiae expedita perferendis, esse ullam corrupti sit explicabo beatae. Sapiente aliquid nesciunt reiciendis incidunt cumque et officiis minus aliquam?</p> <p>Quidem nam tempore ex harum repellat modi expedita quia rerum est ut ullam, quisquam repudiandae at dolorum. Sint atque fugit facere id blanditiis dolor omnis rem repudiandae, laboriosam unde delectus illo voluptate dolorem consectetur rerum expedita quas debitis deleniti iure amet. At sequi distinctio facere eaque, esse molestiae tenetur, unde sapiente fugit minus eos ex aperiam atque? Animi soluta, dolorem sequi doloremque pariatur in. Impedit, voluptates dolorem natus perspiciatis pariatur eligendi labore rerum facilis est error. Illum eveniet nostrum atque nobis molestiae expedita perferendis, esse ullam corrupti sit explicabo beatae. Sapiente aliquid nesciunt reiciendis incidunt cumque et officiis minus aliquam?</p>

View file

@ -16,7 +16,7 @@
<ul> <ul>
<li> <li>
<div id="attachment_994"> <div id="attachment_994">
<p><a href="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_0.png" target="_blank"><img aria-describedby="caption-attachment-994" loading="lazy" src="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_0.png" alt='The about:restartrequired error page, saying "Sorry. We just need to do one small thing to keep going. Nightly has just been updated in the background. Click Restart Nightly to complete the update. We will restore all your pages, windows and tabs afterwards, so you can be on your way quickly.", followed by a button to restart Nightly.' width="1600" height="805"></a></p> <p><a href="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_0.png" target="_blank"><img aria-describedby="caption-attachment-994" loading="lazy" src="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_0.png" alt='The about:restartrequired error page, saying "Sorry. We just need to do one small thing to keep going. Nightly has just been updated in the background. Click Restart Nightly to complete the update. We will restore all your pages, windows and tabs afterwards, so you can be on your way quickly.", followed by a button to restart Nightly.' width="1600" height="805" srcset="https://blog.nightly.mozilla.org/files/2020/12/headlines85_0.png 1600w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_0-300x151.png 300w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_0-600x302.png 600w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_0-768x386.png 768w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_0-1536x773.png 1536w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_0-1000x503.png 1000w" sizes="(max-width: 1600px) 100vw, 1600px"></a></p>
<p id="caption-attachment-994"> <p id="caption-attachment-994">
Users who run multiple user profiles concurrently will probably see this less! Users who run multiple user profiles concurrently will probably see this less!
</p> </p>
@ -119,7 +119,7 @@
<ul> <ul>
<li> <li>
<div id="attachment_995"> <div id="attachment_995">
<p><a href="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_1.png" target="_blank"><img aria-describedby="caption-attachment-995" loading="lazy" src="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_1.png" alt="A table showing the total number of remaining bugs for the MVP to make the DevTools Fission-compatible." width="1600" height="192"></a></p> <p><a href="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_1.png" target="_blank"><img aria-describedby="caption-attachment-995" loading="lazy" src="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_1.png" alt="A table showing the total number of remaining bugs for the MVP to make the DevTools Fission-compatible." width="1600" height="192" srcset="https://blog.nightly.mozilla.org/files/2020/12/headlines85_1.png 1600w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_1-300x36.png 300w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_1-600x72.png 600w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_1-768x92.png 768w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_1-1536x184.png 1536w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_1-1000x120.png 1000w" sizes="(max-width: 1600px) 100vw, 1600px"></a></p>
<p id="caption-attachment-995"> <p id="caption-attachment-995">
Our DevTools are ready for Fission (out-of-process iframes)! Our DevTools are ready for Fission (out-of-process iframes)!
</p> </p>
@ -132,7 +132,7 @@
<ul> <ul>
<li> <li>
<div id="attachment_996"> <div id="attachment_996">
<p><a href="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_2.png" target="_blank"><img aria-describedby="caption-attachment-996" loading="lazy" src="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_2.png" alt="A table showing the total number of remaining bugs for the MVP to make Marionette Fission-compatible." width="1600" height="189"></a></p> <p><a href="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_2.png" target="_blank"><img aria-describedby="caption-attachment-996" loading="lazy" src="https://3sgkpvh31s44756j71xlti9b-wpengine.netdna-ssl.com/files/2020/12/headlines85_2.png" alt="A table showing the total number of remaining bugs for the MVP to make Marionette Fission-compatible." width="1600" height="189" srcset="https://blog.nightly.mozilla.org/files/2020/12/headlines85_2.png 1600w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_2-300x35.png 300w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_2-600x71.png 600w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_2-768x91.png 768w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_2-1536x181.png 1536w, https://blog.nightly.mozilla.org/files/2020/12/headlines85_2-1000x118.png 1000w" sizes="(max-width: 1600px) 100vw, 1600px"></a></p>
<p id="caption-attachment-996"> <p id="caption-attachment-996">
Marionette, the framework that allows Firefox to be tested with automation, is now Fission compatible too! Marionette, the framework that allows Firefox to be tested with automation, is now Fission compatible too!
</p> </p>

View file

@ -1,4 +1,4 @@
<article><div name="ef8c" id="readability-page-1"> <article><div id="readability-page-1">
<div> <div>
<figure name="b9ad" id="b9ad"> <figure name="b9ad" id="b9ad">
<div> <div>

View file

@ -214,7 +214,7 @@
<div class="postContent-inner"> <div class="postContent-inner">
<div class="notesSource"> <div class="notesSource">
<div class="postField postField--body"> <div class="postField postField--body">
<section name="ef8c" class=" section--first section--last"> <section class=" section--first section--last">
<div class="section-divider layoutSingleColumn"> <div class="section-divider layoutSingleColumn">
<hr class="section-divider"/> <hr class="section-divider"/>
</div> </div>

View file

@ -0,0 +1,96 @@
<article><DIV id="readability-page-1"><article id="nota" itemscope="" itemtype="http://schema.org/NewsArticle" data-login="false" data-loginposwall="false" data-asociarposwall="false">
<div>
<p itemprop="description">Los pueblos indígenas reclaman por derechos que permanecen
incumplidos, por eso es más eficiente canalizar la protesta que reprimirla</p>
</div>
<section id="cuerpo" itemprop="articleBody">
<p>Abdullah Ocalan, el líder independentista kurdo, desembarcó en Italia en noviembre de
1998 y pidió asilo político. Arrastraba un pedido de captura de Turquía, donde era acusado por
terrorismo. El ex comunista Massimo D'Alema, recién asumido, dudaba. Acoger a Ocalan implicaba comprarse
un problema con un aliado de la OTAN e importar un conflicto ajeno, pero deportarlo lo exponía a la pena
de muerte, legal en Turquía pero inadmisible en la Unión Europea. Optó por la estrecha avenida del
medio: se ignoró el mandato de captura al tiempo que se negó el asilo, presionando a Ocalan para que se
fuera por las suyas. Tras una carambola a tres bandas, fue capturado por agentes turcos en Kenia, donde
se encontraba bajo la protección del embajador griego, mientras intentaba abordar un avión hacia
Holanda. Desde febrero de 1999 permanece en una cárcel de máxima seguridad en la isla turca de
Imrali.</p>
<p>Uno de los autores de esta columna vivía en Italia en esa época y siguió la crisis de cerca; el otro la
estudió en profundidad, años más tarde. Pero no hacía falta: cualquiera puede encontrar esta información
a un clic de distancia. Eso fue lo que no hizo un periodista de un diario argentino, que no es la
nacion. La semana pasada se publicaron extractos de un "informe de carácter secreto" que mencionaba
supuestos contactos internacionales de organizaciones mapuches. Entre ellos aparecía Ocalan, a quien el
informe ubicó "con domicilios en Palermo y en el centro porteño", y aseguraba incluso que había sido
visto "en Neuquén, Río Negro y Chubut durante el juicio a Jones Huala".</p>
<figure>
<p><span title="Ampliar imagen"></span><img src="http://bucket2.glanacion.com/anexos/fotos/77/conflicto-mapuche-2585177w280.jpg"></p>
<figcaption id="epigrafe2585177">Foto: LA NACION</figcaption>
</figure>
<p>Esta falsa noticia fue la más rocambolesca de una larga cadena. Dos hechos quedaron en evidencia:
primero, que hay periodistas que no chequean la información; segundo, que los servicios de inteligencia
los utilizan para manipular la agenda pública. Y sobre los servicios hay dos posibilidades: o son burros
o son perversos. Las opciones no son excluyentes, aunque cualquiera alcanza para tornarlos indignos de
confianza. Sin embargo, de ellos proviene la información que alimenta a muchos medios de comunicación y,
aún más grave, al Estado argentino.</p>
<p>El reguero de noticias falsas y vínculos brumosos tiene, paradójicamente, un objetivo prístino: asociar
la acción de los grupos mapuches con el terrorismo internacional. Comunicadores, analistas y escritores
alineados con el discurso oficial llegaron a relacionar las ideas de las organizaciones patagónicas con
las de Estado Islámico (ISIS) de Irak y Siria. El terrorismo carece de definiciones consensuales y ha
sido utilizado para emparentar cosas bien diferentes. Aunque el líder mapuche más radicalizado (y menos
representativo) declare que propician "un proceso de construcción de autonomía sin pedirle permiso al
Estado", vincular a un grupo que reclama tierras en la región de sus ancestros con otro que busca
gobernar el mundo según sus normas religiosas y ha masacrado a miles de personas requiere de una
operación intelectual tan audaz como inadecuada.</p>
<p>La asociación con el movimiento kurdo, en cambio, asoma menos inverosímil. Desde su arresto, Ocalan
transformó su pensamiento: de una visión nacionalista con inspiración estalinista evolucionó al
confederalismo democrático, una propuesta de organización comunal, ecologista, más apegada a las raíces
locales que a las fronteras nacionales. Parece lógico que esas ideas resuenen en agrupamientos
indígenas, que reivindican una organización anterior a la consolidación de los Estados sudamericanos.
Los paralelos, sin embargo, terminan allí. En Chile, donde el conflicto ha tenido su desarrollo más
dramático, la Sociedad de Fomento Agrícola denunció en 2014 que los insurrectos causaron daños por 10
millones de dólares y la muerte de tres agricultores y un carabinero a lo largo de 15 años; en la
Argentina, por ahora, se registran actos de vandalismo, ocupaciones de tierras y cortes de rutas
aislados. En contraste, el conflicto entre el Partido de los Trabajadores del Kurdistán y la República
de Turquía se cobró cerca de 40.000 vidas en los años 90 y lleva más de 2000 desde la reanudación de
hostilidades en 2015.</p>
<p>Consultada sobre esta desproporción, una fuente de los servicios nos la resumió así: "La estrategia de la
Coordinadora Arauco-Malleco (CAM), de Chile, y ahora de la Resistencia Ancestral Mapuche (RAM), más que
matar directamente, es realizar sabotajes, movilizaciones, ataques a iglesias y empresas y mucha
prensa". ¡En Medio Oriente pagarían por un terrorismo así! Ningún hecho de violencia debe ser
minimizado, pero las analogías no resisten prueba.</p>
<p>La "cuestión mapuche" es social antes que policial. La Constitución manda "reconocer la preexistencia
étnica y cultural de los pueblos indígenas argentinos. Garantizar el respeto a su identidad?; reconocer
la personería jurídica de sus comunidades, y la posesión y propiedad comunitarias de las tierras que
tradicionalmente ocupan; y regular la entrega de otras aptas y suficientes para el desarrollo humano".
Estos derechos permanecen incumplidos. Y no son un capricho chavista: los países que reputamos serios
también los reconocen. En Estados Unidos, las reservaciones indígenas ocupan 80.000 kilómetros
cuadrados, el 1,3% de la superficie del país (y 400 veces la superficie de la ciudad de Buenos Aires).
En Canadá, unas 2300 reservas ocupan 28.000 kilómetros cuadrados. Australia otorga a los pueblos
indígenas más de la mitad de los territorios del norte del país y son los nativos quienes negocian con
las empresas mineras los permisos para que operen en sus tierras. En Nueva Zelanda existen tribunales
especiales con jurisdicción sobre las tierras ancestrales de los maoríes; una de sus ventajas es que
empoderan a los aborígenes individualmente, liberándolos del yugo de los caciques.</p>
<p>La protesta social es indisociable de la democracia. Cuando desborda, recanalizarla es más eficiente que
reprimirla: ahí reside el arte del acuerdo. En la Argentina la tarea es delicada porque pocos confían en
la imparcialidad de las instituciones. Entonces, cada actor reivindica sus intereses con los medios de
que dispone: los sindicatos hacen huelga, los estudiantes toman colegios, los empresarios cierran las
fábricas y todos hacen piquetes. El politólogo Samuel Huntington definía una sociedad así como
pretoriana y el jurista Carlos Nino llamó a la Argentina "un país al margen de la ley". Al movilizarse
por sus derechos y desconfiar del Estado, la comunidad mapuche se demuestra bien argentina.</p>
<p>Las cinco provincias patagónicas tienen una población similar a la de La Matanza. A diferencia de los
Estados Unidos, que se integraron hacia el oeste otorgando parcelas de tierra a los colonizadores, y de
Brasil, donde el rol de ocupación y desarrollo territorial fue cumplido por las fuerzas armadas, la
Argentina obvió la tarea integradora tras consolidar su soberanía a finales del siglo XX. Hoy sobra
tierra y falta gente. Gobernar sigue siendo poblar, pero también integrar.</p>
<p>Seamos claros: ningún individuo u organización tiene derecho a violar la ley. Pero el problema histórico
del Estado argentino no fue tanto quiénes lo desafiaron como quiénes lo gobernaron. Cambiemos.</p>
<p><b><i>Andrés Malamud es politólogo e investigador en la Universidad de Lisboa. Martín Schapiro es abogado
administrativista y analista internacional</i></b></p>
</section>
</article></DIV></article>

View file

@ -0,0 +1,700 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<link rel="amphtml"
href="http://www.lanacion.com.ar/2089096-una-solucion-no-violenta-para-la-cuestion-mapuche/amp/2089096"></link>
<title>Una solución no violenta para la cuestión mapuche - 07.12.2017 - LA NACION </title>
<link rel="stylesheet" type="text/css" href="http://static.glanacion.com/v1/ln/css/ln.201711231106.min.css"></link>
<link rel="stylesheet" type="text/css"
href="http://static.glanacion.com/v1/ln/css/ln.nota.201711231106.min.css"></link>
<link rel="stylesheet" type="text/css"
href="http://especiales.lanacion.com.ar/multimedia/proyectos/css/iframes.css"></link>
<meta property="fb:pages" content="71339054219"></meta>
<meta name="copyright" content="LA NACION"></meta>
<meta name="title" content="Una solución no violenta para la cuestión mapuche - 07.12.2017"></meta>
<meta name="description"
content="Una solución no violenta para la cuestión mapuche | Los pueblos indígenas reclaman por derechos que permanecen incumplidos, por eso es más eficiente canalizar la protesta que reprimirla - LA NACION"></meta>
<meta name="keywords"
content="Una solución no violenta para la cuestión mapuche, Opinión, Nota de Opinion, Actualidad política, Conflicto mapuche"></meta>
<meta name="news_keywords"
content="Una solución no violenta para la cuestión mapuche, Opinión, Nota de Opinion, Actualidad política, Conflicto mapuche"></meta>
<meta property="fb:admins" content="1069203912"></meta>
<meta property="fb:app_id" content="205326199490321"></meta>
<meta property="og:type" content="article"></meta>
<meta property="og:title" content="Una solución no violenta para la cuestión mapuche"></meta>
<meta property="og:description"
content="Los pueblos indígenas reclaman por derechos que permanecen incumplidos, por eso es más eficiente canalizar la protesta que reprimirla"></meta>
<meta property="og:image" content="http://bucket.glanacion.com/anexos/fotos/77/2585177.jpg"></meta>
<meta name="twitter:card" content="summary"></meta>
<meta name="twitter:site" content="@LANACION"></meta>
<meta name="twitter:title" content="Una solución no violenta para la cuestión mapuche"></meta>
<meta name="twitter:description"
content="Abdullah Ocalan, el líder independentista kurdo, desembarcó en Italia en noviembre de 1998 y pidió asilo político. Arrastraba un pedido de captura de Turquía, donde era acusado por terrorismo. El ex comunista Massimo D'Alema, recién asumido, dudaba. Acoger a Ocalan implicaba comprarse un problema con un aliado de la OTAN e importar un conflicto ajeno, pero deportarlo lo exponía a la pena de muerte, legal en Turquía pero inadmisible en la Unión Europea. Optó por la estrecha avenida del medio: se ignoró el mandato de captura al tiempo que se negó el asilo, presionando a Ocalan para que se fuera por las suyas. Tras una carambola a tres bandas, fue capturado por agentes turcos en Kenia, donde se encontraba bajo la protección del embajador griego, mientras intentaba abordar un avión hacia Holanda. Desde febrero de 1999 permanece en una cárcel de máxima seguridad en la isla turca de Imrali."></meta>
<meta name="twitter:image" content="http://bucket2.glanacion.com/anexos/fotos/77/2585177.jpg"></meta>
<meta name="copyright" content="2015 LA NACION"></meta>
<meta name="application-name" content="LA NACION"></meta>
<meta name="msapplication-starturl" content="http://www.lanacion.com.ar/"></meta>
<meta name="msapplication-tooltip" content="Noticias actualizadas las 24 hs."></meta>
<meta name="msapplication-window" content="width=800;height=600"></meta>
<meta name="msapplication-navbutton-color" content="#0EA8DC"></meta>
<meta name="msapplication-task"
content="name=Ultimas noticias;action-uri=http://www.lanacion.com.ar/ultimas-noticias;icon-uri=http://www.lanacion.com.ar/item1.ico"></meta>
<meta name="msapplication-task"
content="name=Tránsito;action-uri=http://servicios.lanacion.com.ar/transito;icon-uri=http://www.lanacion.com.ar/item2.ico"></meta>
<meta name="msapplication-task"
content="name=Pronóstico;action-uri=http://servicios.lanacion.com.ar/informacion-general/pronostico;icon-uri=http://www.lanacion.com.ar/item3.ico"></meta>
<meta name="msapplication-task"
content="name=Horóscopo;action-uri=http://servicios.lanacion.com.ar/horoscopo;icon-uri=http://www.lanacion.com.ar/item4.ico"></meta>
<meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>
<meta name="cXenseParse:pageclass" content="article"></meta>
<link rel="canonical"
href="http://www.lanacion.com.ar/2089096-una-solucion-no-violenta-para-la-cuestion-mapuche"></link>
<link rel="alternate" href="android-app://app.lanacion.activity/http/www.lanacion.com.ar/2089096"></link>
</head>
<body>
<a href="http://servicios.lanacion.com.ar/solo-texto" class="sinBarreras">Si usted es una persona con dificultades
visuales, navegue el sitio desde aquí</a>
<div id="alertaDisclaimer" class="mensajeEx8" style="display:none">NO SOPORTADO</div>
<header id="header" itemscope="" itemtype="http://schema.org/WPHeader">
<section class="banners">
<center>
<aside class="banner top" data-adpos="top" itemscope="" itemtype="http://schema.org/WPAdBlock"></aside>
</center>
<aside class="banner lateral-izq" data-adpos="lateralIzq" itemscope=""
itemtype="http://schema.org/WPAdBlock"></aside>
<aside class="banner lateral-der" data-adpos="lateralDer" itemscope=""
itemtype="http://schema.org/WPAdBlock"></aside>
</section>
<section class="cabezal interna floatFix">
<div class="btn-secciones" onclick="_gaq.push(['_trackEvent','CabezalLN8','cabezal','Menu']);">
<button id="boton-menu" class="icon-menu-mobile"></button>
<span>MENÚ</span></div>
<a class="logo" href="/" onclick="_gaq.push(['_trackEvent','CabezalLN8','cabezal','LANACION']);"
title="LA NACION"></a>
<section class="tema">
<section class="encabezado"><h2><a onclick="_gaq.push(['_trackEvent','CabezalLN8','Acu','tag']);"
href="/conflicto-mapuche-t62235">Conflicto mapuche</a></h2>
<div class="seguir f-btnSeguir" data-tagId="62235" data-tipoTag="7"><span>SEGUIR</span><b
class="icon-mas"></b></div>
</section>
</section>
<aside class="banner auspicio" data-adpos="logo_cabezal"></aside>
<section class="login logueado">
<ul class="floatFix">
<li id="cajaUsuario" class="usuario">
<div id="cant-notas" class="notas-siguiendo floatFix"></div>
<div class="loginLogout floatFix"><span id="usuario"></span></div>
</li>
</ul>
<div class="notas-preferencias"></div>
</section>
<div class="herramientas floatFix f-herramientasSociales">
<button class="icon-facebook" title="Compartir en Facebook"
data-evento="LN.Compartir.popUpFacebookCabezal();"></button>
<button class="icon-twitter" title="Compartir en Twitter"
data-evento="LN.Compartir.popUpTwitterCabezal();"></button>
<span class="extras"><button class="icon-download f-download" title="Descargar"
onclick="_gaq.push(['_trackEvent','NotaLN8','herramientas','pdf']);"></button><button
class="icon-print" title="Imprimir" data-evento="print();"
onclick="_gaq.push(['_trackEvent','NotaLN8','herramientas','imprimir']);"></button><button
class="icon-mail f-enviarMail" title="Enviar por mail"
onclick="_gaq.push(['_trackEvent','NotaLN8','herramientas','mail']);"></button></span>
<div class="icon-flecha-abajo">
<div class="desplegable"><span class="pico"></span>
<div class="floatFix">
<button class="icon-download f-download" title="Descargar"
onclick="_gaq.push(['_trackEvent','NotaLN8','herramientas','pdf']);"></button>
<button class="icon-print" title="Imprimir" data-evento="print();"
onclick="_gaq.push(['_trackEvent','NotaLN8','herramientas','imprimir']);"></button>
<button class="icon-mail f-enviarMail" title="Enviar por mail"
onclick="_gaq.push(['_trackEvent','NotaLN8','herramientas','mail']);"></button>
</div>
</div>
</div>
</div>
<div id="troncal-movil" class="floatFix" name="top">
<nav class="desplegable" id="topico-movil">
<section class="buscador">
<div>
<form onkeypress="javascript:Buscar(self.document.buscarsimpleformMovil.cadena-movil.value, event.keyCode);"
name="buscarsimpleformMovil" method="post" action="" itemprop="potentialAction"
itemscope="itemscope" itemtype="http://schema.org/SearchAction" target="_blank">
<span class="icon-buscar" onclick="javascript:Buscar($('#cadena-movil').val(),13);"> </span><span
class="icon-cerrar" onclick="$('.buscador').removeClass('expandido');"></span><span
class="boton-buscar"
onclick="javascript:Buscar($('#cadena-movil').val(),13);">BUSCAR</span></form>
</div>
</section>
<div class="floatFix">
<div class="columnaUno"><a href="/ultimas-noticias" class="">Últimas Noticias</a><a
href="/sociedad">Sociedad</a><a href="/politica">Política</a><a href="/el-mundo">El
Mundo</a><a href="/opinion">Opinión</a></div>
<div class="columnaDos"><a href="/mas-popular">Más Leídas</a><a href="/buenos-aires">Buenos
Aires</a><a href="/seguridad">Seguridad</a><a href="/data">La Nacion Data</a><a
href="/editorial-t54796">Editoriales</a></div>
</div>
<div class="floatFix">
<div class="columnaUno">
<div class="tit">Canales:</div>
<a href="/comunidad-de-negocios">Negocios</a><a href="/deportes">Deportes</a></div>
<div class="columnaDos"><a href="/vida-y-ocio-t54328">Vida y ocio</a><a href="/ideas">Ideas</a><a
href="/espectaculos">Espectáculos</a></div>
</div>
<div class="primero floatFix caja-lnmas"><a title="LN+" class="descrip-lnMAs"
href="http://lnmas.lanacion.com.ar/"
onclick="_gaq.push(['_trackEvent','troncal-movilLN8','nav','LN+']);"
target="_blank">
<svg version="1.1" id="Layer_1" x="0" y="0" width="30" height="20" viewBox="202.43 250.51 475.03 283.09" enable-background="new 202.427 250.514 475.03 283.087" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<linearGradient id="color1" gradientUnits="userSpaceOnUse" x1="500.53" y1="544.93" x2="500.53" y2="317.79" gradientTransform="matrix(1 0 0 -1 0 851.3936)"><stop offset="0" stop-color="#3CC3DD" /><stop offset="0.23" stop-color="#38C0DA" /><stop offset="0.44" stop-color="#24B8D5" /><stop offset="0.63" stop-color="#00ACCC" /><stop offset="0.81" stop-color="#009DC1" /><stop offset="0.99" stop-color="#008BB4" /><stop offset="1" stop-color="#008AB2" /></linearGradient>
<polygon fill="url(#color1)" points="479.73 306.46 382.68 306.46 382.68 326.57 410.4 326.57 591.01 533.6 618.39 533.6 618.39 469.04 " />
<linearGradient id="color2" gradientUnits="userSpaceOnUse" x1="306.42" y1="544.93" x2="306.42" y2="317.79" gradientTransform="matrix(1 0 0 -1 0 851.3936)"><stop offset="0" stop-color="#3CC3DD" /><stop offset="0.23" stop-color="#38C0DA" /><stop offset="0.44" stop-color="#24B8D5" /><stop offset="0.63" stop-color="#00ACCC" /><stop offset="0.81" stop-color="#009DC1" /><stop offset="0.99" stop-color="#008BB4" /><stop offset="1" stop-color="#008AB2" /></linearGradient>
<path fill="url(#color2)" d="M327.21 513.5c0 0-26.06 0.05-27.73 0V326.57h41.6v-20.1H202.43v20.1h41.6V513.5h-41.6v20.1h207.98V448.24h-13.86C397.29 490.05 383.75 512.41 327.21 513.5z" />
<polygon fill="#00BADD" points="677.46 306.46 621.51 306.46 621.51 250.51 601.41 250.51 601.41 306.46 545.45 306.46 545.45 326.57 601.41 326.57 601.41 382.52 621.51 382.52 621.51 326.57 677.46 326.57 " />
</svg>
</a><a title="LN+" class="descrip-lnMAs" href="http://lnmas.lanacion.com.ar/"
onclick="_gaq.push(['_trackEvent','troncal-movilLN8','nav','LN+']);" target="_blank">TODOS LOS
PROGRAMAS</a></div>
<div class="primero floatFix">
<div class="columnaUno"><a href="/edicion-impresa">Edición Impresa</a></div>
<div class="columnaDos"><a href="https://club.lanacion.com.ar/" class="clubMenu" target="_blank">Club
LA NACION</a></div>
</div>
<div class="floatFix">
<div class="columnaUno">
<div class="tit">Servicios:</div>
<a href="http://servicios.lanacion.com.ar/horoscopo" target="_blank">Horóscopo</a><a
href="http://servicios.lanacion.com.ar/pronostico-del-tiempo" target="_blank">Pronóstico</a><a
href="http://servicios.lanacion.com.ar/loterias" target="_blank">Loterías</a><a
href="http://servicios.lanacion.com.ar/feriados/2016" target="_blank">Feriados</a><a
href="http://servicios.lanacion.com.ar/edicion-impresa/avisos-funebres" target="_blank">Fúnebres</a>
</div>
<div class="columnaDos"><a href="http://servicios.lanacion.com.ar/transito"
target="_blank">Tránsito</a><a href="http://guia.lanacion.com.ar/cine"
target="_blank">Guía de Cine</a><a
href="http://guia.lanacion.com.ar/teatro" target="_blank">Guía de Teatro</a><a href="/humor"
target="_blank">Humor</a><a
href="http://servicios.lanacion.com.ar/sudoku-online" target="_blank">Sudoku</a></div>
</div>
<div class="primero floatFix">
<div class="columnaUno"><a href="https://ingresar.lanacion.com.ar/acceso-digital/"
class="suscribite"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','suscribite']);">Suscribite</a>
</div>
</div>
</nav>
</div>
</section>
<section class="menu-secciones" style="display:none;" id="desplegable">
<div class="menu-internas">
<nav class="principal"><span class="nuevo-menu-canales"><section class="buscador"><div><form
onkeypress="javascript:Buscar(self.document.buscarsimpleform.cadena.value, event.keyCode);"
name="buscarsimpleform" method="post" action="" itemprop="potentialAction" itemscope="itemscope"
itemtype="http://schema.org/SearchAction" target="_blank"><span
class="icon-buscar" onclick="javascript:Buscar($('#cadena').val(),13);"> </span><span
class="icon-cerrar"
onclick="$('.buscador').removeClass('expandido');"></span><span
class="boton-buscar" onclick="javascript:Buscar($('#cadena').val(),13);">BUSCAR</span></form></div></section><div
class="desplegable actualidad floatFix"><div class="col2"><span class="actualidad-color"><a href="/"
class="toi-200"
onclick="_gaq.push(['_trackEvent','CabezalLN8','actualidad','actualidad']);">Actualidad</a></span><a
href="/ultimas-noticias" class="toi-200"
onclick="_gaq.push(['_trackEvent','CabezalLN8','actualidad','ultimas']);">Últimas noticias</a><a
href="/mas-popular" class="toi-201"
onclick="_gaq.push(['_trackEvent','CabezalLN8','actualidad','actualidad-mas-leidas']);">Más leídas</a><a
href="/politica" onclick="_gaq.push(['_trackEvent','CabezalLN8','actualidad','politica']);"
class="toi-202">Política</a><a href="/el-mundo"
onclick="_gaq.push(['_trackEvent','CabezalLN8','actualidad','actualidad-mundo']);"
class="toi-208">El mundo</a><a href="/sociedad"
onclick="_gaq.push(['_trackEvent','CabezalLN8','actualidad','actualidad-sociedad']);"
class="toi-203">Sociedad</a><a
href="/buenos-aires"
onclick="_gaq.push(['_trackEvent','CabezalLN8','actualidad','actualidad-buenos-aires']);"
class="toi-206">Buenos Aires</a><a href="/seguridad"
onclick="_gaq.push(['_trackEvent','CabezalLN8','actualidad','actualidad-seguridad']);"
class="toi-211">Seguridad</a><div class="data"><a href="/data"
class="toi-300"
onclick="_gaq.push(['_trackEvent','CabezalLN8','actualidad','actualidad-data']);">
LA NACION Data
</a></div></div><div class="col2"><span class="negocios-color"><a href="/comunidad-de-negocios"
class="negocios toi-400"
title="Comunidad de negocios"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','Negocios']);">Negocios</a></span><a
href="/negocios-t53674" title="NEGOCIOS"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-negocios','negocios']);">Negocios</a><a
href="/consumo-t46838" title="CONSUMO"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-negocios','consumo']);">Consumo</a><a
href="/finanzas-t48750" title="FINANZAS"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-negocios','Finzanzas']);">Finanzas</a><a
href="/emprendedores-t53673" title="EMPRENDEDORES"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-negocios','Emprededores']);">Emprendedores</a><a
href="/propiedades-t46876" title="PROPIEDADES"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-negocios','propiedades']);">Propiedades</a><a
href="/campo-t29405" title="CAMPO"
onclick="gaq.push(['_trackEvent','CabezalLN8','canal-negocios','campo']);">Campo</a><a
href="/dolar-hoy-t1369" title="DÓLAR HOY"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-negocios','dolar']);">Dólar Hoy</a></div><div
class="col2"><span class="deportes-color"><a href="/deportes" class="deportes toi-401"
title="Deportes"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','Deportes']);">Deportes</a></span><a
href="/futbol-t55394" title="FÚTBOL"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-deportes','futbol']);">Fútbol</a><a
href="/basquet-t57233" title="BÁSQUET"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-deportes','basquet']);">Básquet</a><a
href="/automovilismo-t57235" title="AUTOMOVILISMO"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-deportes','automovilismo']);">Automovilismo</a><a
href="/rugby-t54732" title="RUGBY"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-deportes','rugby']);">Rugby</a><a
href="/tenis-t57234" title="TENIS"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-deportes','tenis']);">Tenis</a><a
href="/mas-deportes-t57236" title="MÁS DEPORTES"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-deportes','mas-deportes']);">Más Deportes</a><a
href="/deportes/estadisticas" class="estadisticas" title="ESTADÍSTICAS"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-deportes','estadisticas']);"><span
class="texto">Estadísticas</span></a></div><div class="col2"><span class="vida-y-ocio-color"><a
href="/vida-y-ocio-t54328" class="sociedad toi-402" title="Vida y Ocio"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','vida-ocio']);">vida y ocio</a></span><a
href="/tecnologia-t47502" title="TECNOLOGÍA"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-vida','tecnologia']);">Tecnología</a><a
href="/relaciones-t46841" title="RELACIONES"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-vida','relaciones']);">Relaciones</a><a
href="/salud-t54645" title="SALUD"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-vida','salud']);">Salud</a><a
href="/tendencias-t50150" title="TENDENCIAS"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-vida','tendencias']);">Tendencias</a><a
href="/comunidad-t46789" title="COMUNIDAD"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-vida','comunidad']);">Comunidad</a><a
href="/moda-t50796" title="MODA"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-vida','moda']);">Moda</a><a
href="/viajes-t46947" title="VIAJES"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-vida','viajes']);">Viajes</a><a
href="http://recetas.lanacion.com.ar/" title="RECETAS"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-vida','recetas']);"
target="_blank">Recetas</a></div><div class="col2"><span class="ideas-color"><a href="/ideas"
class="ideas toi-403"
title="Ideas"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','Ideas']);">ideas</a></span><a
href="/cultura" title="CULTURA"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-ideas','cultura']);">Cultura</a><a
href="/libros-t54646" title="LIBROS"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-ideas','libros']);">Libros</a><a
href="/entrevistas-t51978" title="ENTREVISTAS"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-ideas','entrevistas']);">Entrevistas</a><a
href="/arte-t54647" title="ARTE"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-ideas','arte']);">Arte</a><a href="/opinion"
title="OPINIÓN"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-ideas','opinion']);">Opinión</a><a
href="/columnistas" title="COLUMNISTAS"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-ideas','columnistas']);">Columnistas</a><a
href="http://blogs.lanacion.com.ar/" title="BLOGS"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-ideas','blogs']);"
target="_blank">Blogs</a></div><div class="col2"><span class="espectaculos-color"><a
href="/espectaculos" class="espectaculos toi-404" title="Espcectáculos"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','espectaculos']);">espectáculos</a></span><a
href="/personajes-t46949" title="PERSONAJES"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-espectaculos','personajes']);">Personajes</a><a
href="/series-t46778" title="SERIES"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-espectaculos','series']);">Series</a><a
href="/cine-t52776" title="CINE"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-espectaculos','cine']);">Cine</a><a
href="/television-t54581" title="TELEVISIÓN"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-espectaculos','television']);">Televisión</a><a
href="/teatro-t46922" title="TEATRO"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-espectaculos','teatro']);">Teatro</a><a
href="/musica-t46816" title="MÚSICA"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-espectaculos','musica']);">Música</a><a
href="http://guia.lanacion.com.ar/cine" title="GUÍA DE CINE"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-espectaculos','cartelera-cine']);"
target="_blank">Guía de Cine</a><a href="http://guia.lanacion.com.ar/teatro" title="GUÍA DE TEATRO"
onclick="_gaq.push(['_trackEvent','CabezalLN8','canal-espectaculos','cartelera-teatro']);"
target="_blank">Guía de Teatro</a></div><div class="menu-bajo"><a
title="LN+" class="lnMas toi-405" href="http://lnmas.lanacion.com.ar/" target="_blank"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','LN+']);"><svg version="1.1" id="Layer_1" x="0" y="0" width="30" height="20" viewBox="202.43 250.51 475.03 283.09" enable-background="new 202.427 250.514 475.03 283.087" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="color1" gradientUnits="userSpaceOnUse" x1="500.53" y1="544.93" x2="500.53" y2="317.79" gradientTransform="matrix(1 0 0 -1 0 851.3936)"><stop offset="0" stop-color="#3CC3DD" /><stop offset="0.23" stop-color="#38C0DA" /><stop offset="0.44" stop-color="#24B8D5" /><stop offset="0.63" stop-color="#00ACCC" /><stop offset="0.81" stop-color="#009DC1" /><stop offset="0.99" stop-color="#008BB4" /><stop offset="1" stop-color="#008AB2" /></linearGradient><polygon fill="url(#color1)" points="479.73 306.46 382.68 306.46 382.68 326.57 410.4 326.57 591.01 533.6 618.39 533.6 618.39 469.04 " /><linearGradient id="color2" gradientUnits="userSpaceOnUse" x1="306.42" y1="544.93" x2="306.42" y2="317.79" gradientTransform="matrix(1 0 0 -1 0 851.3936)"><stop offset="0" stop-color="#3CC3DD" /><stop offset="0.23" stop-color="#38C0DA" /><stop offset="0.44" stop-color="#24B8D5" /><stop offset="0.63" stop-color="#00ACCC" /><stop offset="0.81" stop-color="#009DC1" /><stop offset="0.99" stop-color="#008BB4" /><stop offset="1" stop-color="#008AB2" /></linearGradient><path fill="url(#color2)" d="M327.21 513.5c0 0-26.06 0.05-27.73 0V326.57h41.6v-20.1H202.43v20.1h41.6V513.5h-41.6v20.1h207.98V448.24h-13.86C397.29 490.05 383.75 512.41 327.21 513.5z" /><polygon fill="#00BADD" points="677.46 306.46 621.51 306.46 621.51 250.51 601.41 250.51 601.41 306.46 545.45 306.46 545.45 326.57 601.41 326.57 601.41 382.52 621.51 382.52 621.51 326.57 677.46 326.57 " /></svg>Todos los programas
</a><a href="http://servicios.lanacion.com.ar" title="Ir a Servicios" class="servicios"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','Servicios']);">Servicios</a><b>|</b><a
title="Ir a la Edición Impresa" href="/edicion-impresa" class="toi-103 impresa"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','Ed-Impresa']);">Edición Impresa</a><b>|</b><a
title="Ir a Club LA NACION" href="http://club.lanacion.com.ar/" target="_blank"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','Club']);"
class="clubLN">Club LA NACION</a></div></div></span>
<div class="otro-menu-canales"><b>|</b><a href="/comunidad-de-negocios" class="negocios toi-400"
title="Comunidad de negocios"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','Negocios']);">NEGOCIOS</a><b>|</b><a
href="/deportes" class="deportes toi-401" title="Deportes"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','Deportes']);">DEPORTES</a><b>|</b><a
href="/vida-y-ocio-t54328" class="sociedad toi-402" title="Vida y Ocio"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','vida-ocio']);">VIDA Y
OCIO</a><b>|</b><a href="/ideas" class="ideas toi-403" title="Ideas"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','Ideas']);">IDEAS</a><b>|</b><a
href="/espectaculos" class="espectaculos toi-404" title="Espcectáculos"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','espectaculos']);">ESPECTÁCULOS</a><b>|</b><span
class="icon-buscar" onclick="$('.buscador').addClass('expandido');"></span><a title="LN+"
class="lnMas toi-405"
href="http://lnmas.lanacion.com.ar/"
target="_blank"
onclick="_gaq.push(['_trackEvent','CabezalLN8','secciones','LN+']);">
<svg version="1.1" id="Layer_1" x="0" y="0" width="30" height="20" viewBox="202.43 250.51 475.03 283.09" enable-background="new 202.427 250.514 475.03 283.087" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="color1" gradientUnits="userSpaceOnUse" x1="500.53" y1="544.93" x2="500.53" y2="317.79" gradientTransform="matrix(1 0 0 -1 0 851.3936)"><stop offset="0" stop-color="#3CC3DD" /><stop offset="0.23" stop-color="#38C0DA" /><stop offset="0.44" stop-color="#24B8D5" /><stop offset="0.63" stop-color="#00ACCC" /><stop offset="0.81" stop-color="#009DC1" /><stop offset="0.99" stop-color="#008BB4" /><stop offset="1" stop-color="#008AB2" /></linearGradient><polygon fill="url(#color1)" points="479.73 306.46 382.68 306.46 382.68 326.57 410.4 326.57 591.01 533.6 618.39 533.6 618.39 469.04 " /><linearGradient id="color2" gradientUnits="userSpaceOnUse" x1="306.42" y1="544.93" x2="306.42" y2="317.79" gradientTransform="matrix(1 0 0 -1 0 851.3936)"><stop offset="0" stop-color="#3CC3DD" /><stop offset="0.23" stop-color="#38C0DA" /><stop offset="0.44" stop-color="#24B8D5" /><stop offset="0.63" stop-color="#00ACCC" /><stop offset="0.81" stop-color="#009DC1" /><stop offset="0.99" stop-color="#008BB4" /><stop offset="1" stop-color="#008AB2" /></linearGradient><path fill="url(#color2)" d="M327.21 513.5c0 0-26.06 0.05-27.73 0V326.57h41.6v-20.1H202.43v20.1h41.6V513.5h-41.6v20.1h207.98V448.24h-13.86C397.29 490.05 383.75 512.41 327.21 513.5z" /><polygon fill="#00BADD" points="677.46 306.46 621.51 306.46 621.51 250.51 601.41 250.51 601.41 306.46 545.45 306.46 545.45 326.57 601.41 326.57 601.41 382.52 621.51 382.52 621.51 326.57 677.46 326.57 " /></svg>
</a></div>
</nav>
<nav class="temas floatFix"><span>HOY</span>
<div class="temas-hoy"><h3><a class="toi-501" href="/ln-t58215"
onclick="_gaq.push(['_trackEvent','CabezalLN8','troncal','temas']);">LN+</a>
</h3>
<h3><a class="toi-502" href="/carlos-zannini-detenido-t63314"
onclick="_gaq.push(['_trackEvent','CabezalLN8','troncal','temas']);">Carlos Zannini
detenido</a></h3>
<h3><a class="toi-503" href="/reformas-del-gobierno-t62064"
onclick="_gaq.push(['_trackEvent','CabezalLN8','troncal','temas']);">Reformas del
Gobierno</a></h3>
<h3><a class="toi-504" href="/actualidad-politica-t56691"
onclick="_gaq.push(['_trackEvent','CabezalLN8','troncal','temas']);">Actualidad política</a>
</h3>
<h3><a class="toi-505" href="/submarino-ara-san-juan-t62183"
onclick="_gaq.push(['_trackEvent','CabezalLN8','troncal','temas']);">Submarino ARA San
Juan</a></h3></div>
<div class="dolar-hoy"><h3><a href="/dolar-hoy-t1369" title="Ir a Dólar oficial y dólar blue hoy"
onclick="_gaq.push(['_trackEvent','CabezalLN8','troncal','dolar']);"
id="link-dolar" onmouseover="$('#caja-dolar').css('display','block');"
onmouseout="$('#caja-dolar').css('display', 'none');">Dólar hoy</a></h3>
<div class="desplegable floatFix"><h2><a class="toi-9969" href="/dolar-hoy-t1369"
onclick="_gaq.push(['_trackEvent','cabezal','temas','dolar']);">Dólar
oficial hoy</a></h2>
<section class="dolarHoy oficial floatFix">
<ul>
<li class="tipo">Compra</li>
<li><p class="peso">$</p>
<p class="valor" id="dcompraHome">-</p></li>
</ul>
<ul>
<li class="tipo">Venta</li>
<li><p class="peso">$</p>
<p class="valor" id="dventaHome">-</p></li>
</ul>
</section>
<section class="dolarhoy-invertir">
Provisto por <a href="http://www.invertironline.com/" target="_blank"><img
src="http://static.glanacion.com/v1/ln/imgs/layout/logos/logo-invertir-online.png"
width="88" height="18" border="0" alt="Invertir Online"
title="Invertir Online"></img></a>
</section>
</div>
</div>
<div class="servicios-hoy"><h3><a href="http://servicios.lanacion.com.ar" title="Ir a Servicios">SERVICIOS</a>
</h3>
<div class="desplegable servicios">
<div class="floatFix"><a href="http://servicios.lanacion.com.ar/horoscopo" class="toi-104"
onclick="_gaq.push(['_trackEvent','CabezalLN8','servicios','horoscopo']);"><span
class="icon-horoscopo"></span>Horóscopo
</a><a href="http://servicios.lanacion.com.ar/pronostico-del-tiempo" class="toi-105"
onclick="_gaq.push(['_trackEvent','CabezalLN8','servicios','pronostico']);"><span
class="icon-pronostico"></span>Pronóstico
</a><a href="http://servicios.lanacion.com.ar/transito" class="toi-106"
onclick="_gaq.push(['_trackEvent','CabezalLN8','servicios','transito']);"><span
class="icon-transito"></span>Tránsito
</a><a href="http://servicios.lanacion.com.ar/loterias" class="toi-108"
onclick="_gaq.push(['_trackEvent','CabezalLN8','servicios','loterias']);"><span
class="icon-loterias"></span>Loterías y quinielas
</a><a href="http://servicios.lanacion.com.ar/feriados" class="toi-109"
onclick="_gaq.push(['_trackEvent','CabezalLN8','servicios','feriados']);"><span
class="icon-calendario"></span>Feriados
</a><a href="http://servicios.lanacion.com.ar/sudoku-online" class="toi-110"
onclick="_gaq.push(['_trackEvent','CabezalLN8','servicios','sudoku']);"><span
class="icon-sudoku"></span>Sudoku
</a><a href="http://servicios.lanacion.com.ar/edicion-impresa/avisos-funebres" class="toi-111"
onclick="_gaq.push(['_trackEvent','CabezalLN8','servicios','funebres']);"><span
class="icon-funebres"></span>Fúnebres
</a><a href="http://guia.lanacion.com.ar/cine" target="_blank" class="toi-112"
onclick="_gaq.push(['_trackEvent','CabezalLN8','servicios','cine']);"><span
class="icon-cine"></span>Cartelera de cine
</a><a href="http://guia.lanacion.com.ar/teatro" target="_blank" class="toi-113"
onclick="_gaq.push(['_trackEvent','CabezalLN8','servicios','teatro']);"><span
class="icon-teatro"></span>Cartelera de teatro
</a><a href="http://servicios.lanacion.com.ar/solo-texto" target="_blank" class="toi-114"
onclick="_gaq.push(['_trackEvent','CabezalLN8','servicios']);">
LA NACION en versión sólo texto
</a></div>
</div>
</div>
</nav>
</div>
</section>
</header>
<main class="floatFix">
<aside class="banner megalateral" data-adpos="megaLateral" itemscope=""
itemtype="http://schema.org/WPAdBlock"></aside>
<section id="alerta" style="display:none;">
<article><span>Anticipo: </span>
<h2 id="alertaContenido"></h2></article>
</section>
<aside class="banner interstitial" data-adpos="interstitial" itemscope=""
itemtype="http://schema.org/WPAdBlock"></aside>
<aside class="banner expandable" data-adpos="expandable" itemscope=""
itemtype="http://schema.org/WPAdBlock"></aside>
<section id="ultimoMomentoResponsive" style="display:none;" class="suscripcion">
<article class="bombaInterna conTopico conFoto floatFix"><a id="ultimoMomentoTopico" class="topico"
href="#"></a><a id="ultimoMomentoFoto" class="foto"
href=""></a>
<div class="contenedorUltimoMomento"><a id="ultimoMomentoLinkTitulo" class="titulo floatFix" href="#">
<div id="tituloBomba">Último momento:</div>
<h2 id="ultimoMomentoTitulo"></h2></a></div>
<div id="" class="cajaSuscripcion">
<div class="usuario" id="usuarioNick"></div>
<h3></h3>
<p class="texto"><b>Recibí por mail</b> las noticias que impactan
</p>
<div class="ingresar-mail">
<form name="" method="" action=""><input class="mail" type="text" name="email" id="emailBomba"
onblur="doFill(this);" onclick="doClear(this);"></input>
</form>
</div>
<div id="respuestaBomba" style="display:none;"></div>
</div>
</article>
</section>
<div class="logoprint-content"><img class="logoprint" src="http://static.glanacion.com/v1/ln/imgs/logoprint.jpg"
width="150px"></img></div>
<div id="responsive" class="modal fade id" data-backdrop="static" role="dialog" tabindex="-1">
<div class="modal-body">
<div id="login-signwall" class="login-poswall">
<iframe id="iframe-registracion"></iframe>
</div>
</div>
</div>
<article id="nota" itemscope="" itemtype="http://schema.org/NewsArticle" class="floatFix" data-login="false"
data-loginposwall="false" data-asociarposwall="false">
<div class="encabezado-columnista"><h1 itemprop="headline">Una solución no violenta para la cuestión
mapuche</h1>
<p class="bajada" itemprop="description">Los pueblos indígenas reclaman por derechos que permanecen
incumplidos, por eso es más eficiente canalizar la protesta que reprimirla</p>
</div>
<section id="cuerpo" class="floatFix" itemprop="articleBody">
<div style="display:none"><input type="hidden" id="share_url"
value="http://www.lanacion.com.ar/2089096"></input>
</div>
<div class="contenedor-herramientas">
<div id="herramientas-sociales" class="herramientas"><input type="hidden" id="hs-dominioCore"
value="http://www.lanacion.com.ar"></input><input
type="hidden" id="hs-notaId" value="2089096"></input><input type="hidden" id="hs-titulo"
value="Una solución no violenta para la cuestión mapuche"></input><input
type="hidden" id="hs-twitter" value=""></input>
<button class="icon-facebook"
data-evento="LN.Compartir.popUpRedSocial('http://www.facebook.com/sharer.php?s=100&amp;u=http://www.lanacion.com.ar/2089096')"
title="Compartir en Facebook"></button>
<button class="icon-twitter"
data-evento="LN.Compartir.popUpRedSocial('http://twitter.com/share?text=Una solución no violenta para la cuestión mapuche&amp;url=http://www.lanacion.com.ar/2089096&amp;via=LANACION');"
title="Compartir en Twitter"></button>
<a href="whatsapp://send?text=LA NACION: &quot;Una soluci%C3%B3n no violenta para la cuesti%C3%B3n mapuche&quot; - http://www.lanacion.com.ar/2089096"
data-action="share/whatsapp/share" class="wapp icon-whatsapp"></a><a
class="icon-go-to-top volver" href="#top"></a>
<button class="icon-mail" id="btnEnviarAmigo"
data-url="/herramientas/nota/enviar-por-mail.html?nota_id=2089096;" title="Enviar por mail"
onclick="_gaq.push(['_trackEvent','NotaLN8','herramientas','mail']);"></button>
<button class="icon-dialogo" title="Comentarios"
data-evento="window.location.href= '#comunidad'; LN.LiveFyre.Init();"></button>
<span class="total lf"><span class="livefyre-commentcount" data-lf-site-id="356483"
data-lf-article-id="1256448">0
</span></span></div>
</div>
<aside class="banner caja1" data-adpos="caja1" itemscope="" itemtype="http://schema.org/WPAdBlock"></aside>
<p class="primero">Abdullah Ocalan, el líder independentista kurdo, desembarcó en Italia en noviembre de
1998 y pidió asilo político. Arrastraba un pedido de captura de Turquía, donde era acusado por
terrorismo. El ex comunista Massimo D'Alema, recién asumido, dudaba. Acoger a Ocalan implicaba comprarse
un problema con un aliado de la OTAN e importar un conflicto ajeno, pero deportarlo lo exponía a la pena
de muerte, legal en Turquía pero inadmisible en la Unión Europea. Optó por la estrecha avenida del
medio: se ignoró el mandato de captura al tiempo que se negó el asilo, presionando a Ocalan para que se
fuera por las suyas. Tras una carambola a tres bandas, fue capturado por agentes turcos en Kenia, donde
se encontraba bajo la protección del embajador griego, mientras intentaba abordar un avión hacia
Holanda. Desde febrero de 1999 permanece en una cárcel de máxima seguridad en la isla turca de
Imrali.</p>
<p>Uno de los autores de esta columna vivía en Italia en esa época y siguió la crisis de cerca; el otro la
estudió en profundidad, años más tarde. Pero no hacía falta: cualquiera puede encontrar esta información
a un clic de distancia. Eso fue lo que no hizo un periodista de un diario argentino, que no es la
nacion. La semana pasada se publicaron extractos de un "informe de carácter secreto" que mencionaba
supuestos contactos internacionales de organizaciones mapuches. Entre ellos aparecía Ocalan, a quien el
informe ubicó "con domicilios en Palermo y en el centro porteño", y aseguraba incluso que había sido
visto "en Neuquén, Río Negro y Chubut durante el juicio a Jones Huala".</p>
<figure class="S encolumnada">
<div class="conModal f-imagenRelacionada"><span title="Ampliar imagen"
class="icon-resize"></span><img
src="http://bucket2.glanacion.com/anexos/fotos/77/conflicto-mapuche-2585177w280.jpg"></img></div>
<figcaption id="epigrafe2585177">Foto: LA NACION</figcaption>
</figure>
<aside class="banner caja2" data-adpos="caja2" itemscope="" itemtype="http://schema.org/WPAdBlock"></aside>
<p>Esta falsa noticia fue la más rocambolesca de una larga cadena. Dos hechos quedaron en evidencia:
primero, que hay periodistas que no chequean la información; segundo, que los servicios de inteligencia
los utilizan para manipular la agenda pública. Y sobre los servicios hay dos posibilidades: o son burros
o son perversos. Las opciones no son excluyentes, aunque cualquiera alcanza para tornarlos indignos de
confianza. Sin embargo, de ellos proviene la información que alimenta a muchos medios de comunicación y,
aún más grave, al Estado argentino.</p>
<p>El reguero de noticias falsas y vínculos brumosos tiene, paradójicamente, un objetivo prístino: asociar
la acción de los grupos mapuches con el terrorismo internacional. Comunicadores, analistas y escritores
alineados con el discurso oficial llegaron a relacionar las ideas de las organizaciones patagónicas con
las de Estado Islámico (ISIS) de Irak y Siria. El terrorismo carece de definiciones consensuales y ha
sido utilizado para emparentar cosas bien diferentes. Aunque el líder mapuche más radicalizado (y menos
representativo) declare que propician "un proceso de construcción de autonomía sin pedirle permiso al
Estado", vincular a un grupo que reclama tierras en la región de sus ancestros con otro que busca
gobernar el mundo según sus normas religiosas y ha masacrado a miles de personas requiere de una
operación intelectual tan audaz como inadecuada.</p>
<aside class="banner caja3" data-adpos="caja3" itemscope="" itemtype="http://schema.org/WPAdBlock"></aside>
<p>La asociación con el movimiento kurdo, en cambio, asoma menos inverosímil. Desde su arresto, Ocalan
transformó su pensamiento: de una visión nacionalista con inspiración estalinista evolucionó al
confederalismo democrático, una propuesta de organización comunal, ecologista, más apegada a las raíces
locales que a las fronteras nacionales. Parece lógico que esas ideas resuenen en agrupamientos
indígenas, que reivindican una organización anterior a la consolidación de los Estados sudamericanos.
Los paralelos, sin embargo, terminan allí. En Chile, donde el conflicto ha tenido su desarrollo más
dramático, la Sociedad de Fomento Agrícola denunció en 2014 que los insurrectos causaron daños por 10
millones de dólares y la muerte de tres agricultores y un carabinero a lo largo de 15 años; en la
Argentina, por ahora, se registran actos de vandalismo, ocupaciones de tierras y cortes de rutas
aislados. En contraste, el conflicto entre el Partido de los Trabajadores del Kurdistán y la República
de Turquía se cobró cerca de 40.000 vidas en los años 90 y lleva más de 2000 desde la reanudación de
hostilidades en 2015.</p>
<p>Consultada sobre esta desproporción, una fuente de los servicios nos la resumió así: "La estrategia de la
Coordinadora Arauco-Malleco (CAM), de Chile, y ahora de la Resistencia Ancestral Mapuche (RAM), más que
matar directamente, es realizar sabotajes, movilizaciones, ataques a iglesias y empresas y mucha
prensa". ¡En Medio Oriente pagarían por un terrorismo así! Ningún hecho de violencia debe ser
minimizado, pero las analogías no resisten prueba.</p>
<aside class="banner caja4" data-adpos="caja4" itemscope="" itemtype="http://schema.org/WPAdBlock"></aside>
<p>La "cuestión mapuche" es social antes que policial. La Constitución manda "reconocer la preexistencia
étnica y cultural de los pueblos indígenas argentinos. Garantizar el respeto a su identidad?; reconocer
la personería jurídica de sus comunidades, y la posesión y propiedad comunitarias de las tierras que
tradicionalmente ocupan; y regular la entrega de otras aptas y suficientes para el desarrollo humano".
Estos derechos permanecen incumplidos. Y no son un capricho chavista: los países que reputamos serios
también los reconocen. En Estados Unidos, las reservaciones indígenas ocupan 80.000 kilómetros
cuadrados, el 1,3% de la superficie del país (y 400 veces la superficie de la ciudad de Buenos Aires).
En Canadá, unas 2300 reservas ocupan 28.000 kilómetros cuadrados. Australia otorga a los pueblos
indígenas más de la mitad de los territorios del norte del país y son los nativos quienes negocian con
las empresas mineras los permisos para que operen en sus tierras. En Nueva Zelanda existen tribunales
especiales con jurisdicción sobre las tierras ancestrales de los maoríes; una de sus ventajas es que
empoderan a los aborígenes individualmente, liberándolos del yugo de los caciques.</p>
<p>La protesta social es indisociable de la democracia. Cuando desborda, recanalizarla es más eficiente que
reprimirla: ahí reside el arte del acuerdo. En la Argentina la tarea es delicada porque pocos confían en
la imparcialidad de las instituciones. Entonces, cada actor reivindica sus intereses con los medios de
que dispone: los sindicatos hacen huelga, los estudiantes toman colegios, los empresarios cierran las
fábricas y todos hacen piquetes. El politólogo Samuel Huntington definía una sociedad así como
pretoriana y el jurista Carlos Nino llamó a la Argentina "un país al margen de la ley". Al movilizarse
por sus derechos y desconfiar del Estado, la comunidad mapuche se demuestra bien argentina.</p>
<p>Las cinco provincias patagónicas tienen una población similar a la de La Matanza. A diferencia de los
Estados Unidos, que se integraron hacia el oeste otorgando parcelas de tierra a los colonizadores, y de
Brasil, donde el rol de ocupación y desarrollo territorial fue cumplido por las fuerzas armadas, la
Argentina obvió la tarea integradora tras consolidar su soberanía a finales del siglo XX. Hoy sobra
tierra y falta gente. Gobernar sigue siendo poblar, pero también integrar.</p>
<p>Seamos claros: ningún individuo u organización tiene derecho a violar la ley. Pero el problema histórico
del Estado argentino no fue tanto quiénes lo desafiaron como quiénes lo gobernaron. Cambiemos.</p>
<p><b><i>Andrés Malamud es politólogo e investigador en la Universidad de Lisboa. Martín Schapiro es abogado
administrativista y analista internacional</i></b></p>
<aside class="mas-sobre-tema">
<div class="techo floatFix"><span>Más sobre <a href="/conflicto-mapuche-t62235"
title="Más sobre Conflicto mapuche"
onclick="_gaq.push(['_trackEvent','NotaLN8','cinturon','mas-notas-tag']);">Conflicto mapuche</a></span>
</div>
</aside>
</section>
</article>
<aside class="banner middle">
<aside class="banner middle1" data-adpos="middle1" itemscope="" itemtype="http://schema.org/WPAdBlock"></aside>
</aside>
<section class="cinturon-notas videos floatFix" id="cinturonVideos" data-nota-id="2089096"
data-tipocaja="default"></section>
<section id="comunidad" class="no-logueado">
<div class="titulo-comentarios">
Enviá tu comentario<span class="icon-linea-share-vertical"></span></div>
<div class="texto-comentarios"><p>Los comentarios publicados son de exclusiva responsabilidad de sus autores y
las consecuencias derivadas de ellos pueden ser pasibles de sanciones legales. Aquel usuario que incluya en
sus mensajes algún comentario violatorio del reglamento será eliminado e inhabilitado para volver a
comentar. Enviar un comentario implica la aceptación del Reglamento.</p>
<div class="recordar-logueo">Para poder comentar tenés que ingresar con tu usuario de LA NACION.</div>
</div>
<div id="livefyre" data-articleId="1256448"
data-collectionMeta="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcnRpY2xlSWQiOiIxMjU2NDQ4IiwidGl0bGUiOiJVbmEgc29sdWNpw7NuIG5vIHZpb2xlbnRhIHBhcmEgbGEgY3Vlc3Rpw7NuIG1hcHVjaGUiLCJ1cmwiOiJodHRwOi8vd3d3LmxhbmFjaW9uLmNvbS5hci8yMDg5MDk2LXVuYS1zb2x1Y2lvbi1uby12aW9sZW50YS1wYXJhLWxhLWN1ZXN0aW9uLW1hcHVjaGUifQ.OLRkllsyNcPhaMFnTMAEBTM2RxzWga9mKcy45JQ1duI"></div>
</section>
<div id="ranking-nota">
<section id="ranking" class="floatFix">
<div class="techo floatFix"><span>Las más leídas</span></div>
<article class="toi-801 num-1 floatFix"><span>1</span>
<h2>
<a href="http://www.lanacion.com.ar/2089730-por-que-jerusalen-esta-dividida-en-occidental-y-oriental-y-por-que-importa-que-donald-trump-no-mencionara-esto"
onclick="_gaq.push(['_trackEvent','NotaLN8','cinturon','Ranking']);">Por qué Jerusalén está
dividida en occidental y oriental y por qué importa que Donald Trump no mencionara esto </a>
</h2>
<hr></hr>
</article>
<article class="toi-802 num-2 floatFix"><span>2</span>
<h2>
<a href="http://www.lanacion.com.ar/2089368-que-son-los-criptogatos-valen-mas-de-us-100000-y-pueden-ser-un-problema-para-las-criptomonedas"
onclick="_gaq.push(['_trackEvent','NotaLN8','cinturon','Ranking']);">Qué son los "criptogatos":
valen más de US$ 100.000 y pueden ser un problema para las criptomonedas </a></h2>
<hr></hr>
</article>
<article class="toi-803 num-3 floatFix"><span>3</span>
<h2>
<a href="http://www.lanacion.com.ar/2089732-soy-el-mejor-de-la-historia-la-frase-de-cristiano-ronaldo-tras-su-quinto-balon-de-oro-que-encendio-el-debate-la-comparacion-con-lionel-messi"
onclick="_gaq.push(['_trackEvent','NotaLN8','cinturon','Ranking']);">"Soy el mejor de la
historia", la frase de Cristiano Ronaldo tras su quinto Balón de Oro que encendió el debate: la
comparación con Lionel Messi </a></h2>
<hr></hr>
</article>
<article class="toi-804 num-4 floatFix"><span>4</span>
<h2>
<a href="http://www.lanacion.com.ar/2089728-el-vuelo-de-zannini-de-rio-gallegos-a-buenos-aires-un-viaje-de-tres-horas-cargado-de-indiferencia"
onclick="_gaq.push(['_trackEvent','NotaLN8','cinturon','Ranking']);">El viaje de Zannini de Río
Gallegos a Buenos Aires, un vuelo de tres horas cargado de indiferencia </a></h2>
<hr></hr>
</article>
<article class="toi-805 num-5 floatFix"><span>5</span>
<h2>
<a href="http://www.lanacion.com.ar/2089742-la-boca-dos-motochorros-apunalaron-a-un-turista-estadounidense"
onclick="_gaq.push(['_trackEvent','NotaLN8','cinturon','Ranking']);">La Boca: dos motochorros
apuñalaron a un turista estadounidense </a></h2>
<hr></hr>
</article>
</section>
<aside class="banner caja_footer" data-adpos="caja_footer" itemscope=""
itemtype="http://schema.org/WPAdBlock"></aside>
</div>
</main>
<footer id="footer">
<div class="top floatFix">
<div class="links-principales"><a href="http://especiales.lanacion.com.ar/varios/mapa-sitio/index.asp"
target="_blank"
onclick="_gaq.push(['_trackEvent','homeLN8','Footer','mapa']);">Mapa del
sitio</a> | <a href="https://micuenta.lanacion.com.ar/ayuda" target="_blank"
onclick="_gaq.push(['_trackEvent','homeLN8','Footer','ayuda']);">Ayuda</a> | <a
href="https://micuenta.lanacion.com.ar/tyc" target="_blank"
onclick="_gaq.push(['_trackEvent','homeLN8','Footer','terminos-condiciones']);">Términos y
condiciones</a></div>
<div class="links-extra">
<button class="icon-mail-footer"></button>
<a href="https://micuenta.lanacion.com.ar/mis-newsletters" target="_blank"
onclick="_gaq.push(['_trackEvent','homeLN8','Footer','newsletter']);">Newsletter</a>
<button class="icon-mobile"></button>
<a href="http://especiales.lanacion.com.ar/dispositivos/index.asp" target="_blank"
onclick="_gaq.push(['_trackEvent','homeLN8','Footer','dispositivos']);">Dispositivos</a></div>
<div class="redes-sociales">
<button class="icon-facebook" id="pie-facebook"
onclick="_gaq.push(['_trackEvent','homeLN8','Footer','facebook']);"></button>
<button class="icon-twitter" id="pie-twitter"
onclick="_gaq.push(['_trackEvent','homeLN8','Footer','twiiter']);"></button>
<button class="icon-google" id="pie-google"
onclick="_gaq.push(['_trackEvent','homeLN8','Footer','google']);"></button>
<button class="icon-rss" id="pie-rss"
onclick="_gaq.push(['_trackEvent','homeLN8','Footer','rss']);"></button>
</div>
</div>
<div class="bottom">
<ul class="floatFix">
<li class="link-copyright">Copyright 2017 SA LA NACION | Todos los derechos reservados</li>
<li class="link-gda">
<div class="gda"></div>
Miembro de GDA. Grupo de Diarios América
</li>
<li class="link-bbc"><a class="pie-bbc" target="_blank" href="http://www.bbcmundo.com" rel="external"
title="BBC MUNDO"
onclick="_gaq.push(['_trackEvent', 'promos-medios', 'bbc-mundo', 'pie']);">
<div class="logo-bbc"></div>
</a></li>
</ul>
</div>
</footer>
</body><!--ONLINE--></html>

View file

@ -0,0 +1,347 @@
<article><DIV id="readability-page-1">
<div>
<div>
<p><a rel="noopener" href="http://fakehost/@vincentvallet?source=post_page-----d6e62af173e2----------------------" target="_blank"><img alt="Vincent Vallet" src="https://miro.medium.com/fit/c/96/96/1*vFTVh_mYyf0p6m7f77A3vw.jpeg" width="48" height="48"></a>
</p>
</div>
<h2 id="0231">
Why CPU monitoring is important?
</h2>
<p id="d2c1">
I work at <a href="http://voodoo.io/" target="_blank" rel="noopener nofollow">Voodoo</a>, a French company that creates mobile video games. We have a lot of challenges with performance, availability, and scalability because of the insane amount of traffic our infrastructure supports (billions of events/requests per day …… no joke!). In this setting, every metric is important and gives us a lot of information about the state of our system.
</p>
<p id="0e89">
When working with Node.js one of the most critical resources to monitor is the CPU. Most of the time, when working on a low traffic API or project we dont realize how many simple lines of code can have a huge impact on CPU. On the other hand, when traffic increases, a simple mistake can cost dearly.
</p>
<h2 id="292e">
Resources
</h2>
<p id="1efa">
What kind of resources does your application need? In most cases, we focus on memory and CPU. Good monitoring of these two elements is mandatory for an application running on production.
</p>
<p id="dce9">
For memory, constant monitoring is the best practice to track the worst developer nightmare a.k.a memory leak.
</p>
<figure>
<div>
<p><img src="https://miro.medium.com/max/3788/1*5o3M5niyi911waUrKWVZ0Q.png" width="1894" height="970" role="presentation" data-old-src="https://miro.medium.com/max/60/1*5o3M5niyi911waUrKWVZ0Q.png?q=20">
</p>
</div>
<figcaption>
Memory leak in action
</figcaption>
</figure>
<p id="69dd">
A good way to debug memory leak is a memory dump and/or memory sampling but this is not the subject.
</p>
<p id="1fbc">
(for more details about V8 and its garbage collector you can read my previous article <a target="_blank" rel="noopener" href="http://fakehost/voodoo-engineering/nodejs-internals-v8-garbage-collector-a6eca82540ec">here</a>)
</p>
<blockquote>
<p>
Stay focused on the CPU!
</p>
</blockquote>
<p id="40e6">
Most of the time we monitor this resource with a simple solution allowing us to get a graph representing CPU consumption over time. If we want to be reactive we add an alarm, based on a threshold, to warn us when CPU usage is too high.
</p>
<figure>
<div>
<p><img src="https://miro.medium.com/max/1994/1*8uOdeOfnUzTaFIY1r7oAMg.png" width="997" height="230" role="presentation" data-old-src="https://miro.medium.com/max/60/1*8uOdeOfnUzTaFIY1r7oAMg.png?q=20">
</p>
</div>
<figcaption>
Basic CPU monitoring
</figcaption>
</figure>
<p id="0728">
And what next? We dont have data about the state of the instance when the CPU usage has increased. So we cant determine why we had this peak, at least not without an important time of debugging, comparing log, etc. This is exactly why you need to use CPU profiling.
</p>
<h2 id="8d00">
CPU profiling: whats the difference with CPU monitoring?
</h2>
<blockquote>
<p>
“Most commonly, profiling information serves to aid program optimization. Profiling is achieved by instrumenting either the program source code or its binary executable form using a tool called a profiler”
</p>
</blockquote>
<p id="3e11">
Basically, for Node.js, CPU profiling is nothing more than collecting data about functions which are CPU consuming. And ideally, get a graphic representation of the collected data a.k.a “flame graph” or “flame chart”.
</p>
<p id="91c5">
It will help you to track the exact file, line, and function which takes the most time to execute.
</p>
<h2 id="088b">
What about existing solutions?
</h2>
<h2 id="dd40">
Add arguments to Node.js
</h2>
<p id="0306">
Node.js provides a way to collect data about CPU with two command lines.
</p>
<p id="66c8">
The first command just executes your application, the argument just tells to V8 engine to collect data. When you stop your script all information is stored in a file.
</p>
<pre><span id="16bd">node --prof app.js</span></pre>
<figure>
<div>
<p><img src="https://miro.medium.com/max/1698/1*e7gjTlzi55udTXbbPeEs2A.png" width="849" height="534" role="presentation" data-old-src="https://miro.medium.com/max/60/1*e7gjTlzi55udTXbbPeEs2A.png?q=20">
</p>
</div>
<figcaption>
Output of — prof
</figcaption>
</figure>
<p id="57a6">
It is not very clear, is it?
</p>
<p id="abed">
Thats why you just need to run this second command to transform your raw file into a more human-readable output.
</p>
<pre><span id="061c">node --prof-process isolate-0xnnnnn-v8.log &gt; processed.txt</span></pre>
<figure>
<div>
<p><img src="https://miro.medium.com/max/1508/1*JJkRh7JihTUo2apW_9ZXAQ.png" width="754" height="306" role="presentation" data-old-src="https://miro.medium.com/max/60/1*JJkRh7JihTUo2apW_9ZXAQ.png?q=20">
</p>
</div>
<figcaption>
The output of — prof-process
</figcaption>
</figure>
<p id="85fa">
It seems better, here you can determine which function consumes the most of CPU (percentage of the time).
</p>
<h2 id="9e54">
ClinicJs
</h2>
<p id="176a">
ClinicJs is a set of tools that allow you to collect data and display performance charts. With “clinic flame” you can generate a flame graph based on CPU consumption.
</p>
<figure>
<div>
<p><img src="https://miro.medium.com/max/5760/1*6wi5BlNNnykjZs0PufrvLQ.png" width="2880" height="1534" role="presentation" data-old-src="https://miro.medium.com/max/60/1*6wi5BlNNnykjZs0PufrvLQ.png?q=20">
</p>
</div>
<figcaption>
Flame chart
</figcaption>
</figure>
<p id="5347">
But once again, you have to stop your app, launch the tool, then terminate the script in order to display the graph (files are generated on the disk).
</p>
<p id="d6e6">
For more details, you can see the <a href="https://clinicjs.org/" target="_blank" rel="noopener nofollow">project</a>.
</p>
<p id="be18">
<strong>To sum up</strong>, here is the list of drawbacks of the two previous solutions.
</p>
<ul>
<li id="3bef">Downtime (you should kill your application to collect the data)
</li>
<li id="c0df">Performance overhead
</li>
<li id="27ec">Data collected locally
</li>
<li id="a4fd">Need external tools (ClinicJs)
</li>
</ul>
<p id="3f2c">
In conclusion: these are good solutions to debug on development environments and/or on a local machine.
</p>
<blockquote>
<p id="fcd9">
Unfortunately, CPU issues have a worrying tendency to occur on production, and when you are not in front of your screen.
</p>
</blockquote>
<h2 id="13ef">
Inspector
</h2>
<p id="294e">
“Inspector” refers to an API thanks to which you can debug your application. By debugging we mean to be able to connect directly to the core of Node.js to collect real-time data about the process.
</p>
<p id="ea23">
A module, available since version 8.x of Node.js, provides this kind of feature. There are two advantages to use it:
</p>
<ul>
<li id="ed54">its native (no additional installation required)
</li>
<li id="7992">it can be used programmatically (no interruption)
</li>
</ul>
<p id="731f">
And here is how to make a CPU profiling with this module:
</p>
<figure>
</figure>
<p id="79d1">
As you can see, all the data is returned in variable “profile”. Basically, its a simple JSON object representing all the call stack and the CPU consumption for each function. And if you want to use an Async/await syntax you can install the module “inspector-api”.
</p>
<pre><span id="c085">npm install inspector-api --save</span></pre>
<p id="195d">
It also comes with a built-in exporter to send data to S3, with this method <strong>you dont write anything on the disk</strong>!
</p>
<figure>
</figure>
<p id="964f">
If you use another storage system you can just collect the data and export it by yourself.
</p>
<figure>
</figure>
<h2 id="848b">
And now, CPU profiling on-demand!
</h2>
<p id="6933">
We have an API that we want to test with autocannon tool. At this step, our project is able to serve around 200 requests in 20 seconds. There is probably a mistake somewhere in the code which slows down our application.
</p>
<figure>
<div>
<p><img src="https://miro.medium.com/max/1694/1*cS9IXYGfMmgxaAUlC7oqOQ.png" width="847" height="362" role="presentation" data-old-src="https://miro.medium.com/max/60/1*cS9IXYGfMmgxaAUlC7oqOQ.png?q=20">
</p>
</div>
</figure>
<p id="fb78">
But now, what if we want to trigger a CPU profiling remotely (without ssh connection to the server)? Its possible using Websocket, SSE or any other technology to send a message to your instance.
</p>
<p id="2c91">
Here is a simple example of a server using the “ws” module to send a message to a unique instance.
</p>
<figure>
</figure>
<p id="2206">
Of course, it only works with one instance, but its a fake project to demonstrate the principle ;)
</p>
<p id="e92d">
Now we can request our server to ask it to send a message to our instance and start/stop a CPU profiling. In your instance, you can handle the CPU profiling like this:
</p>
<figure>
</figure>
<p id="c3d0">
<strong>To sum up</strong>: we are able to trigger a CPU profiling, on-demand, in real-time, without interruption or connection to the server. Data can be collected on the disk (and extracted later) or can be sent to S3 (or any other system, PR are welcomed on the <a href="https://github.com/wallet77/v8-inspector-api" target="_blank" rel="noopener nofollow">inspector-api project</a>).
</p>
<blockquote>
<p id="6e87">
And because the profiler is a part of V8 itself, the format of the generated JSON file is compatible with the Chrome dev tools.
</p>
</blockquote>
</div>
<div>
<p id="2cda">
<strong>How can we identify an issue?</strong>
</p>
<p id="e0d2">
A CPU profiling should be read like this:
</p>
<ul>
<li id="27e6">the x-axis shows the stack profile population
</li>
<li id="194a">the y-axis shows stack depth
</li>
</ul>
<p id="e950">
<strong>What does it mean?</strong>
</p>
<p id="174c">
The larger is a box (a function call) the more it consumed CPU. So a good CPU profiling should look like a “flame” graph where each stack is the finest possible.
</p>
<p id="48d9">
In our example, every request try to generate a token. For this purpose, it calls the function pbkdf2 which is CPU consuming. Our CPU profile looks like a sequence of big blocks of time, like if the last function in the call stack takes 99% of the total time.
</p>
<p id="d62c">
The CPU profiling after optimizations, with the same time range.
</p>
<figure>
<div>
<p><img src="https://miro.medium.com/max/1860/1*87KlGgfbuWP38nAaQaj3xw.png" width="930" height="523" role="presentation" data-old-src="https://miro.medium.com/max/60/1*87KlGgfbuWP38nAaQaj3xw.png?q=20">
</p>
</div>
<figcaption>
CPU profiling after optimizations
</figcaption>
</figure>
<p id="10ee">
As you can notice, we have to zoom to the profile if we want to see the call stack, because after optimizations the API was able to take a lot more traffic. Now every function in the call stack looks like a microtask.
</p>
</div>
<div>
<p id="10f1">
And now our application is able to serve more than 200,000 requests in 20 seconds; <strong>we increased the performance by a factor of 100k</strong>!
</p>
<figure>
<div>
<p><img src="https://miro.medium.com/max/1690/1*kfOK60PtmWx6iP681-qRcg.png" width="845" height="362" role="presentation" data-old-src="https://miro.medium.com/max/60/1*kfOK60PtmWx6iP681-qRcg.png?q=20">
</p>
</div>
</figure>
<h2 id="98b9">
More than just CPU profiling
</h2>
<p id="e1ad">
With the inspector module, you can do much more than just CPU profiling, here is a non-exhaustive list:
</p>
<ul>
<li id="eb04">memory dump &amp; memory sampling
</li>
<li id="a9ea">code coverage
</li>
<li id="b896">use the debugger in real-time
</li>
</ul>
<h2 id="06d2">
Warnings
</h2>
<p id="731b">
Every tool, even the most powerful, comes with its own disadvantages. If you enable the profiler and/or the debugger on your production you have to keep an eye on two things:
</p>
<p id="e485">
<strong>1) performance overhead</strong>
</p>
<p id="0513">
A profiler needs to use CPU to work and it collects data into memory. The longer you let it run and the more CPU / memory it will need. This is why you should begin with very short CPU profiling, no more than a few seconds between the start and stop command. And never forget to monitor the impact of the profiler on your own infrastructure. If everything is fine you can increase the time and the frequency of CPU profiling.
</p>
<p id="049c">
One more very important thing: <strong>never forget to always stop a started CPU profiling</strong>. You can add a timer to automatically call the stop function after a while.
</p>
<p id="0656">
<strong>2) security</strong>
</p>
<p id="7999">
Using the inspector in Node.js its like opening the door of the core of your application. You should be very careful about who can use features like CPU profiling and/or the debugger. Never make the inspector “public” as being able to launch a feature from an unsafe route (not protected with an authentification mechanism). Even the collected data can be seen as critical, never send it to a system you do not trust.
</p>
<h2 id="5618">
Conclusion
</h2>
<p id="ae1a">
CPU profiling is really a must-have tool for every developer. And now, with some precautions, we can run it on production thanks to the amazing work done by the V8 and Node.js team.
</p>
<p id="1eab">
The inspector module offers a lot more features than you can use to debug your application.
</p>
<p id="0aba">
I will write another article about using CPU profiling and the inspector on production on a high traffic project.
</p>
<h2 id="3c5b">
Sources &amp; links
</h2>
<ul>
<li id="d86d">
<a href="https://nodejs.org/api/inspector.html" target="_blank" rel="noopener nofollow">https://nodejs.org/api/inspector.html</a>
</li>
<li id="cc52">
<a href="https://chromedevtools.github.io/devtools-protocol/v8" target="_blank" rel="noopener nofollow">https://chromedevtools.github.io/devtools-protocol/v8</a>
</li>
<li id="d331">
<a target="_blank" rel="noopener" href="http://fakehost/netflix-techblog/node-js-in-flames-ddd073803aa4">https://medium.com/netflix-techblog/node-js-in-flames-ddd073803aa4</a>
</li>
<li id="6420">
<a href="https://www.npmjs.com/package/inspector-api" target="_blank" rel="noopener nofollow">https://www.npmjs.com/package/inspector-api</a>
</li>
</ul>
</div>
</DIV></article>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,6 @@
<article><DIV id="readability-page-1"><article>
<h2>Test Case 1</h2>
<img data-src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0579d17015b145a88dd93992c6447d7d~tplv-k3u1fbpfcp-watermark.jpg" alt="performance.jpg" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0579d17015b145a88dd93992c6447d7d~tplv-k3u1fbpfcp-watermark.jpg">
<h2>Test Case 2</h2>
<img data-src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0579d17015b145a88dd93992c6447d7d~tplv-k3u1fbpfcp-watermark.png" alt="performance.jpg" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0579d17015b145a88dd93992c6447d7d~tplv-k3u1fbpfcp-watermark.png">
</article></DIV></article>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Lazy Load with Alt includes jpg/png/webp extensions</title>
</head>
<body>
<article class="markdown-body">
<h2>Test Case 1</h2>
<img class="lazyload inited loaded"
data-src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0579d17015b145a88dd93992c6447d7d~tplv-k3u1fbpfcp-watermark.jpg"
alt="performance.jpg"
/>
<h2>Test Case 2</h2>
<img class="lazyload inited loaded"
data-src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0579d17015b145a88dd93992c6447d7d~tplv-k3u1fbpfcp-watermark.png"
alt="performance.jpg"
/>
</article>
</body>
</html>

View file

@ -10,6 +10,24 @@ pub static IS_IMAGE: Lazy<Regex> = Lazy::new(|| {
.build() .build()
.expect("IS_IMAGE regex") .expect("IS_IMAGE regex")
}); });
pub static COPY_TO_SRCSET: Lazy<Regex> = Lazy::new(|| {
RegexBuilder::new(r#"\.(jpg|jpeg|png|webp)\s+\d"#)
.case_insensitive(true)
.build()
.expect("COPY_TO_SRC regex")
});
pub static COPY_TO_SRC: Lazy<Regex> = Lazy::new(|| {
RegexBuilder::new(r#"^\s*\S+\.(jpg|jpeg|png|webp)\S*\s*$"#)
.case_insensitive(true)
.build()
.expect("COPY_TO_SRC regex")
});
pub static IS_BASE64: Lazy<Regex> = Lazy::new(|| {
RegexBuilder::new(r#"base64\s*"#)
.case_insensitive(true)
.build()
.expect("IS_BASE64 regex")
});
pub static SIBLING_CONTENT: Lazy<Regex> = pub static SIBLING_CONTENT: Lazy<Regex> =
Lazy::new(|| Regex::new(r#"/\.( |$)/"#).expect("SIBLING_CONTENT regex")); Lazy::new(|| Regex::new(r#"/\.( |$)/"#).expect("SIBLING_CONTENT regex"));
pub static BYLINE: Lazy<Regex> = Lazy::new(|| { pub static BYLINE: Lazy<Regex> = Lazy::new(|| {
@ -57,6 +75,12 @@ pub static TITLE_CUT_FRONT: Lazy<Regex> = Lazy::new(|| {
pub static VIDEOS: Lazy<Regex> = Lazy::new(|| { pub static VIDEOS: Lazy<Regex> = Lazy::new(|| {
RegexBuilder::new(r#"(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)"#).case_insensitive(true).build().expect("VIDEOS regex") RegexBuilder::new(r#"(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)"#).case_insensitive(true).build().expect("VIDEOS regex")
}); });
pub static BASE64_DATA_URL: Lazy<Regex> = Lazy::new(|| {
RegexBuilder::new(r#"^data:\s*([^\s;,]+)\s*;\s*base64\s*,"#)
.case_insensitive(true)
.build()
.expect("BASE64_DATA_URL regex")
});
pub const SCORE_ATTR: &str = "content_score"; pub const SCORE_ATTR: &str = "content_score";
pub const DATA_TABLE_ATTR: &str = "is_data_table"; pub const DATA_TABLE_ATTR: &str = "is_data_table";
pub const MINIMUM_TOPCANDIDATES: usize = 3; pub const MINIMUM_TOPCANDIDATES: usize = 3;

View file

@ -414,20 +414,83 @@ impl FullTextParser {
} }
} }
fn fix_lazy_images( fn fix_lazy_images(context: &Context, doc: &Document) -> Result<(), FullTextParserError> {
context: &Context, let node_vec = Util::evaluate_xpath(context, "//img|picture|figure", false)?;
class: &str,
property_url: &str,
) -> Result<(), FullTextParserError> {
let xpath = &format!("//img[contains(@class, '{}')]", class);
let node_vec = Util::evaluate_xpath(context, xpath, false)?;
for mut node in node_vec { for mut node in node_vec {
if node
.get_property(property_url) // In some sites (e.g. Kotaku), they put 1px square image as base64 data uri in the src attribute.
.and_then(|correct_url| node.set_property("src", &correct_url).ok()) // So, here we check if the data uri is too short, just might as well remove it.
.is_none() if let Some(src) = node.get_attribute("src") {
{
log::warn!("Failed to fix lazy loading image"); // Make sure it's not SVG, because SVG can have a meaningful image in under 133 bytes.
if let Some(mime) = constants::BASE64_DATA_URL.captures(&src).and_then(|c| c.get(1).map(|c| c.as_str())) {
if mime == "image/svg+xml" {
continue;
}
}
// Make sure this element has other attributes which contains image.
// If it doesn't, then this src is important and shouldn't be removed.
let mut src_could_be_removed = false;
for (name, val) in node.get_attributes() {
if name == "src" {
continue;
}
if constants::IS_IMAGE.is_match(&val) {
src_could_be_removed = true;
break;
}
}
// Here we assume if image is less than 100 bytes (or 133B after encoded to base64)
// it will be too small, therefore it might be placeholder image.
if src_could_be_removed {
if let Some(_match) = constants::IS_BASE64.find(&src) {
let b64starts = _match.start() + 7;
let b64length = src.len() - b64starts;
if b64length < 133 {
_ = node.remove_attribute("src");
}
}
}
}
let class_contains_lazy = node.get_attribute("class").map(|c| c.to_lowercase().contains("lazy")).unwrap_or(false);
let has_scr = node.has_attribute("src");
let has_srcset = node.has_attribute("srcset");
if (has_scr || has_srcset) && !class_contains_lazy {
continue;
}
for (name, val) in node.get_attributes() {
if name == "src" || name == "srcset" || name == "alt" {
continue;
}
let mut copy_to: Option<&str> = None;
if constants::COPY_TO_SRCSET.is_match(&val) {
copy_to = Some("srcset");
} else if constants::COPY_TO_SRC.is_match(&val) {
copy_to = Some("src");
}
if let Some(copy_to) = copy_to {
let tag_name = node.get_name().to_uppercase();
//if this is an img or picture, set the attribute directly
if tag_name == "IMG" || tag_name == "PICTURE" {
_= node.set_attribute(copy_to, &val);
} else if tag_name == "FIGURE" && !Util::has_decendent_tag(&node, "img") && !Util::has_decendent_tag(&node, "picture") {
//if the item is a <figure> that does not contain an image or picture, create one and place it inside the figure
//see the nytimes-3 testcase for an example
let mut img = Node::new("img", None, doc).unwrap();
_ = img.set_attribute(copy_to, &val);
_ = node.add_child(&mut img);
}
}
} }
} }
Ok(()) Ok(())
@ -624,11 +687,9 @@ impl FullTextParser {
_ = Self::unwrap_noscript_images(context); _ = Self::unwrap_noscript_images(context);
_ = Self::fix_lazy_images(context, "lazyload", "data-src"); _ = Self::fix_lazy_images(context, document);
_ = Self::fix_iframe_size(context, "youtube.com"); _ = Self::fix_iframe_size(context, "youtube.com");
_ = Self::remove_attribute(context, Some("a"), "onclick"); _ = Self::remove_attribute(context, Some("a"), "onclick");
_ = Self::remove_attribute(context, Some("img"), "srcset");
_ = Self::remove_attribute(context, Some("img"), "sizes");
_ = Self::add_attribute(context, Some("a"), "target", "_blank"); _ = Self::add_attribute(context, Some("a"), "target", "_blank");
// strip elements using Readability.com and Instapaper.com ignore class names // strip elements using Readability.com and Instapaper.com ignore class names

View file

@ -267,6 +267,26 @@ async fn keep_tabular_data() {
run_test("keep-tabular-data").await run_test("keep-tabular-data").await
} }
#[tokio::test]
async fn la_nacion() {
run_test("la-nacion").await
}
#[tokio::test]
async fn lazy_image_1() {
run_test("lazy-image-1").await
}
#[tokio::test]
async fn lazy_image_2() {
run_test("lazy-image-2").await
}
#[tokio::test]
async fn lazy_image_3() {
run_test("lazy-image-3").await
}
#[tokio::test] #[tokio::test]
async fn webmd_1() { async fn webmd_1() {
run_test("webmd-1").await run_test("webmd-1").await

View file

@ -334,6 +334,19 @@ impl Util {
1.0 - distance_b 1.0 - distance_b
} }
pub fn has_decendent_tag(node: &Node, tag_name: &str) -> bool {
let mut node_iter = Self::next_node(node, false);
while let Some(node) = node_iter {
if Self::has_tag_name(Some(&node), tag_name) {
return true;
}
node_iter = Util::next_node(&node, false);
}
false
}
pub fn has_ancestor_tag<F>( pub fn has_ancestor_tag<F>(
node: &Node, node: &Node,
tag_name: &str, tag_name: &str,