instagram-profilecrawl icon indicating copy to clipboard operation
instagram-profilecrawl copied to clipboard

Fix Path issues and File not closed error

Open BarisSari opened this issue 3 years ago • 0 comments

Hello. First of all, thanks for this repository! I'm thinking to use this repository for my side project. However, in my first experiments, I faced a few problems and I thought it might be better to open this PR instead of workaround in my fork.

This PR solves the following issues:

  • BASE_DIR was pointing to project_root/util directory. I changed it to the project root.
  • When python -m crawl_profile user1 user2 and python -m extract_images are run, the second command is failing (No such file or directory error) because it tries to find profiles in /profiles directory. I corrected paths.
  • os module is throwing errors when the given directory is not found or given directory is empty. I added checks and logs for them.
  • json file wasn't closed. I added with clause to open() instead of a new f.close() line.

Note: I'm not a Raspberry Pi user. So, I didn't test these changes on it.

BarisSari avatar Jan 04 '21 12:01 BarisSari