Because of missing time and resources, feddit.ch will shut down on 31.03.2024. The domain feddit.ch will be available from the 08.06.2024.

In your profile settings, you can export your profile and import it on a new server into a new account.

Thank you all for your engagement.

_Frog

  • @[email protected]
    link
    fedilink
    23 months ago

    Jumping on this to see if we can help each other out. I tried the lemmy Migrator and while Export works just fin, I get the following response when I Import, not only in DRY RUN Mode:

    *** DRY RUN enabled, no changes will be made ***

    [ Getting Main Account info - https://feddit.ch ] Logged into https://feddit.ch. Traceback (most recent call last): File “/home/{user}/lemmy_migrate/lemmy_migrate/lemmy_migrate.py”, line 175, in <module> main() File “/home/{user}/lemmy_migrate/lemmy_migrate/lemmy_migrate.py”, line 148, in main sync_subscriptions(None, main_lemming, comms_backup) TypeError: sync_subscriptions() missing 1 required positional argument: ‘excld_comms’

    Also, when I try to use the Account Settings Export via the API, I use this:

    curl -v -X GET -u usrname:pwd https://feddit.ch/api/v3/user/export_settings > exp.txt

    I get the following Output: {“error”:“incorrect_login”}

    If anyone could help it would be amazing, I would be sad to lose it all. My AI of choice wasn’t any help btw, but my skills aren’t great with those things so…

    • malijaffri
      link
      fedilink
      5
      edit-2
      3 months ago

      I got it working in shell as well:

      #!/bin/bash
      
      read -p "Username: " user
      read -p "Password: " -s pass
      read -p "TOTP: " totp
      
      res=$(curl \
          --request POST \
          --url "https://feddit.ch/api/v3/user/login" \
          --header 'accept: application/json' \
          --header 'content-type: application/json' \
          --data '{"username_or_email":"'$user'","password":"'$pass'","totp_2fa_token":"'$totp'"}')
      
      jwt=$(echo $res | sed -re 's/^.*"jwt":"([^"]*)".*$/\1/')
      
      curl \
          --request GET \
          --url "https://feddit.ch/api/v3/user/export_settings" \
          --header 'accept: application/json' \
          --cookie "jwt=$jwt" \
          -o "export.json"
      

      I’d recommend echoing $res and $jwt before processing them further

      Edit: if you don’t have TOTP enabled, don’t forget to remove it from the request

      Docs: https://lemmy.readme.io/reference/post_user-login

      Edit 2: added spacing