><p> in feeds from twitter for spaces
Closed this issue · 5 comments
<p> in feeds from twitter for spaces
Config: format := flag.String("format", "atom",Feed format to write ("atom", "json", "rss")
)
With all the feed formats it is giving one or the other invalid characters
Eg:
<p>Minister <a href="
I think your comment might've gotten mangled or truncated. Could you try entering it again here? Please include the command that you're running and the timeline where you're seeing the problem.
I have installed the default application with "go install" and ran the application with "go run main.go" on my local machine and from the browser accessed http://127.0.0.1:8080/micronautfw
Result: <p>📖 Micronaut Guide - Building a Docker Image of your Micronaut application <a href="https://hubs.li/Q01C5_gy0">hubs.li/Q01C5_gy0</a> <a href="http://nitter.kylrth.com/search?q=%23micronaut">#micronaut</a></p><br><img src="http://nitter.kylrth.com/pic/card_img%2F1625168817239252995%2FGWx-UU1f%3Fformat%3Djpg%26name%3D800x419" style="max-width:250px;" />
All the spaces have come with different invalid characters which isn't usable
How are you trying to read the feed that's served by nitter-rss-proxy?
In the screenshot that you shared, characters like <
and >
are escaped to <
and >
(they're from HTML embedded inside XML), and whichever RSS reader you're using should be unescaping it before rendering the original HTML. See e.g. https://stackoverflow.com/questions/1398571/html-inside-xml-should-i-use-cdata-or-encode-the-html.
You can pass -format rss
if you want a <content:encoded>
tag that uses CDATA
to embed unescaped HTML:
% nitter-rss-proxy -format rss -user micronautfw
...
<item>
<title>The Micronaut Foundation is excited to announce the release of Micronaut Framew…</title>
<link>https://twitter.com/micronautfw/status/1608167744746168321</link>
<description><p>The Micronaut Foundation is excited to announce the release of Micronaut Framework 3.8.0! Please see our latest blog post for more details. <a href="https://hubs.li/Q01wDVgG0">hubs.li/Q01wDVgG0</a> <a href="https://nitter.weiler.rocks/search?q=%23micronaut">#micronaut</a></p><br><img src="https://pbs.twimg.com/media/FlFcCqJX0AM4g8z?format=png" style="max-width:250px;" /></description>
<content:encoded><![CDATA[<p>The Micronaut Foundation is excited to announce the release of Micronaut Framework 3.8.0! Please see our latest blog post for more details. <a href="https://hubs.li/Q01wDVgG0">hubs.li/Q01wDVgG0</a> <a href="https://nitter.weiler.rocks/search?q=%23micronaut">#micronaut</a></p><br><img src="https://pbs.twimg.com/media/FlFcCqJX0AM4g8z?format=png" style="max-width:250px;" />]]></content:encoded>
<author>@micronautfw</author>
<guid>https://twitter.com/micronautfw/status/1608167744746168321</guid>
<pubDate>Wed, 28 Dec 2022 18:27:23 +0000</pubDate>
</item>
But all of this should be handled for you automatically by whatever feed reader or feed-parsing library you're using to consume the data from nitter-rss-proxy.
Also will this proxy be able to handle 1000+ users without any memory issue ? Do we need to make any changes for it ?
It's just a proxy, so it only allocates memory while it's proxying a request. Your bigger concern will be getting rate-limited or blocked by the Nitter instances that the proxy is configured to talk to. If you're planning to handle a lot of traffic, you should run your own Nitter instance and not use this proxy.