-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a few things to the structure
- Loading branch information
Showing
18 changed files
with
35,155 additions
and
2 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
categories=('activewear' 'tops' 'bottoms' 'denim' 'dresses' 'knitwear' 'outerwear' 'suits' 'basics' 'sleepwear' 'swimwear' 'maternity' 'plus-size' 'shoes' 'bags' 'accessories') | ||
|
||
do_category(){ | ||
wget -nv https://directory.goodonyou.eco/_next/data/nAgaZnRF0uEQ1T4s4MapV/categories/$1.json -O cat_$1.json | ||
} | ||
|
||
do_brand(){ | ||
wget -nv "https://directory.goodonyou.eco/_next/data/nAgaZnRF0uEQ1T4s4MapV/brand/$1.json" -O brand_$1.json | ||
} | ||
pushd goodonyou | ||
# pushd categories | ||
# for category in ${categories[@]}; do | ||
# do_category $category | ||
# done | ||
# jq -r .pageProps.category.brands[].id *.json | sort -u > ../brand_id_list.list | ||
# popd | ||
pushd brands | ||
while read brand; do | ||
do_brand $brand | ||
done < ../brand_id_list.list | ||
jq -r ".pageProps.brand | [.website, .id.id ] | @csv" *.json | sed -e "s@?[^\"]*@@g;s@http[s]*://@@g;s@/\"@\"@g" > ../goodforyou_web_brandid.csv | ||
popd | ||
popd |
Oops, something went wrong.