Created
March 31, 2018 14:31
-
-
Save sproctor/faa7aab7d6300d36f9b3707a974ff658 to your computer and use it in GitHub Desktop.
generate prices script
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
#!/bin/sh | |
if [ ! -f prices/template.html ]; then | |
cp prices/index.html prices/template.html | |
fi | |
./catty-scrape.py > output.temp | |
sed '/%content%/{ | |
s/%content%//g | |
r output.temp | |
}' < prices/template.html > prices/index.html | |
Output: | |
(catty-scrape)[charles-cotesworth]$ ./generate-prices.sh | |
Traceback (most recent call last): | |
File "./catty-scrape.py", line 34, in <module> | |
print(material_price.get_text()) | |
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 6: ordinal not in range(128) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment