Skip to content

dtissera/cpasbien

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node application allowing to scrap torrent informations on "cpasbien" web site. This node application expose a REST API and a command line interface to manage torrents. The application allows to send torrents to your Synlogy download station with Synology REST API.

An IOS client is provided to exploit Node REST API. This client use new Apple programming language (Swift)

iOSApp

NodeJs

Requirements

Installation

Install dependances provided in package.json Go to node folder

npm install

Configuration

  1. Go to folder: cpasbien/node/configuration/
  2. Clone file config-orig.json to config.json
  3. Customize values
  • serverPort: node Rest Api server port
  • userAgent: user agent that will be uses during scraping process
  • synoHost: IP adress of your synology NAS
  • synoPort: Port of your synology admin interface, by default 5000
  • synoAccount: Account user of your diskstation. I recommand to use your usual account name because downloads won't be visible to every users if you don't have true rights.
  • synoPasswd: Password of your syno account
  • synoDownloadDestinationFolder: Torrents will be download to your destination folder. You should use the same folder than DownloadSation to avoid permissions errors.
{
	"serverPort": 8080,
	"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36",

	"synoHost": "192.168.1.20",
	"synoPort": 5000,
	"synoAccount": "download",
	"synoPasswd": "download",
	"synoDownloadDestinationFolder": "downloads"
}	

Hosting

Hosting Guide

REST API

/api/1

/api/1/research

/api/1/syno

Command line interface

All API web methods are available through command line interface

Usage: cpasbien [options]

  Options:

    -h, --help          output usage information
    -V, --version       output the version number
    --list              list research
    --id [value]        display search <id>
    --remove [value]    remove search <id>
    --create [value]    new search <title>
    --update [value]    update search <id>
    --disable [value]   disable torrent <id,order?>
    --enable [value]    enable torrent <id,order?>
    --download [value]  downloads missing torrents <id>
    --compactdb         compact database

IOS Client

Requirements

Installation

Install dependances provided in Podfile Go to ios folder

pod install

Configuration

  1. Go to folder: cpasbien/ios/
  2. Open workspace file: cpasbien.xcworkspace
  3. Customize file: Configuration.swift according to your node config (server IP and port)
class Configuration {
    struct Consts {
        #if LOCAL
        static let serverUrl = "http://127.0.0.1:8080/api/1/"
        #else
        static let serverUrl = "http://192.168.1.20:8080/api/1/"
        #endif
    }
}

Switch from LOCAL to RELEASE build by customizing your Scheme (Debug -> DebugLocal)

About

NodeJs scraper with IOS client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published