0 of 0

File information

Last updated

Original upload

Created by

Kojillama

Uploaded by

Kojillama

Virus scan

Safe to use

215 comments

  1. Supertron
    Supertron
    • premium
    • 61 kudos
    Came up with a workaround using Vortex and MO2.

    IMPORTANT: Use Game Folder Cleaner to make a clean Vanilla files list (you'll see what I mean when you use it), and use the software to remove ALL the non-vanilla files installed by Vortex prior to installing mods with MO2.


    •  Install both Vortex and MO2, let Vortex handle downloads.
    •  Set a custom path and folder to store Vortex downloads. Settings -> Downloads -> Downloads Folder.
    •  Set the MO2 downloads folder to the folder you set for Vortex, so they share the same downloads folder.
    • Tools -> Settings -> Paths -> Downloads
    •  In the MO2 downloads tab where you click to install, click Query Metadata after downloading the mods you want.
    •  Install the mods with MO2 as normal. 
  2. Supertron
    Supertron
    • premium
    • 61 kudos
    Can someone pastebin the full code with a working fix? I can't get the part where you choose the revision to work :/
  3. Tomzo711
    Tomzo711
    • premium
    • 13 kudos
    For anyone confused by lishmael's post below here's a simplified explanation.

    Open with Notepad++ and go to line 70 and change it from:
    request = urllib.request.Request("https://next.nexusmods.com/api/graphql", data=json_data, headers=headers)

    to:

     request = urllib.request.Request("https://api.nexusmods.com/v2/graphql", data=json_data, headers=headers)

    Then go to line 224 and change it from:

    pattern = r"next\.nexusmods\.com\/(.*?)\/collections\/(.*?)(?:\?.*)?$"

    to:

    pattern = r"nexusmods\.com\/games\/(.*?)\/collections\/(.*?)(?:\?.*)?$"

    and save.
    1. CTDenthusiast
      CTDenthusiast
      • premium
      • 0 kudos
      this helped me. thanks!
    2. Tomzo711
      Tomzo711
      • premium
      • 13 kudos
      Glad I could help! 
  4. RoyBatterian
    RoyBatterian
    • premium
    • 1,384 kudos
    NM, I'm stupid. Thanks for this.
  5. Noctis3DArts
    Noctis3DArts
    • premium
    • 124 kudos
    It looks like Nexus changed the URLs for collections, still works but you have to copy-paste the example URL on the mod page, then replace the "Blahblahblah" part with the string of letters for the collection you are looking to download.
    1. Nauticalius
      Nauticalius
      • supporter
      • 0 kudos
      Cheers for this.  I was trying all sorts and getting frustrated, but this works.

      If anyone is in the same boat as I was, the two changes are that the URL needs to start "https://next.nexus...", and that the ".com/games/collections..." bit needs to be stripped out.
    2. isyankar9101
      isyankar9101
      • member
      • 0 kudos
      MERCI +100000000000
    3. noxamusfox
      noxamusfox
      • premium
      • 0 kudos
      To this date Nauticalius comment helped me personally the most when looking through a solution. Thank you @ Nauticalius.

      "If anyone is in the same boat as I was, the two changes are that the URL needs to start "https://next.nexus...", and that the".com/games/collections..." bit needs to be stripped out."
      (replace "www" with "next")
      No need to edit the NexusCollections.py file in notepad++ unless there's something I'm missing.
  6. lishmael
    lishmael
    • premium
    • 0 kudos
    Posting the change that works (at least with SkyrimSE) as of today (May 14, 2025), for ease of finding. Thanks all who've commented here
    --- NexusCollections.py2024-04-13 02:35:38.846987500 +0300
    +++ NexusCollections.py2025-05-14 13:14:35.078178600 +0300
    @@ -67,7 +67,7 @@
                 "Accept": "application/json",
             }
             json_data = json.dumps(payload).encode("utf-8")
    -        request = urllib.request.Request("https://next.nexusmods.com/api/graphql", data=json_data, headers=headers)
    +        request = urllib.request.Request("https://api.nexusmods.com/v2/graphql", data=json_data, headers=headers)
             try:
                 with urllib.request.urlopen(request) as response:
                     content = response.read()
    @@ -221,7 +221,7 @@
         def dialogInitial(self, main_window : "QMainWindow") -> "QDialog":
             def next():
                 nexusUrl = self.nexusUrl.text()
    -            pattern = r"next\.nexusmods\.com\/(.*?)\/collections\/(.*?)(?:\?.*)?$"
    +            pattern = r"nexusmods\.com\/games\/(.*?)\/collections\/(.*?)(?:\?.*)?$"
                 match = re.search(pattern, nexusUrl)
                 if match:              
                     self.gameId = match.group(1)

    1. ninjaA33A33IN69
      ninjaA33A33IN69
      • premium
      • 0 kudos
      where to place with notepad in file?
    2. bertwarley
      bertwarley
      • premium
      • 0 kudos
      you're a life saver, thank you bro!!!!!
    3. RudeuzSK
      RudeuzSK
      • member
      • 0 kudos
      Do you know how to paste that code correctly? I found it on line 67, but I don't know exactly what to replace

      Edit: I figured out how to enter the code. But when I download the collection, it goes into a pending mode and I get the message "Download cancellation: Either you clicked a premium-only link and your account isn't premium, or the download link was generated by a different account than the one stored in Mod Organizer." 
  7. aikomiko
    aikomiko
    • supporter
    • 1 kudos
    First off, many kudos to Kojillama for authoring this fantastic gem for MO2!

    For those having trouble getting this collections download tool (MO2 plugin) to work, it seems Nexus has modified the relevant URL patterns.

    The current Nexus URL pattern for Collections:
    https://www.nexusmods.com/games/{GAME_NAME}/collections/{COLLECTION_ID}

    and the API to download:
    https://www.nexusmods.com/games/api/graphql

    Editing two lines of python code in the MO2 plugin to match the new Nexus URL patterns gets this unique plugin back into full working state.

    Kojillama, might you make these updates?  I can post the code changes I have made but your official update would be great.

    Also, asking the author if there is a means within this plugin code to limit the number of simultaneously active downloads?  For me at least, there seems there may be intermittent download errors that seem to be exacerbated (or caused) by having a large number of downloads active at the same time.  An appropriate hardcoded limit, or the means for the user to enter a "max number of active downloads" might be a worthy addition to this very useful plugin (if possible).
    1. ToxicQuinnCT
      ToxicQuinnCT
      • supporter
      • 0 kudos
      Which lines did you change?
    2. ZephP
      ZephP
      • supporter
      • 12 kudos
      the link in the line 70. Change it to  "https://www.nexusmods.com/games/api/graphql"
    3. aikomiko
      aikomiko
      • supporter
      • 1 kudos
      lines 45 & DF (hex), lines 69 & 223 (decimal)
    4. aikomiko
      aikomiko
      • supporter
      • 1 kudos
      ZephP, my text editor starts line numbering at zero
    5. deleted186599631
      deleted186599631
      • account closed
      • 0 kudos
      I've edited the lines as shown below:

      69. request = urllib.request.Request("https://www.nexusmods.com/games/api/graphql", data=json_data, headers=headers)

       223. pattern = r"https://www.nexusmods.com/games/{GAME_NAME}/collections/{COLLECTION_ID}"

      The tool still hangs at the window where you enter the collection URL. Did I not do this right?
    6. rebaine2308
      rebaine2308
      • premium
      • 0 kudos
      I am having the same issue.  I have copied the code changes via copy/ paste, and manually typed.  Neither worked unfortunately.
    7. jukiiinnnnn
      jukiiinnnnn
      • premium
      • 0 kudos
      ig he dont do this. the last update was last year >.<
    8. BioX853
      BioX853
      • supporter
      • 14 kudos
      Hey everyone! For this plugin to function correctly, all you need to do is this (using a tool like Notepad or Notepad++ to open the .py file):

      In line 69/70, replace the quote "https://next.nexusmods.com/api/graphql"

      TO:

      "https://www.nexusmods.com/games/api/graphql"

      Now, in line 223/224, replace the quote "next\.nexusmods\.com\/(.*?)\/collections\/(.*?)(?:\?.*)?$"

      TO:

      "nexusmods\.com\/games\/(.*?)\/collections\/(.*?)(?:\?.*)?$"

      If all of the above lines are rewritten as instructed, you can then save the .py file and reboot Mod Organizer 2. Enter the Collection link, press Next, and the plugin should now work as intended. Enjoy!
    9. Jeffm721
      Jeffm721
      • supporter
      • 0 kudos
      This worked perfectly for me. Thank you
    10. Daegus
      Daegus
      • premium
      • 0 kudos
      I did this and I can get past the first screen where you put in the URL.  But the next screen where you choose the revision is blank and there is nothing in the drop down.  Is there another line that needs to be edited?
    11. BioX853
      BioX853
      • supporter
      • 14 kudos
      That's certainly odd. Is the collection you're trying to download removed, or something like that? Or did you input the correct link?
    12. Daegus
      Daegus
      • premium
      • 0 kudos
      No it wasn't removed.  Putting the link to it here to see if you can see what I'm missing.
      https://www.nexusmods.com/games/fallout4/collections/ldf8lp
    13. Cavalieredraghi
      Cavalieredraghi
      • premium
      • 1 kudos
      You all are Amazing thank you for this fix!
    14. Valini
      Valini
      • premium
      • 10 kudos
      BioX85's suggestion worked for me. Make sure the link you're copying from the collection has next.nexus instead of www.nexus
    15. aikomiko
      aikomiko
      • supporter
      • 1 kudos
      BioX853, thanks for posting your exact code changes.  I had made the same/equivalent code changes and they were working... until just a few minutes ago!  Has something new changed at Nexus?   Now also your changes don't seem to be work (for me at least).   Will update this post if I find out more.  THANKS everyone!
    16. Daegus
      Daegus
      • premium
      • 0 kudos
      Edit: NM looks like that workaround only worked once.

      But it looks like they've changed the API again
    17. CommonDominator
      CommonDominator
      • premium
      • 126 kudos
      The API endpoints is "https://api.nexusmods.com/v2/graphql".
      Check API reference at NexusMods GraphQL API Reference
      Replace API endpoints in line 70 from "https://next.nexusmods.com/api/graphql" to "https://api.nexusmods.com/v2/graphql".

      Line 224 should be changed as described by Biox853 if you are pasting a WWW.NexusMods URL and not a Next.NexusMods path.
    18. MrVReyes
      MrVReyes
      • premium
      • 1 kudos
      I've done all the fixes recommended in this thread and they all fail once i reach the "collection revision" selection. a pop up box shows up with the option to select the collection revision but the drop down selection doesn't open and pressing next just gives me this error.

      [2025-03-26 17:45:33.888 W] {'errors': [{'message': 'Game not found', 'locations': [{'line': 1, 'column': 67}], 'path': ['collection'], 'extensions': {'code': 'NOT_FOUND', 'detail': 'Game not found'}}], 'data': None}
      [2025-03-26 17:46:49.834 E] Traceback (most recent call last):
      [2025-03-26 17:46:49.834 E]   File "D:/MO2/plugins/NexusCollections.py", line 189, in next
      [2025-03-26 17:46:49.834 E]     self.collectionRevision = int(self.revisionList.currentText().replace('Revision ', '').split(' (')[0])
      [2025-03-26 17:46:49.835 E]                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      [2025-03-26 17:46:49.835 E] ValueError: invalid literal for int() with base 10: ''
    19. aikomiko
      aikomiko
      • supporter
      • 1 kudos
      CommonDominator, thanks for the API endpoint and Reference link  
    20. LexiCalibre
      LexiCalibre
      • supporter
      • 0 kudos
      THANK YOU SO MUCH CommonDominator That worked!!
    21. bertwarley
      bertwarley
      • premium
      • 0 kudos
      same here, did you find a solution to this?
    22. TheRoddan
      TheRoddan
      • premium
      • 0 kudos
      That did the trick, thank you!
    23. PhxFuryKnight
      PhxFuryKnight
      • premium
      • 62 kudos
      The API endpoints is "https://api.nexusmods.com/v2/graphql".
      Check API reference at NexusMods GraphQL API Reference
      Replace API endpoints in line 70 from "https://next.nexusmods.com/api/graphql" to "https://api.nexusmods.com/v2/graphql".

      Line 224 should be changed as described by Biox853 if you are pasting a WWW.NexusMods URL and not a Next.NexusMods path.


      This is the solution for error code:
      "ValueError: invalid literal for int() with base 10: ''" on line 189

      After also changing line 224 to: 
      "nexusmods\.com\/games\/(.*?)\/collections\/(.*?)(?:\?.*)?$"

      Thanks, @CommonDenominator! 
    24. CelticFlammable
      CelticFlammable
      • supporter
      • 0 kudos
      Had the blank revision list issue. Changing line 60/79 to

      https://api.nexusmods.com/v2/graphql
      and line 224 to

      nexusmods\.com\/games\/(.*?)\/collections\/(.*?)(?:\?.*)?$
      solved the issue
    25. EVIL6BELOW
      EVIL6BELOW
      • premium
      • 0 kudos
      thank u goat
  8. HPiercer
    HPiercer
    • premium
    • 4 kudos
    Having a problem now where it's not letting me select the revision. The drop down is totally blank, and I get the error "ValueError : invalid literal for int() with base 10:"

    Edit; sorry there was more to that error in the log, here's the full thing
    [2025-05-03 06:16:41.692 E] Traceback (most recent call last):
    [2025-05-03 06:16:41.692 E]   File "C:/Modding/MO2/plugins/NexusCollections.py", line 190, in next
    [2025-05-03 06:16:41.692 E]     self.collectionRevision = int(self.revisionList.currentText().replace('Revision ', '').split(' (')[0])
    [2025-05-03 06:16:41.693 E]                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [2025-05-03 06:16:41.693 E] ValueError: invalid literal for int() with base 10: ''
    1. HPiercer
      HPiercer
      • premium
      • 4 kudos
      Nvm doesn't seem to work for fallout, unless there's a work around I'm missing. idk s#*! about python so no idea how to change it.
  9. Nagatokira
    Nagatokira
    • supporter
    • 20 kudos
    .
  10. bertwarley
    bertwarley
    • premium
    • 0 kudos
    It won't let me select a revision. Does anyone know how to fix that?