hakin Posted December 2, 2016 Share Posted December 2, 2016 (edited) I am just new to Alfred and trying to write some workflows that I can use. The use case I am facing a lot is, opening a page and checking the value of something. I want to write a script that opens the page, crawls the value by xpath or regex, and prints it as a list item in Alfred. This sounds like a very common case, so wanted to ask if there is a tutorial or sample code for this.. Edited December 2, 2016 by hakin Link to comment
deanishe Posted December 2, 2016 Share Posted December 2, 2016 Here's a workflow that scrapes results from a webpage and shows them in Alfred. Here's a tutorial on writing Script Filters (i.e. showing your own results in Alfred) and here's a tutorial on web scraping with Beautiful Soup. Beautiful Soup doesn't support XPath, but it does support regexes and a subset of CSS selectors. You can use XPath selectors with lxml, but that can be a bit of a pain to install on OS X. zlc1952 1 Link to comment
Lcop Posted March 27, 2021 Share Posted March 27, 2021 @deanishe I'm trying to do something similar, but I have zero experience with coding. Please, check my post. Link to comment
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