Interacting with a web page with Python [closed] - python

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

Related

Need help on program that uses facebook/instagram info [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 1 year ago.
Improve this question
A client wants to have information about public instagram/facebook profiles (photos/videos published, total likes/comments) from a period of time. How do I go about doing this?
I found out that some of that information is available in the website source code, but how do I use that information? Also is there any sites/services that does that already? The only ones I found only go as back as a few weeks, or only procress future posts.
I thought about automatizing the process with python, is it a good idea?
I'm new in programming, so any help is aprecciated.
As far as I know Instagram is trying to limit as much as possible bot activities, I'm not sure about Facebook though.
You can definitely try to webscrape (using python or other tools) the information you need but if things don't work, it may not be your fault.

Selenium Python Upload Files To Google Keep [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
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

Selenium / Web crawling / Web scraping App in 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 5 years ago.
Improve this question
I want to create a web app for my company that functions like a tool suite for non-technical employees to use. I'm using
Python
Selenium WebDriver,
BeautifulSoup,
Srapy,
Django
Is it possible and is this the right approach?
"The idea is to create a variety of methods that can be run by
clicking a button and/or inserting content in inputs, and having the
tests / functions run and returning the specified results."
Maybe Flask can help you here. It has a nice functionality to route urls to specific functions or methods in your code. It provides a convenient way to bind actions to code. You can search the web for how you can leverage Flask to cater to your specific needs, but here I just wanted to convey that it would help.

Get Form Data over Network [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 7 years ago.
Improve this question
I want to make a program that will get form data. So whenever anybody on a local network submits form data to a website, I would like to see that data being submited. Is this possible? If it is, is it possible in python? Thank you.
If I'm understanding your requirements correctly, you want to listen for packets on the local network and filter out everything but POST (which would be submitting form data). If I were you, I would look into wireshark, capture all the packets, filter out all that aren't POST to the specific website.
Wireshark has a Python API, and you may find this stackoverflow question of interest.
Hope I helped a little.
You may want to look at mitmproxy as it is easy to setup and may address your core needs. Bonus, it's pretty easy to set up across devices.
Disclaimer - if you are doing this without the knowledge or consent of those on your network, you're likely breaking the law.

Django website that use webcrawling [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 8 years ago.
Improve this question
I made in python a webcrawler, and I want to make Django website to display the results of the crawling, can I do it? for example: the crawler enter to "https://stackoverflow.com/questions" and take the questins of the first page and display it on the website(maybe on the tamplate of Django).
EDIT: I just re-read your question and it looks like you're already doing the scraping? You should implement that functionality into a Django site and then yes of course you can display it.
Yes you can do it. A great combination for web scraping with django is using the python requests library (which I'm guessing you're using) andBeautiful Soup. I've used this combination in a few different projects and I've been happy with it.
Another popular option uses the python Scrapy library and combines it into a django app called django-dynamic-scraper.
Hopefully this points you in the right direction.

Categories