https://github.com/makevoid/jscrape-server
jscrape server - scrape content with js
https://github.com/makevoid/jscrape-server
Last synced: 5 months ago
JSON representation
jscrape server - scrape content with js
- Host: GitHub
- URL: https://github.com/makevoid/jscrape-server
- Owner: makevoid
- Created: 2011-06-17T15:40:47.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2012-07-22T12:48:03.000Z (over 13 years ago)
- Last Synced: 2024-12-22T05:31:54.288Z (about 1 year ago)
- Language: Ruby
- Homepage: http://jscrape.it
- Size: 105 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jScrape
### server
### scraping in javascript made easy
What do I need to test the solution?
[jscrape](https://github.com/makevoid/jscrape)
the javascript client library
What do I need to run the scraping in production?
[jscrape-server](https://github.com/makevoid/jscrape-server):
- the ruby eventmachine executable running
more infos: [http://jscrape.it](jscrape.it)
### Setup
git clone git://github.com/makevoid/jscrape-server.git
cd jscrape-server
bundle install
### Run
ruby jscrape.rb -p 3000
or (daemonized)
ruby jscraped.rb start -- -p 3000
enjoy!
p.s.: don't forget to set
$.jScrape_server = "localhost:3000"
or whatever your host/port is on your clientside javascript code.
### Changes:
added cookie support (api will probably change)
example:
http://jscrape.it:9393//q//
http://jscrape.it:9393/q/http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjL1KiWN26Q0/PREF=f1=40000000&f2=40000000
# returns a youtube video (html5 version)
# ajax request (using jquery):
$.get("http://jscrape.it:9393/q/"+encodeURIComponent("http://makevoid.com"), function(data){ console.log(data) })