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_DIRwas pointing to project_root/util directory. I changed it to the project root. - When
python -m crawl_profile user1 user2andpython -m extract_imagesare run, the second command is failing (No such file or directoryerror) because it tries to find profiles in/profilesdirectory. I corrected paths. -
osmodule 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
withclause toopen()instead of a newf.close()line.
Note: I'm not a Raspberry Pi user. So, I didn't test these changes on it.