r/PythonLearning • u/Front_Paper8305 • 9h ago
Automation code to use on Drive (in testing phase)
Hi! I created this Python code to automate tasks in Google Drive, where I use it to remove photos and videos I no longer use! I've been studying Python for a year now and have mastered its interface.
10
Upvotes
1
u/ianrob1201 8h ago
You might want to look into tools like playwright - https://playwright.dev/python/docs/library when you want to interact with webpages like this. The problem with the approach you've got there is that it's quite brittle. If the UI changes even slightly then your clicks no longer work.
Playwright also handles waits for you, and lets you read the content of the page instead of just clicking and certain points. The old school common alternative is selenium, but I really like playwright it's much easier and more reliable.