✅scrapbox-Duplicatorを試す
App nameは世界でユニークじゃないといけない
ここにさっきメモしたSIDを入れる。
将来的には転送元プロジェクトは柔軟にしたいが、まあまずは実験。
デプロイ待ちの間にテストページを作っておく
あ、これはbodyに積むタイプか。長さ上限がどの程度なのか気になる。
$ heroku run -a scrapbox-duplicator-nishio npm run transfer
:Running npm run transfer on ⬢ scrapbox-duplicator-nishio... up, run.1786 (Free)
> @ transfer /app
> node index.js
(node:21) UnhandledPromiseRejectionWarning: Error: Request failed with status code 403
...
うーん、よくわからないのでまずはローカルで動かすか
$ git clone https://github.com/tkgshn/scrapbox-Duplicator.git
$ npm install
$ node --trace-warnings index.js
ちゃんとボットアカウントでcsrfTokenを得てるがエクスポートのリクエストで失敗してるな…
あ、わかった、Scrapboxのエクスポートはプロジェクトのオーナーしかできないのか
いや、インポートもオーナーだけか
自分のSIDを使ったらできた
>@blu3mo: サブアカウントにadmin権限を与えればエクスポート等できると思います!
なるほど!
できたー!
memo
waitFor is deprecated and will be removed in a future release. See https://github.com/puppeteer/puppeteer/issues/6214 for details and how to migrate your code.