all_KijijiAds: Retrieve all Kijiji ads

Description Usage Arguments Value Examples

View source: R/getAds.R

Description

This function retrieves all ads from a Kijiji search URL. Third party ads are removed.

Usage

1
all_KijijiAds(URL, exclude = NULL, pages = 3, outputFile = NULL)

Arguments

URL

character, the address after doing a specific search on Kijiji

exclude

vector, keywords to remove unwanted ads

pages

numeric, total amount of pages to look for ads

outputFile

character, name of the output file to save the retrieved ads. If NULL it will return a list of ads

Value

list of ads

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Retrieve all ads renting an apartment 3 1/2 in Montreal
# Exclude ads looking for an exchange
# And save the result in the 'ads.json' file
URL <- 'https://www.kijiji.ca/b-a-louer/ville-de-montreal/3-1-2/k0c30349001l1700281?price=__860'
all_KijijiAds(URL, exclude = 'echange', pages = 3, outputFile = 'ads.json')

## End(Not run)

willvieira/KijijiScraper documentation built on Jan. 30, 2021, 10:44 p.m.