GithubHelp home page GithubHelp logo

zedeus / nitter Goto Github PK

View Code? Open in Web Editor NEW
9.7K 125.0 514.0 5.24 MB

Alternative Twitter front-end

Home Page: https://nitter.net

License: GNU Affero General Public License v3.0

Nim 70.38% CSS 3.02% Python 10.57% JavaScript 1.55% Dockerfile 0.26% SCSS 14.22%
nim twitter privacy self-hosted

nitter's Issues

Searching for Tweets not working

Searching for "test" and clicking on "Tweets" on the left side is not working on nitter.snopyta.org nor nitter.42l.fr. It somehow is working on nitter.net.

Doing this search results in thousands of DNS queries to api.twitter.com.

Show Twitter trends

I dont know if you have a solution for geo based trends but at least the "Worldwide trends" could be shown.

Proper database support

I know you are currently waiting of moigagoo/norm#19 but this adds MongoDB which is probably not the best database for this kind of caching.

Why not just using PostgreSQL? If MongoDB is just for caching than okay, this will work fine. But if you add user account and following support (maybe also liking etc) I do not think MongoDB is the correct choice.

hyperlinks for hashtags with umlauts are broken

The search for hashtags oder regular content containing umlauts works fine, but the hyperlinks for such hashtags are broken.

as one can see in the screenshot, clicking on #Privatsphäre will search for #Privatsph:

nitter_screenshot

iOS Shortcut for Twitter Redirecting

I couldn't find a contact email for you @zedeus, so I'm just putting this here as an FYI in case it helps anyone. Please feel free to close this issue.

On iOS there's a capability called "Shortcuts":

A shortcut is a quick way to get one or more tasks done with your apps. The Shortcuts app lets you create your own shortcuts with multiple steps. - https://support.apple.com/guide/shortcuts/welcome/ios

So here's a shortcut for redirecting Twitter URLs to Nitter URLs 😄 (inspired by this Invidious shortcut):

This shortcut opens the Nitter URL in Firefox but can be configured for any browser that has its own URL Scheme, for example:

Really loving Nitter! Awesome work!

Enable hls playback broken

https://nitter.snopyta.org/Ad_Inifinitum/status/1168670340198928385

Enabling HLS does not work with latest commit on master. It somehow works on nitter.net, do you run unpublished commits?

Sep 04 08:11:48 nitter nitter[23443]: DEBUG GET /fonts/fontello.woff2
Sep 04 08:11:48 nitter nitter[23443]: DEBUG   200 OK {"etag": @["0988e2b35116883eec2a931b7c7cfa03"], "content-type": @["font/woff2"]}
Sep 04 08:11:48 nitter nitter[23443]: DEBUG   -> public/fonts/fontello.woff2
Sep 04 08:11:48 nitter nitter[23443]: DEBUG   TCActionRaw
Sep 04 08:11:48 nitter nitter[23443]: DEBUG   200 OK {"content-type": @["video/mp4"]}
Sep 04 08:11:48 nitter nitter[23443]: DEBUG GET /favicon.ico
Sep 04 08:11:48 nitter nitter[23443]: DEBUG   404 Not Found {"content-type": @["text/html;charset=utf-8"]}
Sep 04 08:11:48 nitter nitter[23443]: DEBUG POST /enablehls
Sep 04 08:11:48 nitter nitter[23443]: DEBUG PRAGMA foreign_keys = ON
Sep 04 08:11:48 nitter nitter[23443]: DEBUG INSERT INTO prefs (hlsPlayback, mp4Playback, proxyVideos, muteVideos, autoplayGifs, hideTweetStats, hideBanner, stickyProfile, replaceYouTube, replaceTwitter) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) <- 1, 1, 1, 0, 1, 0, 0, 1, 'invidio.us', 'nitter.snopyta.org'
Sep 04 08:11:48 nitter nitter[23443]: DEBUG   303 See Other {"set-cookie": @["preferences=9; Expires=Sat, 29 Aug 2020 08:11:47 GMT; Secure; HttpOnly; SameSite=Lax"], "location": @[""]}
Sep 04 08:11:48 nitter nitter[23443]: DEBUG GET /enablehls
Sep 04 08:11:48 nitter nitter[23443]: DEBUG PRAGMA foreign_keys = ON
Sep 04 08:11:48 nitter nitter[23443]: DEBUG SELECT id, hlsPlayback, mp4Playback, proxyVideos, muteVideos, autoplayGifs, hideTweetStats, hideBanner, stickyProfile, replaceYouTube, replaceTwitter FROM prefs WHERE id = ? <- '9'
Sep 04 08:11:48 nitter nitter[23443]: DEBUG PRAGMA foreign_keys = ON
Sep 04 08:11:48 nitter nitter[23443]: DEBUG SELECT id, username, fullname, location, website, bio, userpic, banner, following, followers, tweets, likes, media, verified, protected, joinDate, updated FROM profile WHERE lower(username) = ? <- 'enablehls'
Sep 04 08:11:48 nitter nitter[23443]: DEBUG PRAGMA foreign_keys = ON
Sep 04 08:11:48 nitter nitter[23443]: DEBUG SELECT id, username, fullname, location, website, bio, userpic, banner, following, followers, tweets, likes, media, verified, protected, joinDate, updated FROM profile WHERE lower(username) = ? <- ''
Sep 04 08:11:48 nitter nitter[23443]: DEBUG   404 Not Found {"content-type": @["text/html;charset=utf-8"]}

