- Fix build breakage on GHC 9.8 / mtl 2.3
- Match Content-Type case-insensitively.
- Add the monad transformer
ScraperT
.
- Support GHC 8.8.
anySelector
now captures text nodes. This causes different results when used with a plural scraper (e.g.chroots
). Usage with a singular scraper (e.g.chroot
) should be unaffected.- The dependency on
curl
has been replaced withhttp-client
andhttp-client-tls
. This has the following observable changes.scrapeURLWithOpts
is removed.- The
Config
type used withscrapeURLWithConfig
no longer contains a list of curl options. Instead it now takes aMaybe Manager
fromhttp-client
. - The
Decoder
function type now takes in aResponse
type fromhttp-client
. scrapeURL
will now throw an exception if there is a problem connecting to a URL.
- Remove
Ord
constraint from public APIs. - Add
atDepth
operator which allows for selecting nodes at a specified depth in relation to another node (#21). - Fix issue selecting malformed HTML where
"a" // "c"
would not match<a><b><c></c></a></b>
. - Add
textSelector
for selecting text nodes. - Add
SerialScraper
type and associated primitives (#48).
- Fix bug (#59, #54) in DFS traversal order.
- Split
scalpel
into two packages:scalpel
andscalpel-core
. The latter does not provide networking support and does not depend on curl.
- Added
notP
attribute predicate.
- Add the
chroot
tricks (#23 and #25) to README.md and added examples. - Fix backtracking that occurs when using
guard
andchroot
. - Fix bug where the same tag may appear in the result set multiple times.
- Performance optimizations when using the (//) operator.
- Make Scraper an instance of MonadFail. Practically this means that failed
pattern matches in
<-
expressions within a do block will evaluate to mzero instead of throwing an error and bringing down the entire script. - Pluralized scrapers will now return the empty list instead mzero when there are no matches.
- Add the
position
scraper which provides the index of the current sub-tree within the context of achroots
's do-block.
- Added the
innerHTML
andinnerHTMLs
scraper. - Added the
match
function which allows for the creation of arbitrary attribute predicates. - Fixed build breakage with GHC 8.0.1.
- Make tag and attribute matching case-insensitive.
- Added benchmarks and many optimizations.
- The
select
method is removed from the public API. - Many methods now have a constraint that the string type parametrizing TagSoup's tag type now must be order-able.
- Added
scrapeUrlWithConfig
that will hopefully put an end to multiplyingscrapeUrlWith*
methods. - The default behaviour of the
scrapeUrl*
methods is to attempt to infer the character encoding from theContent-Type
header.
- Cleanup stale instance references in documentation of TagName and AttributeName.
- Made Scraper an instance of MonadPlus.
- Fixed examples in documentation and added an examples folder for ready to compile examples. Added travis tests to ensures that examples remain compilable.
- Removed the StringLike parameter from the Selector, Selectable, AttributePredicate, AttributeName, and TagName types. Instead they are now agnostic to the underlying string type, and are only constructable with Strings and the Any type.
- Tighten dependencies and drop download-curl all together.
- Add the html and html scraper primitives for extracting raw HTML.
- Make scrapeURL follow redirects by default.
- Expose a new function scrapeURLWithOpts that takes a list of curl options.
- Fix bug (#2) where image tags that do not have a trailing "/" are not selectable.
- Tighten dependencies on download-curl.
- First version!