vehovmar Posted August 10, 2014 Posted August 10, 2014 Hi, 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. Thanks
jdfwarrior Posted August 11, 2014 Posted August 11, 2014 Hi, 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. Thanks 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.
deanishe Posted August 12, 2014 Posted August 12, 2014 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.
vehovmar Posted August 22, 2014 Author Posted August 22, 2014 Thank you very much for both answers! I'll try your Python library deanishe asap it looks great!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now