※ちょっと古い
参考
// Only for Google Scripts | |
function kakakucomPrice(itemUrl) { | |
try { | |
var response = UrlFetchApp.fetch(itemUrl); | |
if (response.getResponseCode() == 200) { | |
var html = response.getContentText(); | |
re = /ecomm_totalvalue: \'(\d+)\'/; | |
var result = html.match(re); | |
if (result == null) { | |
return "Sold out"; |
# This is Neocities' Rainbows! config file. We are using this in production to run all our web apps. | |
# It works really well for us and has been heavily load tested, so I wanted to share it with the community. | |
# | |
# In my opinion, this is the best way to deploy a ruby web application. Unlike EventMachine based solutions, | |
# it uses real ruby threads, which allows it to take advantage of the internal non-blocking IO pattern | |
# in MRI. | |
# | |
# Contrary to popular belief, MRI doesn't block execution to wait on IO when you are using threads, even | |
# with the GIL. The requests are done concurrently for anything that is based on the IO class. This | |
# includes things like Net::HTTP and even `system commands`. Grep the MRI Ruby source code for |