Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

NotImplementedError: Verification code required #440

Open
adamscao opened this issue May 9, 2015 · 5 comments
Open

NotImplementedError: Verification code required #440

adamscao opened this issue May 9, 2015 · 5 comments

Comments

@adamscao
Copy link

adamscao commented May 9, 2015

貌似迅雷离线今天加了验证码,那些码还非常难认。是不是需要新加个功能才能搞定?

[adams@arch1404 ~]$ lx l                                                                                                                               
Traceback (most recent call last):                                                                                                                     
  File "/home/adams/bin/lx", line 63, in <module>                                                                                                      
    execute_command()                                                                                                                                  
  File "/home/adams/bin/lx", line 60, in execute_command
    commands[command](args[1:])
  File "/home/adams/app/xunlei-lixian/lixian_cli_parser.py", line 165, in parse
    return f(parser(args_list, *args, **kwargs))
  File "/home/adams/app/xunlei-lixian/lixian_commands/list.py", line 50, in list_task
    tasks = lixian_query.search_tasks(client, args)
  File "/home/adams/app/xunlei-lixian/lixian_query.py", line 439, in search_tasks
    base.query_search()
  File "/home/adams/app/xunlei-lixian/lixian_query.py", line 161, in query_search
    self.download_jobs += query.query_search()
  File "/home/adams/app/xunlei-lixian/lixian.py", line 193, in __len__
    self.touch()
  File "/home/adams/app/xunlei-lixian/lixian.py", line 117, in touch
    self.hit_page(0)
  File "/home/adams/app/xunlei-lixian/lixian.py", line 122, in hit_page
    info = self.fetch_page(page, self.page_size)
  File "/home/adams/app/xunlei-lixian/lixian.py", line 491, in <lambda>
    fetch_page = lambda page_index, page_size: self.read_task_page_info_by_page_index(type_id, page_index, page_size)
  File "/home/adams/app/xunlei-lixian/lixian.py", line 449, in read_task_page_info_by_page_index
    return self.read_task_page_info_by_url(self.to_page_url(type_id, page_index, page_size))
  File "/home/adams/app/xunlei-lixian/lixian.py", line 22, in withretry
    return f(*args, **kwargs)
  File "/home/adams/app/xunlei-lixian/lixian.py", line 433, in read_task_page_info_by_url
    page = self.urlread(url).decode('utf-8', 'ignore')
  File "/home/adams/app/xunlei-lixian/lixian.py", line 270, in urlread
    self.login()
  File "/home/adams/app/xunlei-lixian/lixian.py", line 385, in login
    verification_code = self.read_verification_code()
  File "/home/adams/app/xunlei-lixian/lixian.py", line 359, in read_verification_code
    raise NotImplementedError('Verification code required')
NotImplementedError: Verification code required
@adamscao
Copy link
Author

查到怎么处理了,加上这个参数即可:--verification-code-path=/tmp/xunleilixian.jpg。 https://github.com/iambus/xunlei-lixian/wiki/%E9%AA%8C%E8%AF%81%E7%A0%81%E9%97%AE%E9%A2%98
但是登录还是一直不成功,每次都不对:

➜  ~  lx login
Saving login session to /home/adams/.xunlei.lixian.cookies
Verification code picture is saved to /tmp/xunleilixian.jpg, please open it manually and enter what you see.
Verification code: 8hg7
Traceback (most recent call last):
  File "/home/adams/bin/lx", line 63, in <module>
    execute_command()
  File "/home/adams/bin/lx", line 60, in execute_command
    commands[command](args[1:])
  File "/home/adams/app/xunlei-lixian/lixian_cli_parser.py", line 165, in parse
    return f(parser(args_list, *args, **kwargs))
  File "/home/adams/app/xunlei-lixian/lixian_commands/login.py", line 42, in login
    XunleiClient(args.username, args.password, args.cookies, login=True, verification_code_reader=verification_code_reader)
  File "/home/adams/app/xunlei-lixian/lixian.py", line 229, in __init__
    self.login()
  File "/home/adams/app/xunlei-lixian/lixian.py", line 393, in login
    self.id = self.get_userid()
  File "/home/adams/app/xunlei-lixian/lixian.py", line 292, in get_userid
    raise Exception('Probably login failed')
Exception: Probably login failed

@chainone
Copy link

chainone commented Oct 8, 2015

貌似我碰到跟你一样的问题了

@linux0ne
Copy link

一样问题,作者不维护了,现在无解中,呵

@aristotll
Copy link

遇到同样问题 盼望解决...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants