Skip to content

Instantly share code, notes, and snippets.

View galactic993's full-sized avatar

Kazuki izutani galactic993

View GitHub Profile
@galactic993
galactic993 / shopify_images_import.csv
Created February 10, 2026 23:37
Shopify images import CSV
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 4 columns, instead of 2 in line 2.
Handle,Image Src,Image Position,Image Alt Text
andara-ds96luaawcf,https://scontent-nrt1-2.cdninstagram.com/v/t51.82787-15/588952892_17882327697431063_3373820296665060708_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=102&ig_cache_key=MzgwMDQ1MTMxMTM2Mzc3ODMwOQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6InhwaWRzLjEyOTh4MTU2MC5zZHIuQzMifQ%3D%3D&_nc_ohc=b1pol1GNGMQQ7kNvwFwA_Qh&_nc_oc=AdkhtEgB9EycN7_xg7uo6Do7zQVvaVMH_3qsCcJ-GdA0q8ZGg6uxyViGOead0ifdD2I&_nc_ad=z-m&_nc_cid=0&_nc_zt=23&_nc_ht=scontent-nrt1-2.cdninstagram.com&_nc_gid=4_6QMbGMxriDNNeUfJI0lQ&oh=00_Afs3g5xvR2M64xGl_aLbQver-OVUqOFVinWigz1esUPFAQ&oe=69919E6D,1,
andara-drosbjqguyv,https://scontent-nrt6-1.cdninstagram.com/v/t51.82787-15/588636076_17878543485431063_676011618152355709_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=106&ig_cache_key=Mzc3NjQ2MTg5NjM4Nzk5OTI0OA%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6InhwaWRzLjE0NDB4MTA4MC5zZHIuQzMifQ%3D%3D&_nc_ohc=S6LcF9EnVSoQ7kNvwHzKXWI&_nc_oc=AdkFgbfm-6HSqinf6_BpCydV6vKCnTycmcMYPwTENY2A9jswMcC
@galactic993
galactic993 / scriping_buyee.js
Last active October 4, 2019 10:16
ヤフオクとBuyeeをNodejsでスクレイピング ref: https://qiita.com/KazukiOkada/items/f2cd860ae0e55942a9f0
const cheerio = require("cheerio-httpcli");
const keyword = "canon カメラ -ジャンク";
const res = cheerio.fetch('https://buyee.jp/item/search/query/' + encodeURI(keyword.replace(/\s/g, '+')), {
item_status: 2, //中古
translationType: 1,
order: 'd',
sort: 'end'
}).then((result) => {
return Promise.resolve(result);
}, (err) => {
@galactic993
galactic993 / keepa_product_finder_sample.gas.js
Last active September 11, 2018 12:01
Keepa APIのProduct Finderで条件にあったAmazonの商品を検索する方法(GAS ver.) ref: https://qiita.com/RGedEs56/items/7e1b5463452daa0dcf89
const key = 'APIキーを入力してください';
const queryJSON = {
"perPage": 100, //最低50 この数値分検索結果を取得します
"page": 0, //ページを指定します 例えばperpageが100の時、page=0なら検索結果の1~100番目が、page=1なら101~200番目の結果が返ってきます
"productType" : 0,
"rootCategory" : "2127209051", //ルートカテゴリで絞りたい場合は指定します 複数のルートカテゴリを同時に指定することはできません
"title" : "ノートパソコン -Apple",//タイトルをキーワード検索します -だけでもOKです めちゃくちゃ長いキーワードを指定してもPOSTならいけます
"avg90_NEW_gte" : 30000, //直近90日の新品価格の平均が30,000円以上
"current_SALES_gte": 1000, //現在のランキングが1,000位以上
@galactic993
galactic993 / keepa_sample_with_gas.gas.js
Last active November 16, 2019 22:14
keepa APIのRequest ProductsでAmazon商品情報取得のやり方(Nodejs ver.) ref: https://qiita.com/KazukiOkada/items/2663aab38630007b09f6
const asins = ['B011111111','B022222222','B033333333'];
const request = UrlFetchApp.fetch('https://api.keepa.com/product',{
method : 'POST',
headers : { 'Connection' : 'keep-alive' },
payload : {
key : '自分のAPIキーを入力',
domain : '5',
asin : asins.join()
},
});
@galactic993
galactic993 / new_postToGas.js
Last active September 11, 2018 12:16
GASにPOSTする時はリダイレクトのサポートをオンにするのを忘れるな ref: https://qiita.com/RGedEs56/items/b736f7288e62ba8d8c11
const rp = require('request-promise');
const formData = { hoge : 'payload'};
rp({
url : 'https://script.google.com/macros/s/xxx/exec',
method : 'POST',
form : formData,
followAllRedirects : true
})
//これで正常にPOSTされます
@galactic993
galactic993 / miss.gs
Last active September 11, 2018 11:54
GASのPropertiesServiceに数字を保存したと思ったら文字列になってた ref: https://qiita.com/RGedEs56/items/f09832a8474e0595d7f1
PropertiesService.getScriptProperties.setProperty("count",1);
var count = PropertiesService.getScriptProperties.getProperty("count");
Logger.log(count+1); //→1.01
@galactic993
galactic993 / failedAjax.js
Last active May 12, 2017 14:54
jQuery3でajaxで取得したデータをgetElementsByClassNameする方法 ref: http://qiita.com/RGedEs56/items/8a7fb430d998c0b45354
$.ajax({
method : "get",
"url" : "/onlyoneclass.html",
dataType : "document"
}).done(function(data){
//取得したデータをjQueryオブジェクトに変換
var $data = $(data);
var sample_class = $data.find(".sample");
console.log(sample_class);