Skip to content

Getting the download URL of a specific mod and version #12

Answered by betapictoris
Bwapt asked this question in Q&A
Discussion options

You must be logged in to vote

Realistically more advanced filters should be implemented getVersion, but at this time you can use getAllVersions and filter through them. Here's an example of how that would work:

import modrinth

project = modrinth.Projects.ModrinthProject('sodium')
versions = project.getAllVersions()

print([i for i in versions if "1.20" in i.gameVersions])

Please tell me if this solves your problem!

Thanks,
Daniel

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Bwapt
Comment options

@betapictoris
Comment options

@Bwapt
Comment options

@betapictoris
Comment options

Answer selected by Bwapt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Downloads Related to downloading from the "Files" section of a version.
2 participants