add check to prevent prints in weboob modules
This commit is contained in:
parent
1eb96574d0
commit
be7d49312d
10 changed files with 11 additions and 42 deletions
|
|
@ -18,8 +18,6 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import urllib
|
||||
|
||||
from weboob.tools.browser import Browser, BrowserIncorrectPassword, BrowserUnavailable,\
|
||||
|
|
@ -71,7 +69,6 @@ class GDCVaultBrowser(Browser):
|
|||
data = self.readurl('http://gdcvault.com/api/login.php',
|
||||
urllib.urlencode(params))
|
||||
# some data returned as JSON, not sure yet if it's useful
|
||||
#print data
|
||||
|
||||
if data is None:
|
||||
self.openurl('/logout', '')
|
||||
|
|
@ -100,9 +97,7 @@ class GDCVaultBrowser(Browser):
|
|||
self.open_novisit(url)
|
||||
#headers = req.info()
|
||||
except HTTPError as e:
|
||||
# print e.getcode()
|
||||
if e.getcode() == 302 and hasattr(e, 'hdrs'):
|
||||
#print e.hdrs['Location']
|
||||
if e.hdrs['Location'] in ['/', '/login']:
|
||||
requires_account = True
|
||||
else:
|
||||
|
|
@ -117,7 +112,6 @@ class GDCVaultBrowser(Browser):
|
|||
if video is None:
|
||||
m = re.match('http://[w\.]*gdcvault.com/play/(?P<id>[\d]+)/?.*', url)
|
||||
if m:
|
||||
# print m.group(1)
|
||||
video = GDCVaultVideo(int(m.group(1)))
|
||||
else:
|
||||
raise BrowserUnavailable('Cannot find ID on page with redirection')
|
||||
|
|
@ -142,7 +136,6 @@ class GDCVaultBrowser(Browser):
|
|||
self.addheaders = [('Referer', 'http://gdcvault.com/'),
|
||||
("Content-Type" , 'application/x-www-form-urlencoded') ]
|
||||
|
||||
#print post_data
|
||||
# is_logged assumes html page
|
||||
self.location('http://gdcvault.com/search.php',
|
||||
data=post_data, no_login=True)
|
||||
|
|
@ -151,7 +144,6 @@ class GDCVaultBrowser(Browser):
|
|||
return self.page.iter_videos()
|
||||
|
||||
def latest_videos(self):
|
||||
print("browser:latest_videos()")
|
||||
#self.home()
|
||||
self.location('/free')
|
||||
assert self.is_on_page(IndexPage)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue