diff options
| author | rafiramadhana <rf.ramadhana@gmail.com> | 2023-11-16 05:36:22 +0700 |
|---|---|---|
| committer | Philipp Tanlak <philipp.tanlak@gmail.com> | 2023-11-15 23:48:30 +0100 |
| commit | 3e01902887bdc52e743ef6cec53a5c89cb5637f0 (patch) | |
| tree | 607f77cf8b9b00ab73e1003331eebefae7abc9ae /README.md | |
| parent | beadfd1db3d2398b9b1e66d60779a7b2649af044 (diff) | |
Update documentation
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -118,16 +118,20 @@ Below is an example scraping script that showcases the capabilities of flyscrape ```javascript export const config = { - url: "https://example.com/", // Specify the URL to start scraping from. - depth: 0, // Specify how deep links should be followed. (default = 0, no follow) - follow: [], // Speficy the css selectors to follow (default = ["a[href]"]) - allowedDomains: [], // Specify the allowed domains. ['*'] for all. (default = domain from url) - blockedDomains: [], // Specify the blocked domains. (default = none) - allowedURLs: [], // Specify the allowed URLs as regex. (default = all allowed) - blockedURLs: [], // Specify the blocked URLs as regex. (default = none) - rate: 100, // Specify the rate in requests per second. (default = no rate limit) - proxies: [], // Specify the HTTP(S) proxy URLs. (default = no proxy) - cache: "file", // Enable file-based request caching. (default = no cache) + url: "https://example.com/", // Specify the URL to start scraping from. + urls: [ // Specify the URL(S) to start scraping from. If both .url and .urls + "https://example.com/foo", // are provided, all of the specified URLs will be scraped. + "https://example.com/foo", + ] + depth: 0, // Specify how deep links should be followed. (default = 0, no follow) + follow: [], // Speficy the css selectors to follow (default = ["a[href]"]) + allowedDomains: [], // Specify the allowed domains. ['*'] for all. (default = domain from url) + blockedDomains: [], // Specify the blocked domains. (default = none) + allowedURLs: [], // Specify the allowed URLs as regex. (default = all allowed) + blockedURLs: [], // Specify the blocked URLs as regex. (default = none) + rate: 100, // Specify the rate in requests per second. (default = no rate limit) + proxies: [], // Specify the HTTP(S) proxy URLs. (default = no proxy) + cache: "file", // Enable file-based request caching. (default = no cache) }; export function setup() { |