Jump to content

Web search POST form

Recommended Posts



I'd like to create a workflow for web search, but the site is using POST for sending the form, GET is not working. I know I can do it in AppleScript, just wondering if there isn't another way.




Depends on the site. A lot of times its still possible and not very hard with a lot of the other supported languages. AppleScript I'm unsure of. Python, PHP, and the others, that isn't a very big task most of the time. Even curl from a bash script could perform this using the -d parameter.

Link to comment

Web stuff is a bit of a chore in AppleScript. It'd be a lot easier with something like Ruby or Python. PHP can do it, too, but PHP's HTTP libraries are much lower level, and therefore more complicated, than Ruby's or Python's (but also more powerful).

My own Python library makes sending POST requests a doddle, and there are some great libraries available for many languages.
If you need to handle logging in, sessions/cookies, navigating pages and the like, you can use something like requests or mechanize (both Python libraries). For parsing HTML, BeautifulSoup is your friend.

Link to comment
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...