Skip to content

Releases: mwpenny/kijiji-scraper

Version 6.1.0 (result count enhancements)

21 Feb 23:41
Compare
Choose a tag to compare

This release slightly changes how the minResults and maxResults search options work in order to support

  1. Searching with no limit, and
  2. Searching using only maxResults

To support these two use cases, the following changes were made:

  1. A negative value for minResults will mean "no limit" (return all results), and
  2. minResults will take on the value of maxResults if:
    1. minResults === undefined and maxResults > 0, or
    2. minResults is negative (prevents over-fetching now that no limit searching is supported)

Otherwise, the current behavior is unchanged. If minResults is unspecified then its default will still be 20 (as long as maxResults is not positive), and if minResults is non-negative then no meddling will occur.

Version 6.0.0 (mobile API support)

20 Sep 01:56
ee9bbd6
Compare
Choose a tag to compare
  • Kijiji mobile API will be used by default

    • You can use the old method if you want by using the new Scraper Options type. Ad.Get() takes it as an argument and search() accepts the scraperType property in the existing options argument. Note that some search parameters are affected by this change (e.g., params.keywords -> params.q).
    • scrapeResultDetails is no longer necessary when using the API and will only have an effect if using the HTML scraper
  • Added configurable rate limiting when performing a search (to avoid being blocked)

    • pageDelayMs can be used to add a delay between each page of results
    • When scrapeResultDetails is set to true, resultDetailsDelayMs can be used to add a delay in between each request for details (note that this forces the requests to be executed serially rather than in parallel like they were up until now - a value of 0 is the same as the old behavior)
  • The module will detect if you get blocked and throw an error letting you know. It should be more difficult to get into this situation now, but is good to have anyway. More investigation is needed to determine the exact triggers for a block - Kijiji seems to be tweaking it.

Version 5.1.1 (TypeScript refactor)

13 Sep 01:53
Compare
Choose a tag to compare

The module has been converted to TypeScript and unit tests have been added. Internally, this means that it is easier and quicker to make future changes with confidence. Externally, it means that other TypeScript projects will be able to use kijiji-scraper with type checking. The new type definitions are also fully commented with TSDoc comments to serve as easily accessible documentation regardless of whether or not you are using TypeScript.

Version 4.0.0

29 Apr 23:53
Compare
Choose a tag to compare

This release is a major refactor. Several ES6 features are now used internally, and there are a few externally-facing features as well.

  • Scraping and string conversion is now done through the new Ad class
    • The same Ad object is used for both search results and single ads
  • Search result paging has been implemented and the maximum/minimum number of results to fetch/return can now be specified when searching
  • Two objects, locations and categories, have been defined to make using locationId and categoryId easier. They contain all possible locations and categories that Kijiji accepts, are nested in the same way as on the Kijiji website, and can be used in place of integers for locationId and categoryId.
  • Full promise support (callbacks are still supported as optional final parameters)

Version 2.0.1

19 Aug 22:47
Compare
Choose a tag to compare
  • Support new Kijiji UI
  • Retrieve entire image gallery for ad (thanks to @MrDOS)

Version 1.2.0

16 Jul 01:50
Compare
Choose a tag to compare
  • Use newer version of dependencies
  • Version bump to be consistent with kijiji-fb-bot

Initial release

27 Feb 06:40
Compare
Choose a tag to compare
  • Retrieve single ads as JSON objects given their URL
  • Retrieve the 20 latest ads matching given search criteria