Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nisaacson/load-url
Load a given url using curl and a path to a cookie jar file on disk
https://github.com/nisaacson/load-url
Last synced: about 1 month ago
JSON representation
Load a given url using curl and a path to a cookie jar file on disk
- Host: GitHub
- URL: https://github.com/nisaacson/load-url
- Owner: nisaacson
- Created: 2013-04-18T15:46:03.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-04-18T16:08:20.000Z (over 11 years ago)
- Last Synced: 2024-04-14T14:46:43.504Z (7 months ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Load URL
Load a given url using curl and a path to a cookie jar file on disk.# Installation
```bash
npm install -S load-url
```# Usage
```js
var inspect = require('eyespect').inspector();
var loadURL = require('load-url')
var data = {
url: 'https://www.google.com',
cookiePath: '/path/to/curl/cookie/jar/file.txt',
args: ['--insecure'] // optional arguments to pass to the spawned curl command
}
loadURL(data, function (err, reply) {
if (err) {
console.log(err.stack)
delete err.stack
inspect(err, 'error loading url with curl')
return
}
var stdout = reply.stdout
var stderr = reply.stderr
inspect(stdout,'curl stdout')
inspect(stderr,'curl stdout')
})
```# Test
```bash
# install development dependencies
npm install
# run tests
npm test
```