Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fun Learning Web Scraping

Avatar for Daniel Garcia Daniel Garcia
September 11, 2015

Fun Learning Web Scraping

How to scrape, defend, and why it's ultimately futile.

Avatar for Daniel Garcia

Daniel Garcia

September 11, 2015

Other Decks in Technology

Transcript

  1. • Layout dependent • Difficult to traverse • Error prone

    • RegEx not made for XML • Doesn’t support AJAX
  2. Don’t make it easy • Are you using IDs? •

    Are you HTML templating? • How identifiable are your components? • Randomly break your layout to stop scripts
  3. All about AJAX • Defeats most RegEx scrapers • Defeats

    most XMLParsers • Browsers can render AJAX • Don’t use easy to access AJAX routes • https://queensjs.com/page/2 • use https://queensjs.com/_ajax/pagination&?q=1
  4. Know your enemy! • CSRF tokens for fields • User

    authentication required • Use a paywall to discourage anonymity • Trace IP addresses • DMCA takedown request
  5. Why? • Your data is amazing • You don’t have

    an API • Backdoor feature request • Hackers!
  6. What can you do? • No, really don’t use IDs.

    • Layout changes do break scraping • Integrate attack vectors as new product features • Don’t panic
  7. • Scraping on an individual level is a query •

    Scraping in a cluster is an attack