diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-20 17:31:43 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-20 17:31:43 +0200 |
commit | c27b60578e661a24dfe49a0c285fd58751711587 (patch) | |
tree | 077b281f8c8d23970fe934f69ca608b12f70a33c /module/plugins | |
parent | New OCR CircleCaptcha (diff) | |
download | pyload-c27b60578e661a24dfe49a0c285fd58751711587.tar.xz |
[SimpleHoster] Tiny code cosmetics
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 4bf41a478..547c412ad 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -251,27 +251,27 @@ class SimpleHoster(Hoster): """ - Info patterns should be defined by each hoster: + Info patterns: - INFO_PATTERN: (optional) Name and Size of the file + INFO_PATTERN: (mandatory) Name and Size of the file example: INFO_PATTERN = r'(?P<N>file_name) (?P<S>file_size) (?P<U>size_unit)' or - NAME_PATTERN: (optional) Name that will be set for the file + NAME_PATTERN: (mandatory) Name that will be set for the file example: NAME_PATTERN = r'(?P<N>file_name)' - SIZE_PATTERN: (optional) Size that will be checked for the file + SIZE_PATTERN: (mandatory) Size that will be checked for the file example: SIZE_PATTERN = r'(?P<S>file_size) (?P<U>size_unit)' HASHSUM_PATTERN: (optional) Hash code and type of the file example: HASHSUM_PATTERN = r'(?P<H>hash_code) (?P<T>MD5)' - OFFLINE_PATTERN: (optional) Check if the page is unreachable + OFFLINE_PATTERN: (mandatory) Check if the page is unreachable example: OFFLINE_PATTERN = r'File (deleted|not found)' TEMP_OFFLINE_PATTERN: (optional) Check if the page is temporarily unreachable example: TEMP_OFFLINE_PATTERN = r'Server (maintenance|maintainance)' - Error handling patterns are all optional: + Error patterns: WAIT_PATTERN: (optional) Detect waiting time example: WAIT_PATTERN = r'' @@ -280,22 +280,22 @@ class SimpleHoster(Hoster): example: PREMIUM_ONLY_PATTERN = r'Premium account required' HAPPY_HOUR_PATTERN: (optional) - example: + example: HAPPY_HOUR_PATTERN = r'Happy hour' IP_BLOCKED_PATTERN: (optional) - example: + example: IP_BLOCKED_PATTERN = r'in your country' DOWNLOAD_LIMIT_PATTERN: (optional) - example: + example: DOWNLOAD_LIMIT_PATTERN = r'download limit' SIZE_LIMIT_PATTERN: (optional) - example: + example: SIZE_LIMIT_PATTERN = r'up to' ERROR_PATTERN: (optional) Detect any error preventing download example: ERROR_PATTERN = r'' - Instead overriding handleFree and handlePremium methods you can define the following patterns for direct download: + Instead overriding handleFree and handlePremium methods you may define the following patterns for basic link handling: LINK_FREE_PATTERN: (optional) group(1) should be the direct link for free download example: LINK_FREE_PATTERN = r'<div class="link"><a href="(.+?)"' |