Open Stvad opened 4 years ago
So I have this snippet to get DB list
const getDatabases =
async page => await page.$$eval(
"#app > div:nth-child(1) > div > h4:nth-child(1) > a:nth-child(1)",
nodes => nodes.map(n => n.innerText))
It works, and the rest of the script seems to as well, but at the end it fails as there is no zip file 🤔. Tried taking a screenshot, but it just shows main page of my db. Any advice @signalnerve
Ok, tried on the other (smaller) DB, it worked, I guess I'll try increasing final timeout even higher...
Yeah, that helped, but need to have timeout like 30 sec
gonna publish a PR for multi-db support tomorrow-ish
I'm getting timeout error at waiting for selector:
{ TimeoutError: waiting for selector ".bp3-popover-wrapper > .bp3-popover-target > div > .bp3-button > .bp3-button-text" failed: timeout 30000ms exceeded
21
at new WaitTask (/home/runner/work/roam-backup/roam-backup/node_modules/puppeteer/lib/DOMWorld.js:549:28)
22
at DOMWorld._waitForSelectorOrXPath (/home/runner/work/roam-backup/roam-backup/node_modules/puppeteer/lib/DOMWorld.js:478:22)
23
at DOMWorld.waitForSelector (/home/runner/work/roam-backup/roam-backup/node_modules/puppeteer/lib/DOMWorld.js:432:17)
24
at Frame.waitForSelector (/home/runner/work/roam-backup/roam-backup/node_modules/puppeteer/lib/FrameManager.js:627:47)
25
at Frame.
any idea how to solve this??
do you have multiple databases? if so - you can use version from #6
otherwise - you can try increasing the relevant timeout (https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#pagewaitforselectorselector-options)
do you have multiple databases? if so - you can use version from #6
otherwise - you can try increasing the relevant timeout (https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#pagewaitforselectorselector-options) yes I was using the multiple DB version, I increased the timeout as you suggested and now it works fine, thanks!
hopefully we can get a version that exports to Google Drive
See #1 on initial discussion