mega.py
mega.py copied to clipboard
Import Public Folder
I want to access a certain file inside a public folder. Is there a method that returns an instance of public folder? I tried to use import_public_url(folder_url) but I get a KeyError: 'Url key missing'.
Hello there! @DorsiFlexionDev I also had similar issue with this import_public_url() function. I dig into the source code of the module and I discovered that the part of parsing url is not updated to the current format of urls. The source code here splits the Decryption Key and the Link with "!", while today most of the links (if not all of them) use "#" between them. (Look at the function at line 191 in the source code of "src/mega.py". Another struggle - In the URL - it need a "#!" after the "mega.nz/folder/" or "mega.nz/file/" part in the URL. Same here, IDK why its like that, most of the links are not like that. So try to edit the module (which I didn't succeed in, or change how you enter your URLs. BTW, I also tried to use this function and it's still failed. I'll open a different discussion about that.
Yup ! Same problem is arising while I am using it , Developers are requested to update this as soon as possible
If anyone needs it, I've posted the code I used to get files from public folders on Stack Overflow.
If anyone needs it, I've posted the code I used to get files from public folders on Stack Overflow.
thank you :+1: