instagram-profilecrawl
instagram-profilecrawl copied to clipboard
Fix Path issues and File not closed error
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
andpython -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 toopen()
instead of a newf.close()
line.
Note: I'm not a Raspberry Pi user. So, I didn't test these changes on it.