Create issues for each ToDo

Tracking todos in a readme is not very nice because people who are interested in this project dont get notifications on updates.

Add a webpage for unimplemented features

Hi!

When an user is trying to redirect a twitter link to an unimplemented feature, she/he is redirected to a 404 error.
That would be great if, instead, users could be redirected to a special webpage for unimplemented features, saying something like "Nitter is WIP. The feature you're trying to access is not currently supported but it's on our plan. You can check what is our TODO list here."

This way, third parties would not have to take care about which URL the user is trying to redirect and then they would not have to check all implemented features and how the project is growing day after day.

Finally, that would let the user know they are not facing a bug and that humans are working on the project. (You could use this same webpage to display informations like where to submit a bug, where to talk with the community arround Nitter, where to donate, etc.)

Censored Tweets

This tweet https://twitter.com/ShahakShapira/status/1168900522092441600 is censored in germany

Nitter just says "Tweet not found"

DEBUG GET /ShahakShapira/status/1168900522092441600
DEBUG PRAGMA foreign_keys = ON
DEBUG SELECT id, videoId, contentId, durationMs, url, thumb, views, available, reason, playbackType FROM video WHERE videoId = ? <- ''
DEBUG   404 Not Found {"content-type": @["text/html;charset=utf-8"]}
DEBUG GET /css/style.css
DEBUG   304 Not Modified {:}
DEBUG   -> public/css/style.css
DEBUG   TCActionRaw
DEBUG GET /css/fontello.css
DEBUG   304 Not Modified {:}
DEBUG   -> public/css/fontello.css
DEBUG   TCActionRaw
DEBUG GET /logo.png
DEBUG   304 Not Modified {:}
DEBUG   -> public/logo.png
DEBUG   TCActionRaw
DEBUG GET /fonts/fontello.woff2
DEBUG   304 Not Modified {:}
DEBUG   -> public/fonts/fontello.woff2
DEBUG   TCActionRaw

Please either show some information that the tweet is censored or circumvent the censoring.

Communication platform

This project already got some attentation in the Invidious Matrix room / IRC and it would be nice if there also would be some room or platform for Nitter discussion.

Do you also use Matrix? Anything else which could be used?
If you want I can take care about all this (the room and bots etc), I also do this in Invidious Matrix room / IRC.

Proxy images

Currently images like banner / profile image or media is not proxied and if you wanna view it, it redirects to Twitter.

Display version of the software

I would love to know which version of Nitter is actually being used.
Invidious provides the hash of the commit in the footer. Maybe you could do something similar in the footer or about page.

Increase SSL/ TLS security

SSLLabs.com give you a "B" (A is best) rating because this server does not support Forward Secrecy.
https://www.ssllabs.com/ssltest/analyze.html?d=nitter.net

Mozilla's observatory even give a "F" because of missing Content Security Policy (CSP), missing HTTP Strict Transport Security (HSTS) and missing HTTP headers like X-XSS-Protection
https://observatory.mozilla.org/analyze/nitter.net

Webbkoll confirm that: https://webbkoll.dataskydd.net/en/results?url=http%3A%2F%2Fnitter.net

Responsive design (mobile friendly)

Currently nitter looks on mobile the same as on desktop and you need to zoom manually otherwise you cannot read anything.

Would it be possible to make nitter more responsive and mobile friendly?

Move nitter specific things to subdirectory

Nitter settings and info currently could also be an user. What if I wanna visit a user called "settings"?
I wouldnt move the users because Twitter uses twitter.com/username, what about

nitter.net/.nitter/settings or similar?

Privacy policy for nitter.net and the nitter project

Right now nitter.net (and the whole nitter project) don't have any privacy policy, for a privacy focused project this is really needed considering how much people use privacy as a marketing argument (See OkunaOrg/okuna-www#120 for the worst example of a project that literally censor people that talk about it (they locked their issues to contributors only after I posted that, amazing for a "ethical" project)).

Red on black isn't the best thing to read

In my opinion having Red text on a black (or any) background isn't really the best thing to read, you should have every text in white (or gray) while keeping red as the second color of the UI (like the line under "Tweet" for example)

nitter

Respect newlines in bios

Twitter bios can contain the \n character. At the moment, Nitter puts the newlines in the source. I think it should convert them to <br>

