Skip to content

Commit

Permalink
Added code to create base icons dir
Browse files Browse the repository at this point in the history
  • Loading branch information
RachitKataria committed Oct 30, 2019
1 parent b6e8c33 commit 233dad4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apple_app_store_scraper.js
Expand Up @@ -12,6 +12,12 @@ var categories = [
'SPORTS', 'TRAVEL', 'UTILITIES', 'WEATHER'
]

// Create icons dir if doesn't exist
var base_dir = './icons/';
if (!fs.existsSync(base_dir)){
fs.mkdirSync(base_dir);
}

categories.forEach(function(category) {
// Check if directory exists else create it
var dir = './icons/' + category + '/';
Expand All @@ -34,7 +40,7 @@ categories.forEach(function(category) {
store.list({
collection: store.collection.TOP_FREE_IOS,
category: store.category[category],
num: 200
num: 10
})
.then(function(value) {
var app_arr = []
Expand Down

0 comments on commit 233dad4

Please sign in to comment.