Skip to content

0.2.0

Compare
Choose a tag to compare
@DenTelezhkin DenTelezhkin released this 01 Feb 16:14
· 9 commits to main since this release

Breaking

  • Spider protocol no longer requires init(url:) initializer, url parameter is passed in request(url:completion:) method instead.
  • URLSessionSpider now has init() method without parameters.

Added

  • Linux support
  • ScrappableURL.userInfo property for storing values or objects related to this scrappable URL
  • Swarm.cooldown property, that allows to customize how cooldown is executed. For example, when using Swarm from Vapor app, which itself uses SwiftNIO for scheduling tasks, cooldown property can be setup in following way:
swarm.cooldown = { interval, closure in
    eventLoop.scheduleTask(in: TimeAmount.seconds(Int64(interval)), closure)
}

Changed

  • Absence of response and data is now treated as failure for network request ( request timeout ), and request is retried configuration.delayedRequestRetries times after configuration.delayedRetryDelay

Fixed

  • Action log for previous requests is now properly stored, thus allowing correct number of request retries.