By default, this will be an empty array.Ī full list of available flags can be found here. Puppeteer Arguments (optional)Īn array of Chromium flags to pass to the browser instance. The results can be filtered to articles published within a given timeframe prior to the requesst. In testing, following redirects took around five times longer on average. You can optionally ask the scraper to follow the redirect and retrieve the actual "pretty" URL (eg: "").Īs you can imagine, this results in lots of additional HTTP requests, which negatively impact the scraper's performance. The URLs that Google News supplies for each article are "ugly" redirect links (eg: ""). Query Vars (optional)Īdditional query params to add to the URL. This is the search query you'd like to find articles for. The config object passed to the function above has the following properties: Search Term (required) Require the package const googleNewsScraper = require ( 'google-news-scraper' ) // Execute within an async function, pass a config object (further documentation below) const articles = await googleNewsScraper ( ) Config
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |