#๐ How do I check if a download is completed in selenium?
40 messages ยท Page 1 of 1 (latest)
@lilac stirrup
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
disclosure: I never use selenium. I'm about to just spew ideas
I'd look to see if the browser has a way of "publishing" a notification that the download has finished ... that you can access via selenium
you know the browser generally pops up a little UI thingy that shows the progress of the download, and its text changes from (say) "downloading" to "click to open" or whatever
at worst, you could look for that
or ... maybe you could extract the URL (and cookies) from the browser and do the download yourself, outside of selenium -- i.e., with requests or urllib
I'd think if you're careful, the web server won't know the difference.
most likely yes
some websites are like so unmonitered they don't even care
well my guess is: if this website were that lax, OP wouldn't be using selenium in the first place
is it google. . . . . .
they don't have an api or something like that as far as I know, and I'm a beginner. Nope it's not google.
yeah but how if they don't have APIs?
depends on users, could be 20-40 times/hour
sorry for being a noob, thanks for the feedback, can you direct me towards the right direction? what stuff should I read about to replace scraping with the methods you are recommending?
depending on the web site, you'll have no choice but to scrape.
scraping has no alternatives
I assume you know that most web sites don't want you to scrape them and that doing so might violate their terms of service, which means, in theory, we're not supposed to help you.
yeah ๐ญ
Since I have no idea what site you're scraping, nor what their TOS are, I'm not going to immediately report you to the authorities ๐
don't do that
please
I'm just learning
c'mon
we can't even guide to forums that explicitly teach you how to do that exactly
see above under "not" ๐คฃ
we are powerless
and I can't make any further suggestions simply because I never do this, and therefore don't know how (and have zero interest in learning)
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.
๐ How do I check if a download is completed in selenium?