ncp

package module
v0.0.0-...-c7be21b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2018 License: Apache-2.0 Imports: 13 Imported by: 1

README

ncp

Parser nnm club forum for get films info

install

go get github.com/serbe/ncp

example (not work if invalid user/password - view source code)

package main

import (
	"fmt"

	"github.com/serbe/ncp"
)

func main() {
	nnm, err := ncp.Init("user", "password")
	if err != nil {
		panic(err)
	}
	tree, err := nnm.ParseForumTree("http://nnmclub.to/forum/viewforum.php?f=266")
	if err != nil {
		panic(err)
	}
	film0, err := nnm.ParseTopic(tree[0])
	if err != nil {
		panic(err)
	}
	fmt.Println(film0)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Film

type Film struct {
	Section       string
	Name          string
	EngName       string
	Href          string
	Year          int
	Genre         []string
	Country       []string
	RawCountry    string
	Director      []string
	Producer      []string
	Actor         []string
	Description   string
	Age           string
	ReleaseDate   string
	RussianDate   string
	Duration      string
	Quality       string
	Translation   string
	SubtitlesType string
	Subtitles     string
	Video         string
	Resolution    string
	Audio1        string
	Audio2        string
	Audio3        string
	Kinopoisk     float64
	IMDb          float64
	NNM           float64
	Size          int
	DateCreate    string
	Torrent       string
	Magnet        string
	Poster        string
	Seeders       int
	Leechers      int
}

Film all values Section Раздел форума Name Название EngName Английское название Href Ссылка Year Год Genre Жанр Country Производство RawCountry Производство (оригинальная строка) Director Режиссер Producer Продюсер Actors Актеры Description Описание Age Возраст ReleaseDate Дата мировой премьеры RussianDate Дата премьеры в России Duration Продолжительность Quality Качество видео Translation Перевод SubtitlesType Вид субтитров Subtitles Субтитры Video Видео Resolution Разрешение видео Audio1 Аудио1 Audio2 Аудио2 Audio3 Аудио3 Kinopoisk Рейтинг кинопоиска Imdb Рейтинг IMDb NNM Рейтинг nnm-club Sound Звук Size Размер DateCreate Дата создания раздачи Torrent Ссылка на torrent Magnet Ссылка на magnet Poster Ссылка на постер Seeders Количество раздающих Leechers Количество скачивающих

type NC

type NC struct {
	// contains filtered or unexported fields
}

NC values: client http.Client with cookie

func Init

func Init(login, pass, address, proxyURL string, debug bool) (*NC, error)

Init nnmc with login password

func (*NC) ParseForumTree

func (n *NC) ParseForumTree(href string) ([]Topic, error)

ParseForumTree get topics from forumTree

func (*NC) ParseTopic

func (n *NC) ParseTopic(topic Topic) (Film, error)

ParseTopic get film from topic

type Topic

type Topic struct {
	Href     string
	Name     string
	Year     string
	Quality  string
	Seeders  int
	Leechers int
	Body     []byte
}

Topic from forum

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL