Article View: news.admin.peering
Article #1525Re: Newbie question
From: Julien ÉLIE
Date: Fri, 17 Mar 2023 19:49
Date: Fri, 17 Mar 2023 19:49
45 lines
2648 bytes
2648 bytes
Hi Eli,
> Is it possible in pullnews to pre-skip articles above a certain number of
> bytes, instead of downloading the whole article first?
Currently not.
> Maybe by making a small change in the perl script?
I would suggest these additional lines:
@@ -928,6 +928,13 @@
push @{$article}, "\n" if not $is_control_art;
}
}
+
+ my $overview = $fromServer->xover($i);
+ # Skip the article if its size is more than 100,000 bytes.
+ if ($$overview{$i}[5] and $$overview{$i}[5] > 100000) {
+ $skip_article = 1;
+ }
+
if (not $skip_article
and (not $header_only or $is_control_art or
$add_bytes_header))
{
Before downloading the article, we just retrieve its overview data
(containing the size of the article at index 5 of the returned array),
amongst a few other fields.
Of course, change 100,000 to fit your needs.
I've quickly tested it, and I believe it works.
I may add a dedicated option to pullnews and integrate it in a future
release, if that may prove to be useful for others.
--
Julien ÉLIE
« Le caramel est un invité du palais qui menace la couronne. » (Tristan
Bernard)
Technical Details
Message-ID:
<tv2g83$3lcvn$3@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<sXMOL.4024495$MJk2.1098149@fx06.ams4> <tupmij$3f2mt$3@news.trigofacile.com> <GlfQL.1465232$w1nd.1397750@fx10.ams4> <tuujhn$3imqa$2@news.trigofacile.com> <2d%QL.1647199$gs1.1522536@fx15.ams4>Show Full Headers
Complete Article Headers
Message-ID: <tv2g83$3lcvn$3@news.trigofacile.com> Subject: Re: Newbie question Date: Fri, 17 Mar 2023 20:49:23 +0100 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <sXMOL.4024495$MJk2.1098149@fx06.ams4> <tupmij$3f2mt$3@news.trigofacile.com> <GlfQL.1465232$w1nd.1397750@fx10.ams4> <tuujhn$3imqa$2@news.trigofacile.com> <2d%QL.1647199$gs1.1522536@fx15.ams4> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.admin.peering Organization: Groupes francophones par TrigoFACILE Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 17 Mar 2023 19:49:23 -0000 (UTC) Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="176.143-2-105.abo.bbox.fr:176.143.2.105"; logging-data="3847159"; mail-complaints-to="abuse@trigofacile.com" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Cancel-Lock: sha1:6+j6jVBW+UlvApAXzqyl1GZys4s= sha256:+fobAI+YF2FxdOt44VEIgFIPbc9BiYxB+UMtNlVUNQg= sha1:5MYODquUT/Ni/qh42VMlC/CaGVk= sha256:TMU5l89WI1tDn6HG1AAcE2nX5RBuP0jWO7MZ4TP5qnE= In-Reply-To: <2d%QL.1647199$gs1.1522536@fx15.ams4>