diff options
| author | 2013-03-13 16:49:42 +0100 | |
|---|---|---|
| committer | 2013-03-13 16:49:42 +0100 | |
| commit | b3118afc4b8b03a8c248529757c9558610075a33 (patch) | |
| tree | 9abac1c5b724299fc863d3635f51c7e81c7cf956 | |
| parent | Merge branch 'stable' of git://github.com/pyload/pyload into stable (diff) | |
| download | pyload-b3118afc4b8b03a8c248529757c9558610075a33.tar.xz | |
XvidstageCom: I can now recognize if a file is offline
| -rw-r--r-- | module/plugins/hoster/XvidstageCom.py | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/module/plugins/hoster/XvidstageCom.py b/module/plugins/hoster/XvidstageCom.py index 6f3559d17..14079df43 100644 --- a/module/plugins/hoster/XvidstageCom.py +++ b/module/plugins/hoster/XvidstageCom.py @@ -37,9 +37,10 @@ def getInfo(urls):  def parseFileInfo(url, getInfoMode = False):  	html = getURL(url)  	info = {"name" : url, "size" : 0, "status" : 3} -	info['name'] = re.search(r'(?:Filename|Dateiname):</b></td><td nowrap[^>]*?>(.*?)<', html).group(1) -	info['size'] = re.search(r'(?:Size|Größe):</b></td><td>.*? <small>\((\d+?) bytes\)', html).group(1) -	if info['size'] == 0: +	try: +		info['name'] = re.search(r'(?:Filename|Dateiname):</b></td><td nowrap[^>]*?>(.*?)<', html).group(1) +		info['size'] = re.search(r'(?:Size|Größe):</b></td><td>.*? <small>\((\d+?) bytes\)', html).group(1) +	except: ## The file is offline  		info['status'] = 1  	else:  		info['status'] = 2 @@ -51,7 +52,7 @@ def parseFileInfo(url, getInfoMode = False):  class XvidstageCom(Hoster):  	__name__ = 'XvidstageCom' -	__version__ = '0.2' +	__version__ = '0.3'  	__pattern__ = r'http://(?:www.)?xvidstage.com/(?P<id>[0-9A-Za-z]+)'  	__type__ = 'hoster'  	__description__ = """A Plugin that allows you to download files from http://xvidstage.com""" | 
