input Package

input Package

Plugins for “input” feed phase.

apple_trailers Module

class flexget.plugins.input.apple_trailers.AppleTrailers

Bases: flexget.plugins.input.rss.InputRSS

Adds support for Apple.com movie trailers.

apple_trailers: 480p

Choice of quality is one of: ipod, ‘320’, ‘480’, 640w, 480p, 720p, 1080p

on_feed_input(*args, **kwargs)
on_feed_start(feed, config)
validator()

backlog Module

class flexget.plugins.input.backlog.BacklogEntry(**kwargs)

Bases: sqlalchemy.ext.declarative.Base

entry
expire
feed
id
title
class flexget.plugins.input.backlog.InputBacklog

Bases: object

Keeps feed history for given amount of time.

Example:

backlog: 4 days

Rarely useful for end users, mainly used by other plugins.

add_backlog(feed, entry, amount='')

Add single entry to feed backlog

If :amount: is not specified, entry will only be injected on next execution.

get_injections(feed)

Insert missing entries from backlog.

learn_backlog(feed, amount='')

Learn current entries into backlog. All feed inputs must have been executed.

on_feed_abort(feed, config)

Remember all entries until next execution when feed gets aborted.

on_feed_input(feed, config)
validator()

discover Module

class flexget.plugins.input.discover.Discover

Bases: object

Discover content based on other inputs material.

Example:

discover:
what:
  • emit_series: yes
from:
  • piratebay
execute_inputs(config, feed)
Parameters:
  • config – Discover config
  • feed – Current feed
Returns:

List of pseudo entries created by inputs under what configuration

execute_searches(config, entries)
Parameters:
  • config – Discover plugin config
  • entries – List of pseudo entries to search
Returns:

List of entries found from search engines listed under from configuration

on_feed_input(*args, **kwargs)
validator()

emit_movie_queue Module

class flexget.plugins.input.emit_movie_queue.EmitIMDBQueue

Bases: object

Use your imdb queue as an input by emitting the content of it

on_feed_input(feed, config)
prepare_config(config)
validator()

emit_series Module

class flexget.plugins.input.emit_series.EmitSeries

Bases: flexget.plugins.filter.series.SeriesDatabase

Emit next episode number from all known series.

Supports only series enumerated by season, episode.

on_feed_input(feed, config)
validator()

find Module

class flexget.plugins.input.find.InputFind

Bases: object

Uses local path content as an input, recurses through directories and creates entries for files that match mask.

You can specify either the mask key, in shell file matching format, (see python fnmatch module,) or regexp key.

Example:

find:
path: /storage/movies/ mask: *.avi

Example:

find:
path:
  • /storage/movies/
  • /storage/tv/

regexp: .*.(avi|mkv)$

on_feed_input(*args, **kwargs)
prepare_config(config)
validator()

gen_series Module

class flexget.plugins.input.gen_series.GenSeries(plugin_info, *args, **kw)

Bases: flexget.plugin.DebugPlugin

Purely for debugging purposes. Not great quality :)

gen_series_data:

series: NUM seasons: NUM episodes: NUM qualities:

  • LIST

this will also configure series plugin for testing

on_feed_exit(feed, config)
on_feed_input(feed, config)
on_process_start(feed, config)
validator()

generate Module

class flexget.plugins.input.generate.Generate(plugin_info, *args, **kw)

Bases: flexget.plugin.DebugPlugin

Generates n number of random entries. Used for debugging purposes.

on_feed_input(feed, config)
validator()

html Module

class flexget.plugins.input.html.InputHtml

Bases: object

Parses urls from html page. Usefull on sites which have direct download links of any type (mp3, jpg, torrent, ...).

Many anime-fansubbers do not provide RSS-feed, this works well in many cases.

Configuration expects url parameter.

Note: This returns ALL links on url so you need to configure filters to match only to desired content.

build_config(config)
create_entries(page_url, soup, config)
on_feed_input(*args, **kwargs)
validator()

imdb_list Module

class flexget.plugins.input.imdb_list.ImdbList

Bases: object

“Creates an entry for each movie in your imdb list.

on_feed_input(*args, **kwargs)
validator()

inject Module

class flexget.plugins.input.inject.InputInject

Bases: object

Allows injecting imaginary entry for FlexGet to process.

Syntax:

–inject <TITLE> [URL] [ACCEPTED] [IMMORTAL]

Random url will be generated. All other inputs from freed(s) are disabled.

Example use:

flexget –inject “Some.Series.S02E12.Imaginary” –feed my-series –learn

This would inject imaginary series into a single feed and learn it as a downloaded, assuming feed accepts the injected entry.

on_feed_input(feed)
static optik_series(option, opt, value, parser)

–inject <TITLE> [URL] [ACCEPTED] [IMMORTAL]

options = {}

input_csv Module

class flexget.plugins.input.input_csv.InputCSV

Bases: object

Adds support for CSV format. Configuration may seem a bit complex, but this has advantage of being universal solution regardless of CSV and internal entry fields.

Configuration format:

csv:

url: <url> values:

<field>: <number>

Example DB-fansubs:

csv:

url: http://www.dattebayo.com/t/dump values:

title: 3 # title is in 3th field url: 1 # download url is in 1st field

Fields title and url are mandatory. First field is 1. List of other common (optional) fields can be found from wiki.

on_feed_input(*args, **kwargs)
validator()

inputs Module

class flexget.plugins.input.inputs.PluginInputs

Bases: object

Allows the same input plugin to be configured multiple times in a feed.

Example:
inputs:
on_feed_input(feed, config)
validator()

listdir Module

Plugin for filesystem feeds.

class flexget.plugins.input.listdir.Listdir(plugin_info, *args, **kw)

Bases: flexget.plugin.Plugin

Uses local path content as an input.

Example:

listdir: /storage/movies/

on_feed_input(feed, config)
validator()

mock Module

Plugin for mocking feed data.

class flexget.plugins.input.mock.Mock(plugin_info, *args, **kw)

Bases: flexget.plugin.Plugin

Allows adding mock input entries. Example:

mock:

If url is not given a random url pointing to localhost will be generated.

on_feed_input(feed, config)
validator()

rlslog Module

class flexget.plugins.input.rlslog.RlsLog

Bases: object

Adds support for rlslog.net as a feed.

on_feed_input(*args, **kwargs)
parse_rlslog(rlslog_url, feed)
Parameters:
  • rlslog_url – Url to parse from
  • feed – Feed instance
Returns:

List of release dictionaries

validator()

rss Module

class flexget.plugins.input.rss.InputRSS

Bases: object

Parses RSS feed.

Hazzlefree configuration for public rss feeds:

rss: <url>

Configuration with basic http authentication:

rss:
url: <url> username: <name> password: <password>

Advanced usages:

You may wish to clean up the entry by stripping out all non-ascii characters. This can be done by setting ascii value to yes.

Example:

rss:
url: <url> ascii: yes

In case RSS-feed uses some nonstandard field for urls and automatic detection fails you can configure plugin to use url from any feedparser entry attribute.

Example:

rss:
url: <url> link: guid

If you want to keep information in another rss field attached to the flexget entry, you can use the other_fields option.

Example:

rss:
url: <url> other_fields: [date]

You can disable few possibly annoying warnings by setting silent value to yes on feeds where there are frequently invalid items.

Example:

rss:
url: <url> silent: yes

You can group all the links of an item, to make the download plugin tolerant to broken urls: it will try to download each url until one works. Links are enclosures plus item fields given by the link value, in that order. The value to set is “group_links”.

Example:

rss:
url: <url> group_links: yes
add_enclosure_info(entry, enclosure, filename=True, multiple=False)

Stores information from an rss enclosure into an Entry.

build_config(config)

