ruipgil / scraperjs

A complete and versatile web scraper.
MIT License
3.71k stars 188 forks source link

how to custorm userAgent at DynamicScraper? #21

Closed atian25 closed 10 years ago

atian25 commented 10 years ago

solved.

    scraperjs.DynamicScraper.create().request({
      url: url,
      method: 'get',
      headers: {
        "user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X)",
        "accept":"text/html"
      }
    });