From c27b60578e661a24dfe49a0c285fd58751711587 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 20 May 2015 17:31:43 +0200 Subject: [SimpleHoster] Tiny code cosmetics --- module/plugins/internal/SimpleHoster.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'module/plugins') 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'(?Pfile_name) (?Pfile_size) (?Psize_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'(?Pfile_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'(?Pfile_size) (?Psize_unit)' HASHSUM_PATTERN: (optional) Hash code and type of the file example: HASHSUM_PATTERN = r'(?Phash_code) (?PMD5)' - 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'