Set default values to config

on_feed_input(*args, **kwargs)
process_invalid_content(feed, data)

If feedparser reports error, save the received data and log error.

validator()

scenereleases Module

class flexget.plugins.input.scenereleases.InputScenereleases

Uses scenereleases.info category url as input.

Example:

scenereleases: http://scenereleases.info/category/movies/movies-dvd-rip

on_feed_input(*args, **kwargs)
parse_site(url, feed)

Parse configured url and return releases array

validator()

tail Module

class flexget.plugins.input.tail.InputTail

Bases: object

Parse any text for entries using regular expression.

file: <file> entry:

<field>: <regexp to match value>
format:
<field>: <python string formatting>

Note: each entry must have atleast two fields, title and url

You may wish to specify encoding used by file so file can be properly decoded. List of encodings at http://docs.python.org/library/codecs.html#standard-encodings.

Example:

tail:

file: ~/irclogs/some/log entry:

title: ‘TITLE: (.*) URL:’ url: ‘URL: (.*)’

encoding: utf8

format_entry(entry, d)
on_feed_input(*args, **kwargs)
validator()
class flexget.plugins.input.tail.ResetTail

Bases: object

Adds –tail-reset

on_process_start(feed)

text Module

Plugin for text file or URL feeds via regex.

class flexget.plugins.input.text.Text(plugin_info, *args, **kw)

Bases: flexget.plugin.Plugin

Parse any text for entries using regular expression.

url: <url> entry:

<field>: <regexp to match value>
format:
<field>: <python string formatting>

Note: each entry must have atleast two fields, title and url

Example:

text:

url: http://www.nbc.com/Heroes/js/novels.js entry:

title: novelTitle = “(.*)” url: novelPrint = “(.*)”
format:
url: http://www.nbc.com%(url)s
format_entry(entry, d)
on_feed_input(*args, **kwargs)
validator()

thetvdb_favorites Module

class flexget.plugins.input.thetvdb_favorites.InputThetvdbFavorites

Bases: object

Creates a list of entries for your series marked as favorites at thetvdb.com for use in import_series.

Example:

import_series:
from:
thetvdb_favorites:
account_id: 23098230
on_feed_input(*args, **kwargs)
validator()
class flexget.plugins.input.thetvdb_favorites.ThetvdbFavorites(account_id, series_ids)

Bases: sqlalchemy.ext.declarative.Base

account_id
id
series_ids
updated

trakt_list Module

class flexget.plugins.input.trakt_list.TraktList

Bases: object

Creates an entry for each item in your trakt list.

Syntax:

trakt_list:
username: <value> api_key: <value> strip_dates: <yes|no> movies: <all|loved|hated|collection|watchlist> series: <all|loved|hated|collection|watchlist|watched> custom: <value>

Options username and api_key are required.

movie_map = {'movie_name': 'title', 'tmdb_id': 'tmdb_id', 'title': 'title', 'url': 'url', 'imdb_id': 'imdb_id', 'movie_year': 'year'}
on_feed_input(*args, **kwargs)
series_map = {'url': 'url', 'imdb_id': 'imdb_id', 'tvrage_id': 'tvrage_id', 'tvdb_id': 'tvdb_id', 'title': 'title'}
validator()

tvtorrents Module

class flexget.plugins.input.tvtorrents.InputTVTorrents

Bases: object

A customized HTML input plugin. Parses out full torrent URLs from TVTorrents’ page for Recently Aired TV shows.

A bit fragile right now, because it depends heavily on the exact structure of the HTML.

Just set tvt: true in your config, and provide the path to your login cookie by using the cookies plugin.

Note: Of yourse, you need to configure patterns filter to match only desired content. The series filter does NOT appear to work well with this plugin yet - just use a pattern like (lost|csi).*?720p until we figure out why.

Plugin-specific code by Fredrik Braenstroem.

on_feed_input(*args, **kwargs)
validator()