Code Monkey home page Code Monkey logo

bobik_javascript_sdk's Introduction

Web Scraping in Javascript using Bobik

This is a community-supported Bobik SDK for web scraping directly from Javascript.

Installing

Download and include bobik-1.0.js (located in release directory) in your HTML page like so

<script src="bobik-1.0.js" type="text/javascript"></script>

Using

Here's a quick example to get you started.

  var bobik = new Bobik("YOUR_AUTH_TOKEN");

  bobik.scrape({
      urls: ['amazon.com', 'zynga.com', 'http://finance.google.com/', 'http://shopping.yahoo.com'],
      queries:  ["//th", "//img/@src", "return document.title", "return $('script').length", "#logo", ".logo"]
    }, function (scraped_data) {
      if (!scraped_data) {
        console.log("Data is unavailable");
        return;
      }
      var scraped_urls = Object.keys(scraped_data);
      for (var url in scraped_urls)
        console.log("Results from " + url + ": " + scraped_data[scraped_urls[url]]);
  });

Full API reference is available at http://usebobik.com/sdk/javascript

Contributing

  1. Write to [email protected] to become a collaborator.
  2. The source code is in the src directory
  3. Release code goes to release. It's the same file (or minified) but with version tacked on to the end.
  4. Docs are generated using YUIDoc (http://yui.github.com/yuidoc/). Generate new docs using this command:
  yuidoc --config yuidoc.json -o docs --norecurse src

Bugs?

Submit them here on GitHub: https://github.com/emirkin/bobik_javascript_sdk/issues

bobik_javascript_sdk's People

Contributors

emirkin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.