Selenium Python Upload Files To Google Keep [closed] - python

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
How to upload image files to google keep using selenium.
Please reply as soon as possible.
I have tried to find the hidden input tag but it was unsuccessful and I don't want to use pyautogui or any other GUI automation framework JUST SELENIUM.
Please reply as soon as possible.

Question is unclear. Selenium can't programmatically upload anything, you'd need a request framework to hit the Google Keep API (if there is one) to do that.
You can use Selenium to navigate the DOM of Google Keep and follow the exact same process as you would by doing it manually. However, once you're trying to find the files on disk, the prompt for this is no longer part of the DOM - I do not believe selenium can interact with this, it would still require manual intervention.
Based on this answer, and the other answers to the same question, https://stackoverflow.com/a/8852686/7532703 - it seems like people have had luck using AutoIT.
Edit from the comments:
I found this https://stackoverflow.com/a/33526707/7532703 - which uses a combination of Selenium and C# to interact with the dialog window, you'd have to either do this in C# or find something that you can do the same thing with in python

Related

Click follow button if possible and close tab after checking/following Instagramm with Selenium [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 12 months ago.
Improve this question
I tried with xpath, find by name etc. but it always doesnt find the follow button i already made it sign in accept cookie and all that i can give the code i got in discord i dont wanna do it here because of a certain reason, Thanks for any help
driver.find_element_by_xpath('//*[#id="react-root"]/section/main/div/header/section/div[1]/div[2]/div/div/div/span/span[1]/button').click()
ik its deprecated btw.
Brave TheRealChicken#4398
I tried it at other threads on this forum but they dont seem to work
You are using absolute xpath which is not preferred because a minor change in website renders your code ineffective. Always try to use relative xpath.
Anyway, try this code, it will work.
driver.find_element_by_xpath("//main[#role='main']//button/div[contains(string(), 'Follow')]").click()
Change the text "Follow" as per what you see in your language on instagram. For german language, the code should be
driver.find_element_by_xpath("//main[#role='main']//button/div[contains(string(), 'Folgen')]").click()

How do I retrieve the information thats in the chrome "Source" tab with python? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
For example when you go into chrome and open a website, then go to the devtools and open up the sources tab, how would i get basically everything that is in there myself with python? Like download it with python?
There are a few popular ways to interact with web content in Python, like controlling the browser with automation, for example with selenium. This will allow you to click and extract elements from a webpage. See this example.
An alternative would be to use a library like beautifulsoup to request the webpage and parse it within your Python script. This is usually the preferred method if you don't want the dependency of an actual browser (like in headless environments). More info in the official docs.

Is there a way to open a website and paste using python? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have some code that relies on google maps to work. When you open Google Maps it opens a text-box. And the cursor is open to type. I am using the web browser module and the open function. How could I directly paste to the text-box?
Generally speaking, there is a way to open a website and paste using python with Selenium, and if you want to see it visually, you can use the web browser module in addition to Selenium.
Nevertheless, in your specific scenario, you want to access a Google service. I would recommend using its API over using Selenium and the webbrowser if you plan to use Google Maps continuously through automation. Google does own reCAPTCHA which Google will use against any bot-like activities. Again, I am not too sure what your usecase is, but I would generally use an available API over this Selenium automation.

Possible to bypass Google Verification on Login with Selenium PhantomJS? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I wanted to write a bot to scrape long-time statistics on https://www.bustabit.com/
but I realized they have a google verification on the login form.
Now I was wondering if it's even possible to bypass this security.
I'm using Python with Selenium and PhantomJS
I was thinking about passing PhantomJS Cookies/Sessions from my Chrome Browser after I logged in, so it would auto-connect on Site visit - but is this even possible?
Thanks for any help!
Google's login verification is literally designed to stop bots from being authenticated. I would also not suggest attempting to brute force these puzzles, it's more trouble than its worth.
Depending on how often you create a new web session, you could just navigate to the login page, enter the credentials and then pause the script and prompt a human to solve the captcha, before handing the controls back to selenium.
You could try this: http://scraping.pro/recaptcha-solve-selenium-python/
As far as I am concerned there is nothing publically available that would be able to solve the puzzles. And if there would be, google would quickly fix it. Therefore your best bet would be to bruteforce it. If that still works.

Interacting with a web page with Python [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am trying to write a program in Python, so that I can use a Raspberry Pi to take hardware input and then do some IoT stuff as a result.
I'm comfortable with all the hardware stuff, and am pretty sure that I'll be able to figure out how to do Facebook posting and tweeting, but I also want to submit data into a webpage.
I don't have control of the webpage, access to the code or anything like that and it's going to be nigh-on impossible to get the access to the code so I'm relying on inspect element here to get any data which I need. I'm also not supposed to post the URL of the said webpage publicly, as it needs a login which I am not at liberty to release.
I want to interact with several features on the webpage, namely:
A mouse-over drop-down menu
A text entering field
A few buttons
I think that I need to do something with 'event listeners', but I'm unsure how to go about this; I have quite a lot of Python experience but not much web development knowledge.
Thanks

Categories