示例#1
0
文件: dbg.py 项目: swetly/zamundabg
dbg = True
p**n = True
url = 'http://zamunda.net'

__resource__ = os.path.join(  os.getcwd(), 'resources', 'lib' )
sys.path.insert(0, __resource__)
from zamunda import zamunda

if __name__ == '__main__':
  if len(sys.argv) != 2:
    sys.exit('wrong argument')
  try:
    z = zamunda(
                  xxx=True,
                  base_url=url,
                  usr=usr,
                  passwd=psw,
                  path=os.path.join(os.getcwd(), '', 'tmp'),
                  dbg=True)
    for i in z.index():
      print i

    for r in z.page(0, '0', sys.argv[1]):
      if r['path'] != 'next_page':
        print r['info']['plot'].encode('utf8')
        print z.get_magnet(r['path'])
  except Exception, e:
    traceback.print_exc()
    print '%s, %s' % (str(e.args[0]), sys.exc_info())
    pass
示例#2
0
  payload['an'] = __scriptname__
  payload['av'] = __version__
  payload['ec'] = name
  payload['ea'] = 'zamunda'
  payload['ev'] = '1'
  payload['dl'] = urllib.quote_plus(dat.encode('utf-8'))
  ga().update(payload, crash)

import traceback
try:
  from zamunda import zamunda
  z = zamunda(
              xxx = xxx,
              base_url = __addon__.getSetting('base'),
              usr = __addon__.getSetting('username'),
              passwd = __addon__.getSetting('password'),
              baud = ba,
              bsub = bs,
              path = __profile__,
              dbg = dbg
            )
except Exception, e:
  if e.args[0] == 'LoginFail':
    Notify('LoginFail', 'Check login data')
  else:
    Notify('Module Import', 'Fail')
  traceback.print_exc()
  update('exception', e.args[0], sys.exc_info())
  raise

def index_video(page, cat, search):
  try: