This function retrieves all ads from a Kijiji search URL. Third party ads are removed.
all_KijijiAds(URL, exclude = NULL, pages = 3, outputFile = NULL)
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 |
list of ads
if (FALSE) { # 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') }