One thing that annoyed me about moving to Lemmy was that I’d lose my subreddits and that looking for and joining communities on Lemmy would be tedious. So (logically) I spent 2 days writing a script, that gets a list of your subreddits from your reddit account and looks for communities with the same name on Lemmy. It also joins those communites. So all you have to do is download, enter your credentials and you’re done.

https://github.com/induna-crewneck/Reddit-Lemmy-Migrator/

  • defensor_fortis@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    First off, thank you for your work on this!

    So I’m trying this out in WSL2 and I managed to get the script to run… but I have TOTP enabled on my reddit account. Any chance this could support MFA? I’m using the correct username and password I get “Incorrect username or password” so I’m sure it’s the TOTP requirement not being met.

    • induna_crewneck@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Yeah, totp isn’t supported. Two workarounds, both of which include some work on your side:

      1. bypass reddit usage by the sxriot:
      • copy the link to your multireddit from old.reddit/subreddits. Now you have all your subreddits.
      • Paste them into a text editor
      • delete everything up until and including /r/, do search and replace replacing + with ‘,’ (including the apostrophes).
      • At the beginning, add [’ and at the end add ']. You should now have [] brackets and within all your subreddits in apostrophes and separated by a comma.
      • Copy all that and paste it in the script in line 267 so it reads :

      subs = [‘subreddit1’,‘subreddit2’,etc]

      • Comment out lines 252-256 by adding # to the beginning of the line.
      • Run the script and it should work.
      1. use totp/mfa:
      • enable change DEBUG=0 to DEBUG=1 at the top of the script.
      • comment out lines 90-93 and 255 by adding # to the beginning of the line
      • in line 94 change “time.sleep(3)” to “time.sleep(60)”
      • run the script. Now you should see a chrome window open and do stuff. Once you get to the reddit page, login how you normally would and wait. You have 60 seconds to do this and from there on the script should run normally.

      Let me know if you have questions or issues