Git Product home page Git Product logo

Comments (1)

twang2000 avatar twang2000 commented on June 5, 2024

Looks like unintended characters in file extensions causes crash, as seen in '5gnSVQB - 1.jpg?1' with the "?1" being apparently a file versioning issue from what I looked up.
"The extra characters, such as "?1", that you are seeing in your file extensions may be a result of file versioning. Some websites or services use version numbers or other additional information to keep track of different versions of the same file."

Here's a extremely unpleasant workaround. Please don't actually use this in production:
0.) Navigate to the folder where you initiated the download with "python setup.py install" (python3 is outdated, use python)
1.) Temporarily uninstall with "pip uninstall ImgurToFolder"
2.) Open the file imgur_download.py, in the imgurtofolder folder. On line 258, underneath "log.info('\t%s, File Size: %.2f MB' % (filename, file_size))" (Ctrl+F to find this), stick this cancerous mass in (python formatting):
if '?' in filename[filename.rfind('.'):]:
log.info("Found ? in {}".format(filename))
filename = filename[:filename.rfind('?')]
log.info('Emergency patch done for ? stripping, {}'.format(filename))
3.) Reinstall with "python setup.py install" Config files should still be there, so no need to do the OAuth again.

I hope this helps. Here's also just the raw "imgur_downloader.py" for those who just want to replace it. You'll still need to pip uninstall and then reinstall to update the package.
imgur_downloader.zip

If there are any issues, please let me know.

from imgur-to-folder.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.