Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw on upload limit reached #150

Closed
pierreminiggio opened this issue Aug 3, 2022 · 3 comments
Closed

Throw on upload limit reached #150

pierreminiggio opened this issue Aug 3, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@pierreminiggio
Copy link
Contributor

pierreminiggio commented Aug 3, 2022

I don't think reaching the upload limit should be a simple log, we should probably throw a documented exception after closing the browser

await page.waitForXPath('//*[contains(text(),"Daily upload limit reached")]', { timeout: 500 }).then(() => {
messageTransport.log("Daily upload limit reached.");
browser.close();
}).catch(() => {});

@pierreminiggio pierreminiggio changed the title Throw on limit reached Throw on upload limit reached Aug 3, 2022
@github-actions
Copy link

github-actions bot commented Aug 3, 2022

Paid support is available for quick resolution, new features etc. For paid support, please write mail to youtube-uploader@datascraping.pp.ua

@fawazahmed0 fawazahmed0 added the enhancement New feature or request label Aug 21, 2022
@PeterStegarus
Copy link
Contributor

I've also noticed the 0.5 seconds timeout is too short on some occasions. 2 seconds did the trick for me but we should probably handle this some other way. Unsure if waiting indefinitely for 'Upload complete' is what we want

Maybe we could Promise.race the selectors for both the 'Daily upload limit' and 'Upload complete' elements. Will have to look further into this

await page.waitForXPath('//*[contains(text(),"Upload complete")]', { timeout: 0 })

@fawazahmed0
Copy link
Owner

I guess this should be closed with this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants