C-Command Software Forum

Choosing a Nitter Instance

Since EagleFiler 1.9.2, EagleFiler has used Nitter to import Web pages from Twitter. Currently, the main Nitter instance is overloaded, causing pages to import with the error:

Instance has been rate limited. Use another instance or try again later.

You can use Terminal to tell EagleFiler to use a different Nitter instance, for example:

defaults write com.c-command.EagleFiler WebToolNitterDomain tweet.lambda.dance

or use:

defaults delete com.c-command.EagleFiler WebToolNitterDomain

to return to the default.

And here’s a script that will refetch the selected records (assumed to be tweets) using the current Nitter instance:

use AppleScript version "2.4"
use framework "Foundation"
use scripting additions

on run
    tell application "EagleFiler"
        set _selection to selected records of browser window 1
        repeat with _record in _selection
            my refetchWebPage(_record)
        end repeat
    end tell
end run

on refetchWebPage(_record)
    tell application "EagleFiler"
        set _url to _record's source URL
        if _url is "" then return
        try
            set {_newRecord} to import URLs {my changeURLToTwitter(_url)}
        on error
            return -- Error fetching page; move on to the next one
        end try
        set _newRecord's container to _record's container
        set note text of _newRecord to _record's note text -- does not preserve rich text
        set _tags to _record's assigned tags
        set assigned tags of _newRecord to _tags
        set title of _newRecord to _record's title
        -- Don't transfer since URL is different
        -- set from name of _newRecord to _record's from name
        set label index of _newRecord to _record's label index
        set _record's container to trash of _record's library document
    end tell
end refetchWebPage

on changeURLToTwitter(_url)
    set _nsURL to current application's NSURL's URLWithString:_url
    set _components to current application's NSURLComponents's componentsWithURL:_nsURL resolvingAgainstBaseURL:false
    _components's setHost:"twitter.com"
    _components's setQueryItems:(missing value)
    return _components's |URL|'s absoluteString() as Unicode text
end changeURLToTwitter