For example, mine is currently:

<div class="profile-bio"><p>Digital Troublemaker
Long haired Ⓥ geek
He/Him
&amp;: ...

It should be

<div class="profile-bio"><p>Digital Troublemaker<br>
Long haired Ⓥ geek<br>
He/Him<br>
&amp;: ...<br>

I'm not familiar with nim, but I think the issue is at https://github.com/zedeus/nitter/blob/master/src/views/profile.nim#L28 which calls linkifyText() at https://github.com/zedeus/nitter/blob/master/src/formatters.nim#L78

Or, you can add white-space: pre-wrap; to the bio. Which is how Tweets are rendered.

Add logfile support

Add simple logfile support with a parameter.

For example ./nitter -o nitter.log

Nitter random crashes (segfaults, index out of bounds)

Hello,

We are hosting the nitter.42l.fr instance and we're recently having trouble with it.

Nitter randomly stops working with the "Illegal storage access" error message, indicating a segmentation fault.
Sometimes, we also encounter the "index out of bounds" error, which also forces nitter to stop.

We couldn't accurately find a correlation between the accessed pages and the crashes. It seems to be quite random, but a deeper investigation is needed.

We can't guess if those crashes are caused by a recent commit or not, since we do not have enough traffic to tell the difference.

We have some hints:

  • It might be related to the crawlers wave we've recently gone through due to a misconfiguration in our robots.txt file ; a bot was crawling Twitter though our instance, generating heavy traffic.
  • Due to that traffic, a lot of cache entries has been generated (250+MB). In order to remove cached data and regain disk space, we've stopped the instance, deleted cache.db and the tmp/ folder and restarted it ; we might do it again if the cache gets too big (is it possible to set a maximum cache size?).
  • The Nitter instance is sending a lot of DNS queries (A? and AAAA? to api.twitter.com).
    What happens if the DNS resolvers returns an error because of too many queries at once on the same domain? (we're talking about 100+ requests per second for the same domain, some kind of random peaks when the instance is queried) Isn't nitter caching DNS queries' result ? This specific container is using the Quad9 DNS resolver.
  • During our tests, we've noticed that the Nitter instance started consuming all its reserved RAM (150MB), even though it's usually consuming around 3MB. We've noticed that behavior once, but it might be related to its strange behavior.

Technical information

We are running the latest version of Nitter (latest commit in the master branch).

  • The service is run within Docker 19.03.2 as a non-root user.
  • The container was set as read-only (with read and write rights for its working directory only), but we've unset it in order to ensure a good test environment. The segfaults / errors are still as numerous as before, though.
  • For now, the container restarts automatically when Nitter segfaults.
  • The instance is running under a reverse proxy (nginx) using a similar configuration as yours.

Feel free to try crashing our instance; don't bother to ask us nginx access logs for your specified IPs if needed.

Attaching a screenshot of the container logs. We've censored the container's local IP.
nitter-sigsegv

Thanks for your wonderful work!

Support for more languages

As a translator I would happily translate nitter in french (and I'm sure other people will happily translate it to other languages too) if you add support for it.

Reduce the wasted space on the screen

nitter

In my opinion the wasted space on the side of the content is too big, it's great for phones use but on a PC it's really too much, in my opinion you should align the left column to the left of the page and increase the size of the content, in theory it should still act the same on phones.

Some status links don't redirect

Hello, I've found that some status links (e.g. https://twitter.com/elonmusk/statuses/1158968745227780096) don't redirect to nitter.net correctly (https://nitter.net/elonmusk/statuses/1158968745227780096), but changed links (https://twitter.com/elonmusk/status/1158968745227780096) do (https://nitter.net/elonmusk/status/1158968745227780096).
P.S. I don't know is this a problem of Nitter by itself or just nitter.net website, so sorry if it's not a place for this thread.

RSS tested, only 1 missing feature

I did some more testing with the RSS and the only thing missing is the fact that the author field does not contain a link to the nitter author page

Invidious implemented it like that:

    <author>
      <name>Linus Tech Tips</name>
      <uri>https://invidio.us/channel/UCXuqSBlHAE6Xw-yeJA0Tunw</uri>
    </author>

While you use:

     <dc:creator>@elonmusk</dc:creator>

According to http://www.rssboard.org/rss-profile#namespace-elements-dublin-creator there is a limitation in <dc:creator> so you need to use <author\>

Otherwise everything else is perfect and RSS appears to be feature complete

Ability to click on the tweet to get it opened

Currently you need to click on the timestamp to get the full tweet with replies. This is not very user-friendly.
If you can click anywhere on the Tweet it would be much easier and user-friendlier.

Start video only if focus (or play button)

At the moment all videos start playing automatically. This can slow down the browser tab if there a lot of videos.
I would like to have a play button or autoplay only on focus (with mouse pointer).

This could also be configureable, time for settings? ;)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.