summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-27 17:07:33 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-27 17:07:33 +0200
commita33d8062833d1bfec4777145cc484c1d6b9e141f (patch)
tree7d815f80cdcced2d36144b9b71760278d29ed007 /module/plugins/hoster
parentlocale fixes (diff)
downloadpyload-a33d8062833d1bfec4777145cc484c1d6b9e141f.tar.xz
some automatic fixes
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/DepositfilesCom.py4
-rw-r--r--module/plugins/hoster/FileserveCom.py58
-rw-r--r--module/plugins/hoster/FreakshareNet.py12
-rw-r--r--module/plugins/hoster/HotfileCom.py2
-rw-r--r--module/plugins/hoster/MegauploadCom.py4
-rw-r--r--module/plugins/hoster/MegavideoCom.py10
-rw-r--r--module/plugins/hoster/NetloadIn.py20
-rw-r--r--module/plugins/hoster/PornhostCom.py10
-rw-r--r--module/plugins/hoster/PornhubCom.py8
-rw-r--r--module/plugins/hoster/RapidshareCom.py10
-rw-r--r--module/plugins/hoster/RedtubeCom.py8
-rw-r--r--module/plugins/hoster/ShareCx.py16
-rw-r--r--module/plugins/hoster/ShragleCom.py10
-rw-r--r--module/plugins/hoster/UploadedTo.py2
-rw-r--r--module/plugins/hoster/YoupornCom.py10
-rw-r--r--module/plugins/hoster/YoutubeCom.py2
-rw-r--r--module/plugins/hoster/ZippyshareCom.py6
17 files changed, 94 insertions, 98 deletions
diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py
index c91341887..28d0819d7 100644
--- a/module/plugins/hoster/DepositfilesCom.py
+++ b/module/plugins/hoster/DepositfilesCom.py
@@ -32,12 +32,12 @@ class DepositfilesCom(Hoster):
self.download(link)
def handleFree(self):
- if re.search(r'File is checked, please try again in a minute.', self.html) != None:
+ if re.search(r'File is checked, please try again in a minute.', self.html) is not None:
self.log.info("DepositFiles.com: The file is being checked. Waiting 1 minute.")
self.setWait(61)
self.wait()
- if re.search(r'Such file does not exist or it has been removed for infringement of copyrights', self.html) != None:
+ if re.search(r'Such file does not exist or it has been removed for infringement of copyrights', self.html) is not None:
self.offline()
self.html = self.load(self.pyfile.url, post={"gateway_result":"1"})
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index ff09d9a0a..753baa800 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -2,26 +2,26 @@
import re
from module.plugins.Hoster import Hoster
-from module.plugins.ReCaptcha import ReCaptcha
-
+from module.plugins.ReCaptcha import ReCaptcha
+
from module.network.Request import getURL
-
-def getInfo(urls):
- result = []
-
- for url in urls:
+
+def getInfo(urls):
+ result = []
+
+ for url in urls:
html = getURL(url)
if re.search(r'<h1>File not available</h1>', html):
- result.append((url, 0, 1, url))
- continue
-
+ result.append((url, 0, 1, url))
+ continue
+
size = re.search(r"<span><strong>(.*?) MB</strong>", html).group(1)
- size = int(float(size)*1024*1024)
+ size = int(float(size)*1024*1024)
- name = re.search('<h1>(.*?)<br/></h1>', html).group(1)
- result.append((name, size, 2, url))
-
- yield result
+ name = re.search('<h1>(.*?)<br/></h1>', html).group(1)
+ result.append((name, size, 2, url))
+
+ yield result
class FileserveCom(Hoster):
__name__ = "FileserveCom"
@@ -38,20 +38,20 @@ class FileserveCom(Hoster):
def process(self, pyfile):
self.html = self.load(self.pyfile.url, cookies=False if self.account else True)
- if re.search(r'<h1>File not available</h1>', self.html) != None:
- self.offline
+ if re.search(r'<h1>File not available</h1>', self.html) is not None:
+ self.offline()
self.pyfile.name = re.search('<h1>(.*?)<br/></h1>', self.html).group(1)
-
- if self.account:
- self.handlePremium()
- else:
- self.handleFree()
-
- def handlePremium(self):
- self.download(self.pyfile.url, post={"download":"premium"}, cookies=True)
-
- def handleFree(self):
+
+ if self.account:
+ self.handlePremium()
+ else:
+ self.handleFree()
+
+ def handlePremium(self):
+ self.download(self.pyfile.url, post={"download":"premium"}, cookies=True)
+
+ def handleFree(self):
if r'<div id="captchaArea" style="display:none;">' in self.html or \
r'/showCaptcha\(\);' in self.html:
@@ -72,11 +72,11 @@ class FileserveCom(Hoster):
wait_time = 30
m = re.search(r'<span>(.*?)\sSekunden</span>', html)
- if m != None:
+ if m is not None:
wait_time = int( m.group(1).split('.')[0] ) + 1
m = re.search(r'You need to wait (.*?) seconds to start another download.', html)
- if m != None:
+ if m is not None:
wait_time = int( m.group(1) )
self.wantReconnect = True
diff --git a/module/plugins/hoster/FreakshareNet.py b/module/plugins/hoster/FreakshareNet.py
index 1bb36737e..76a906ad2 100644
--- a/module/plugins/hoster/FreakshareNet.py
+++ b/module/plugins/hoster/FreakshareNet.py
@@ -37,7 +37,7 @@ class FreakshareNet(Hoster):
self.download_html()
if not self.file_exists():
- self.offline
+ self.offline()
self.setWait( self.get_waiting_time() )
@@ -54,7 +54,7 @@ class FreakshareNet(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
if not self.wantReconnect:
self.req_opts = self.get_download_options() # get the Post options for the Request
@@ -64,7 +64,7 @@ class FreakshareNet(Hoster):
self.offline()
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
if not self.wantReconnect:
file_name = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center\;\">([^ ]+)", self.html).group(1)
@@ -73,7 +73,7 @@ class FreakshareNet(Hoster):
return self.pyfile.url
def get_waiting_time(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
timestring = re.search('\s*var\stime\s=\s(\d*?)\.\d*;', self.html).group(1)
if timestring:
@@ -85,9 +85,9 @@ class FreakshareNet(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r"Sorry, this Download doesnt exist anymore", self.html) != None:
+ if re.search(r"Sorry, this Download doesnt exist anymore", self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py
index 78128db1d..d5d255b1a 100644
--- a/module/plugins/hoster/HotfileCom.py
+++ b/module/plugins/hoster/HotfileCom.py
@@ -23,7 +23,7 @@ def getInfo(urls):
if fields[1] in ("1", "2"):
status = 2
- elif fields[1]:
+ else:
status = 1
result.append((fields[2], int(fields[3]), status, chunk[i]))
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py
index a14c2c76f..3e257d0b1 100644
--- a/module/plugins/hoster/MegauploadCom.py
+++ b/module/plugins/hoster/MegauploadCom.py
@@ -80,7 +80,7 @@ class MegauploadCom(Hoster):
captchacode = re.search('name="captchacode" value="(.*)"', self.html[0]).group(1)
megavar = re.search('name="megavar" value="(.*)">', self.html[0]).group(1)
self.html[1] = self.load(self.pyfile.url, post={"captcha": captcha, "captchacode": captchacode, "megavar": megavar})
- if re.search(r"Waiting time before each download begins", self.html[1]) != None:
+ if re.search(r"Waiting time before each download begins", self.html[1]) is not None:
break
def get_file_url(self):
@@ -94,7 +94,7 @@ class MegauploadCom(Hoster):
def file_exists(self):
self.download_html()
- if re.search(r"Unfortunately, the link you have clicked is not available.", self.html[0]) != None or \
+ if re.search(r"Unfortunately, the link you have clicked is not available.", self.html[0]) is not None or \
re.search(r"Download limit exceeded", self.html[0]):
return False
return True
diff --git a/module/plugins/hoster/MegavideoCom.py b/module/plugins/hoster/MegavideoCom.py
index 7ea045447..e4b41605b 100644
--- a/module/plugins/hoster/MegavideoCom.py
+++ b/module/plugins/hoster/MegavideoCom.py
@@ -27,7 +27,7 @@ class MegavideoCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
# get id
@@ -90,7 +90,7 @@ class MegavideoCom(Hoster):
return out.lower()
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
name = re.search("flashvars.title = \"(.*?)\";", self.html).group(1)
@@ -100,11 +100,11 @@ class MegavideoCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r"Dieses Video ist nicht verfügbar.", self.html) != None or \
- re.search(r"This video is unavailable.", self.html) != None:
+ if re.search(r"Dieses Video ist nicht verfügbar.", self.html) is not None or \
+ re.search(r"This video is unavailable.", self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index 6f0cb9461..dc5d2a028 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -28,7 +28,7 @@ def getInfo(urls):
api = getURL(apiurl+ids)
- if api == None or len(api) < 10:
+ if api is None or len(api) < 10:
print "Netload prefetch: failed "
return
if api.find("unknown_auth") >= 0:
@@ -111,7 +111,7 @@ class NetloadIn(Hoster):
if self.api_data["status"] == "online":
self.api_data["checksum"] = lines[4].strip()
else:
- self.offline();
+ self.offline()
else:
self.api_data["exists"] = False
else:
@@ -134,12 +134,12 @@ class NetloadIn(Hoster):
if self.getConf('dumpgen'):
print page
- if re.search(r"(We will prepare your download..)", page) != None:
+ if re.search(r"(We will prepare your download..)", page) is not None:
self.log.debug("Netload: We will prepare your download")
- self.final_wait(page);
+ self.final_wait(page)
return True
- if re.search(r"(We had a reqeust with the IP)", page) != None:
- wait = self.get_wait_time(page);
+ if re.search(r"(We had a reqeust with the IP)", page) is not None:
+ wait = self.get_wait_time(page)
if wait == 0:
self.log.debug("Netload: Wait was 0 setting 30")
wait = 30
@@ -149,7 +149,7 @@ class NetloadIn(Hoster):
self.wait()
link = re.search(r"You can download now your next file. <a href=\"(index.php\?id=10&amp;.*)\" class=\"Orange_Link\">Click here for the download</a>", page)
- if link != None:
+ if link is not None:
self.log.debug("Netload: Using new link found on page")
page = self.load("http://netload.in/" + link.group(1).replace("amp;", ""))
else:
@@ -172,7 +172,7 @@ class NetloadIn(Hoster):
file_id = re.search('<input name="file_id" type="hidden" value="(.*)" />', page).group(1)
if not captchawaited:
- wait = self.get_wait_time(page);
+ wait = self.get_wait_time(page)
self.log.info(_("Netload: waiting for captcha %d s." % wait))
self.setWait(wait)
self.wait()
@@ -189,13 +189,13 @@ class NetloadIn(Hoster):
try:
file_url_pattern = r"<a class=\"Orange_Link\" href=\"(http://.+)\" >Click here"
attempt = re.search(file_url_pattern, page)
- if attempt != None:
+ if attempt is not None:
return attempt.group(1)
else:
self.log.debug("Netload: Backup try for final link")
file_url_pattern = r"<a href=\"(.+)\" class=\"Orange_Link\">Click here"
attempt = re.search(file_url_pattern, page)
- return "http://netload.in/"+attempt.group(1);
+ return "http://netload.in/"+attempt.group(1)
except:
self.log.debug("Netload: Getting final link failed")
return None
diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py
index 5dd681b5b..7a969f7f7 100644
--- a/module/plugins/hoster/PornhostCom.py
+++ b/module/plugins/hoster/PornhostCom.py
@@ -30,7 +30,7 @@ class PornhostCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
file_url = re.search(r'download this file</label>.*?<a href="(.*?)"', self.html)
@@ -46,7 +46,7 @@ class PornhostCom(Hoster):
return file_url
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
name = re.search(r'<title>pornhost\.com - free file hosting with a twist - gallery(.*?)</title>', self.html)
@@ -64,11 +64,11 @@ class PornhostCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r'gallery not found', self.html) != None \
- or re.search(r'You will be redirected to', self.html) != None:
+ if re.search(r'gallery not found', self.html) is not None \
+ or re.search(r'You will be redirected to', self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py
index ea7e1423c..abc489e30 100644
--- a/module/plugins/hoster/PornhubCom.py
+++ b/module/plugins/hoster/PornhubCom.py
@@ -28,7 +28,7 @@ class PornhubCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
url = "http://www.pornhub.com//gateway.php"
@@ -46,7 +46,7 @@ class PornhubCom(Hoster):
return file_url
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
name = re.findall('<h1>(.*?)</h1>', self.html)[1] + ".flv"
@@ -56,10 +56,10 @@ class PornhubCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r'This video is no longer in our database or is in conversion', self.html) != None:
+ if re.search(r'This video is no longer in our database or is in conversion', self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py
index f9af201cb..844d716ed 100644
--- a/module/plugins/hoster/RapidshareCom.py
+++ b/module/plugins/hoster/RapidshareCom.py
@@ -113,12 +113,8 @@ class RapidshareCom(Hoster):
if src.startswith("ERROR"):
return
fields = src.split(",")
- self.api_data = {}
- self.api_data["fileid"] = fields[0]
- self.api_data["filename"] = fields[1]
- self.api_data["size"] = int(fields[2]) # in bytes
- self.api_data["serverid"] = fields[3]
- self.api_data["status"] = fields[4]
+ self.api_data = {"fileid": fields[0], "filename": fields[1], "size": int(fields[2]), "serverid": fields[3],
+ "status": fields[4]}
"""
status codes:
0=File not found
@@ -155,7 +151,7 @@ class RapidshareCom(Hoster):
self.wantReconnect = True
return 60 * int(wait_minutes) + 60
except:
- if re.search(r"(Currently a lot of users|no more download slots|servers are overloaded)", self.html[1], re.I) != None:
+ if re.search(r"(Currently a lot of users|no more download slots|servers are overloaded)", self.html[1], re.I) is not None:
self.log.info(_("Rapidshare: No free slots!"))
self.no_slots = True
return time() + 130
diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py
index 6a9baffbe..748ab04f0 100644
--- a/module/plugins/hoster/RedtubeCom.py
+++ b/module/plugins/hoster/RedtubeCom.py
@@ -29,7 +29,7 @@ class RedtubeCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
file_url = unescape(re.search(r'hashlink=(http.*?)"', self.html).group(1))
@@ -37,7 +37,7 @@ class RedtubeCom(Hoster):
return file_url
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
name = re.search('<title>(.*?)- RedTube - Free Porn Videos</title>', self.html).group(1).strip() + ".flv"
@@ -46,10 +46,10 @@ class RedtubeCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r'This video has been removed.', self.html) != None:
+ if re.search(r'This video has been removed.', self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/ShareCx.py b/module/plugins/hoster/ShareCx.py
index e64459754..63a51eab7 100644
--- a/module/plugins/hoster/ShareCx.py
+++ b/module/plugins/hoster/ShareCx.py
@@ -62,7 +62,7 @@ class ShareCx(Hoster):
def doDownload(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
op = re.search(r'name="op" value="(.*?)"', self.html).group(1)
@@ -83,7 +83,7 @@ class ShareCx(Hoster):
m = re.search(r'startTimer\((\d+)\)', self.html)
- if m != None:
+ if m is not None:
wait_time = int(m.group(1))
self.setWait(wait_time)
self.wantReconnect = True
@@ -91,9 +91,9 @@ class ShareCx(Hoster):
self.wait()
m = re.search(r'countdown">.*?(\d+).*?</span>', self.html)
- if m == None:
+ if m is None:
m = re.search(r'id="countdown_str".*?<span id=".*?">.*?(\d+).*?</span', self.html)
- if m != None:
+ if m is not None:
wait_time = int(m.group(1))
self.setWait(wait_time)
self.wantReconnect = False
@@ -120,7 +120,7 @@ class ShareCx(Hoster):
}
if '/captchas/' in self.html:
- captcha_url = re.search(r'(http://(?:[\w\d]+\.)?.*?/captchas/.*?)').group(1)
+ captcha_url = re.search(r'(http://(?:[\w\d]+\.)?.*?/captchas/.*?)', self.html).group(1)
captcha = self.decryptCaptcha(captcha_url)
data["code"] = captcha
@@ -135,7 +135,7 @@ class ShareCx(Hoster):
# postfields["method_free"] = "Datei herunterladen"
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
name = re.search(r'alt="Download" /></span>(.*?)</h3>', self.html).group(1)
@@ -144,10 +144,10 @@ class ShareCx(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r'File not found<br>It was deleted due to inactivity or abuse request', self.html) != None:
+ if re.search(r'File not found<br>It was deleted due to inactivity or abuse request', self.html) is not None:
return False
return True
diff --git a/module/plugins/hoster/ShragleCom.py b/module/plugins/hoster/ShragleCom.py
index e634607b0..65d2787f0 100644
--- a/module/plugins/hoster/ShragleCom.py
+++ b/module/plugins/hoster/ShragleCom.py
@@ -24,7 +24,7 @@ class ShragleCom(Hoster):
def set_parent_status(self):
""" sets all available Statusinfos about a File in self.parent.status
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
self.parent.status.filename = self.get_file_name()
self.parent.status.url = self.get_file_url()
@@ -38,7 +38,7 @@ class ShragleCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
self.fileID = re.search(r"name=\"fileID\" value=\"([^\"]+)", self.html).group(1)
@@ -49,7 +49,7 @@ class ShragleCom(Hoster):
return "http://srv4.shragle.com/download.php"
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
file_name_pattern = r"<\/div><h2>(.+)<\/h2"
@@ -58,10 +58,10 @@ class ShragleCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r"html", self.html) == None:
+ if re.search(r"html", self.html) is None:
return False
else:
return True
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index a2165bd5e..b0c3486e3 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -137,7 +137,7 @@ class UploadedTo(Hoster):
return self.pyfile.url.split('/')[-1]
def file_exists(self):
- if re.search(r"(File doesn't exist)", self.html) != None:
+ if re.search(r"(File doesn't exist)", self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py
index 5c07f2c84..fb9ef5a02 100644
--- a/module/plugins/hoster/YoupornCom.py
+++ b/module/plugins/hoster/YoupornCom.py
@@ -23,7 +23,7 @@ class YoupornCom(Hoster):
def set_parent_status(self):
""" sets all available Statusinfos about a File in self.parent.status
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
self.parent.status.filename = self.get_file_name()
self.parent.status.url = self.get_file_url()
@@ -36,14 +36,14 @@ class YoupornCom(Hoster):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
file_url = re.search(r'(http://download.youporn.com/download/\d*/.*\?download=1&ll=1&t=dd)">', self.html).group(1)
return file_url
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
file_name_pattern = r".*<title>(.*) - Free Porn Videos - YouPorn.com Lite \(BETA\)</title>.*"
@@ -52,9 +52,9 @@ class YoupornCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r"(.*invalid video_id.*)", self.html) != None:
+ if re.search(r"(.*invalid video_id.*)", self.html) is not None:
return False
else:
return True
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index 79c359ad7..6b69c3fd4 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -17,7 +17,7 @@ class YoutubeCom(Hoster):
def process(self, pyfile):
html = self.load(pyfile.url)
- if re.search(r"(.*eine fehlerhafte Video-ID\.)", html) != None:
+ if re.search(r"(.*eine fehlerhafte Video-ID\.)", html) is not None:
self.offline()
videoId = pyfile.url.split("v=")[1].split("&")[0]
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py
index 3740f8c14..d42ce3578 100644
--- a/module/plugins/hoster/ZippyshareCom.py
+++ b/module/plugins/hoster/ZippyshareCom.py
@@ -41,7 +41,7 @@ class ZippyshareCom(Hoster):
return file_url
def get_file_name(self):
- if self.html == None:
+ if self.html is None:
self.download_html()
if not self.wantReconnect:
file_name = re.search(r'Name: </font> <font.*>(.*?)</font>', self.html).group(1)
@@ -52,9 +52,9 @@ class ZippyshareCom(Hoster):
def file_exists(self):
""" returns True or False
"""
- if self.html == None:
+ if self.html is None:
self.download_html()
- if re.search(r'File does not exist on this server', self.html) != None:
+ if re.search(r'File does not exist on this server', self.html) is not None:
return False
else:
return True