Git Product home page Git Product logo

qiandao's Issues

cookie的签到都失败了

image
自己本地搭建的qiandao,用账号登陆的模板几乎都可以成功。但是cookie版的三个都出错了。
这个错误可能不够详细,但我不知道哪里可以看到更详细的信息。

如何才能用mysql数据库呢?

我已经将config.py中的
class mysql(object):
host = mysql_url.hostname or 'localhost'
port = mysql_url.port or '3306'
database = mysql_url.path[1:] or 'qiandao'
user = mysql_url.username or 'qiandao'
passwd = mysql_url.password or None
改为自己的数据库信息
class mysql(object):
host = mysql_url.hostname or 'localhost'
port = mysql_url.port or '3306'
database = mysql_url.path[1:] or 'qiandao'
user = mysql_url.username or 'qiandao'
passwd = mysql_url.password or '123456789'
但是发现运行run.py之后还是没用mysql数据库。
是不是还有哪里要修改?

自定义函数

Tips中提到"如果您能破解加密方法,可以写成一个函数,在模板中调用". 能否举个简单的实例?

请教个cookie过期的问题

有些网站有验证码的,通过cookie实现自动签到,但cookie不是有过期时效的吗?过期后怎么办?

自建的qiandao无法使用mailgun发送邮件

config.py中的mailgunkey已经设置
mailgun中域名已经验证
问题1.服务器除了config.py是否还需设置哪里?
问题2.mailgun除了验证域名是否还需如何操作?

请问要如何结合nginx使用呢

自己的VPS上有LNMP环境和AMH管理面板,于是想通过在AMH中创建虚拟主机,文件上传网站根目录的方式部署,顺便配置域名,类似于安装wordpress。不过发现这个签到框架是用tornado的。。。参考了Running and deployingStarting Tornado App on a domain name ( without the port number )部署项目Nginx+Tornado+Supervisor,大致是说用nginx监听80端口作为反向代理,不过具体配置没成功,对应域名的nginx配置文件大致上是参照serverfault上那篇修改的。

关于百度登陆

现在的百度登陆,百度进行了rsa密码传输加密
我先做的是百度贴吧签到,其实只是用到了bduss这个cookie中的参数,就可以模拟签到了

不过我想是真正登陆百度,然后获取到cookie,所以希望楼主可以看看百度的密码加密是如何做的?

如何清除编辑器里的多余请求

好像编辑器没有提供删除的功能,勾选了需要提交的请求但是在所有请求那里还是可以看到无关的记录,也不知道怎样删除

使用qiandao.py直接签到不成功

命令如下:python qiandao/qiandao.py har/jdjr.har har/jdjr.json
qiandao failed! failed at 1/1 request, , http://vip.jr.jd.com/newSign/doSign
搭建Docker通过web可以签到成功。可以确定的是json文件中cookie是一样的。
同样的,还有一些网站的签到通过命令调用qiandao.py签到显示qiandao success,但实际没有成功。

有关签到模板时间参数的疑问

  1. 使用{{ timestamp() }}参数(例如: 1493621542.44),获得的时间戳含有两位小数,并不是毫秒级时间戳,如何获得形如1493620949139的时间戳(Python:int(time.time()*1000))。

  2. 如何获取当前月份、年份?

smzdm的证书问题

https://zhiyou.smzdm.com/的自签证书似乎有些问题,测试的时候会报certificate verify failed错误,不知道有没有解决办法?模板用的是qiandao.today上下载的。

关于编辑器的使用与cookies变量

刚刚在玩这个,感觉挺有意思的~
目前发现一些问题,所以来说说

  1. 比如我有5个url, 如果我要调第二个url 要点开第一个点下测试,然后再点开第二个点测试,而且测试界面的那几个选项卡很容易让人迷糊=。=,我试了好几次才有点搞懂大概什么意思。cookies貌似是后一个请求覆盖前一个,重新测试第一个请求的话也是用这个cookies,类似requests 的session吧,这个步骤可能要详细写一下,要不可能会让刚接触的人搞不懂。。。
  2. 那个url列表,双击经常没反应。。。有时要多点几下才行。。。不知道算不算bug
    3.正则提取变量自动拿第一个group ,这个在doc里说明一下比较好吧
    4.关于获取到的cookies,如何能转成变量,我有碰到一个登陆的情况:请求url_A拿到的cookies中的sid,签到url_B需要把这个sid填在querystring上,这个不知道怎么设变量。

如果能做个详细的编辑器使用用例就更好啦=。=~

修改为mysql后

Table 'qiandao.task' doesn't exist
出现这个问题
权限给足了

为什么已经设置了mysql并运行成功,但是每次运行都提示连接sqlite3端口失败呢?

这个bug怎么修复呢?
qq 20170214113533
config.py

class mysql(object):
host = 'localhost'
port = '3306'
database = 'qiandao'
user = 'qiandao'
passwd = 'test'

class sqlite3(object):
path = './database.db'

db_type = os.getenv('mysql')

class redis(object):
host = redis_url.hostname or 'localhost'
port = redis_url.port or 6379
passwd = redis_url.password or None
db = int(os.getenv('REDIS_DB_INDEX', 1))
evil = 100

变量提取能否支持 header

瞅了一眼代码,getdata本身支持从 content, header 和status提取数据,但是在测试页面变量提取只支持 content,能否加入从 header 中提取变量的功能。

Ip封锁问题

类似chiphell论坛,会封锁部分vps的ip段,比如qiandao.today用的ip.
这种情况是不是无解了。。

403 forbidden

今天访问 qiandao.today,发现 403 forbidden 了

不知是什么情况?

如何指定使用mysql或者sqlite3? 编码出问题了

实在不好意思了,因为使用介绍写的实在是简略到获取不了任何可用信息的地步了
所以才来发issue
比如我vps上同时安装了mysql和sqlite3.框架是默认使用哪个?
然后我如果想指定使用另外一个数据库该怎么做?

现在看的话默认使用的是sqlite3?如果我想用mysql的话该怎么指定?

然后现在默认使用sqlite3的情况下有编码问题
看py提示和别人的issue似乎是sitename的问题?但我找了半天都不知道这sitename去哪里设置…………
然后之前导入有中文的模板后也有编码问题,最后没办法是直接清空数据库重搞才解决。

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1467, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1726, in wrapper
return method(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 2829, in wrapper
return method(self, *args, **kwargs)
File "/root/qiandao/web/handlers/my.py", line 34, in get
self.render('my.html', tpls=tpls, tasks=tasks, my_status=my_status)
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 719, in render
html = self.render_string(template_name, **kwargs)
File "/root/qiandao/web/handlers/base.py", line 48, in render_string
return template.render(namespace)
File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/root/qiandao/web/tpl/my.html", line 1, in top-level template code
{% extends "base.html" %}
File "/root/qiandao/web/tpl/base.html", line 35, in top-level template code
{% block body %}{% endblock %}
File "/root/qiandao/web/tpl/my.html", line 90, in block "body"
{{ utils.tplname(tpl) }}
File "/root/qiandao/web/tpl/utils.html", line 98, in template
{{ tpl.sitename or "未命名" }}
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128)

explanation?

Nice work! but you should definitely add some more explanation to the readme,

怎么安装.py文件呢?

AMH管理面板,在AMH中创建虚拟主机,文件上传网站根目录的方式部署,配置域名,类似于安装wordpres的方法 但是不行

能否加入对json的支持

对于返回结果为json的response,能否像requests库中.json()那样解析,这样可以大大方便数据选择。

无法通过浏览器插件获取cookies

OS:

Linux lemaker 3.4.103 #1 SMP PREEMPT Thu Dec 18 13:07:12 CST 2014 armv7l GNU/Linux

python:

Python 2.7.3 32bit

chrome

版本 54.0.2840.71 m (64-bit) (已安装cookies获取助手)

数据库

mysql

点击获取,总是提示未安装插件

Cookie保留的问题

新建签到模板,如果有多个请求,第一个登录请求完成之后生成的Cookie
在后面的请求中是否会直接使用?还是需要自己通过变量提取方式提取出Cookie值?

现在在Web签到测试中输入用户名和密码测试提示签到失败,
但结果中只能看到哪一步出错,没有详细的request和response信息,不太方便调试的。

谢谢

Both web and lite versions cannot work

When submitting task (v2ex) on web, a.k.a run.py:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 1141, in _when_complete
    callback()
  File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 1162, in _execute_method
    self._when_complete(method(*self.path_args, **self.path_kwargs),
  File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 2297, in wrapper
    return method(self, *args, **kwargs)
  File "/pool/repos/forks/qiandao/web/handlers/task.py", line 42, in post
    tplid = int(self.get_body_argument('_binux_tplid'))
  File "/pool/repos/forks/qiandao/web/handlers/base.py", line 27, in __getattr__
    raise AttributeError('no such attr: %s' % key)
AttributeError: no such attr: get_body_argument

Lite version also does not work:

; python qiandao.py huihui.har --username=xxx --password=xxx

Got:

ERROR:root:__init__() got an unexpected keyword argument 'decompress_response' 
Traceback (most recent call last):
  File "/pool/repos/forks/qiandao/libs/fetcher.py", line 445, in do_fetch
    ), proxy=proxy)
  File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 496, in run
    next = self.yield_point.get_result()
  File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 395, in get_result
    return self.runner.pop_result(self.key).result()
  File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 129, in result
    raise_exc_info(self.__exc_info)
  File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 221, in wrapper
    runner.run()
  File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 507, in run
    yielded = self.gen.send(next)
  File "/pool/repos/forks/qiandao/libs/fetcher.py", line 359, in fetch
    req, rule, env = self.build_request(obj, self.download_size_limit)
  File "/pool/repos/forks/qiandao/libs/fetcher.py", line 99, in build_request
    prepare_curl_callback = set_size_limit_callback,
TypeError: __init__() got an unexpected keyword argument 'decompress_response'
qiandao failed! failed at 1/1 request, error:TypeError("__init__() got an unexpected keyword argument 'decompress_response'",), https://reg.163.com/logins.jsp

请教env['session']的类型

在签到时,签到日志里抛出了'list' object has no attribute 'to_json'的错误。
而模板测试、或者点击“立即执行”时都不会出错。
review了一下代码,估计应该是这个地方抛了错误:
https://github.com/binux/qiandao/blob/master/worker.py#L165

可能是这个地方出现了问题:
https://github.com/binux/qiandao/blob/master/worker.py#L161

这里的env['session']是一个list,fetcher.do_fetch函数里也没有改变其类型,因而报了上述错误。
看了下代码history,原来是用fetch的,然后改成用了do_fetch
(而fetcher.fetch函数里好像调用了build_request函数把session处理成了CookieSession对象)

同时,对于session的类型,有时是{},有时是[],有时是CookieSession,比较混乱难以理解。
https://github.com/binux/qiandao/blob/master/libs/fetcher.py#L39
https://github.com/binux/qiandao/blob/master/web/handlers/task.py#L106
https://github.com/binux/qiandao/blob/master/libs/fetcher.py#L102

建议不要用运行时的类型检测 :(

关于本地lite版,区别以及部署方法

请问本地lite版和服务器版有什么区别?
如何部署本地lite版,因为想在Windows上直接部署,然后又不想用数据库.
在博客上有看到说有个lite版,但是github上又没看到相关说明.
麻烦了.

MySQL pool exhausted

Traceback (most recent call last):
  File ".\run.py", line 40, in <module>
    worker = MainWorker()
  File "E:\github\qiandao\worker.py", line 29, in __init__
    class DB(object):
  File "E:\github\qiandao\worker.py", line 30, in DB
    user = db.UserDB()
  File "E:\github\qiandao\db\user.py", line 34, in __init__
    database=database, autocommit=True, pool_size=5)
  File "D:\Python27\lib\site-packages\mysql\connector\__init__.py", line 163, in connect
    return _get_pooled_connection(**kwargs)
  File "D:\Python27\lib\site-packages\mysql\connector\__init__.py", line 79, in _get_pooled_connection
    return _CONNECTION_POOLS[pool_name].get_connection()
  File "D:\Python27\lib\site-packages\mysql\connector\pooling.py", line 310, in get_connection
    "Failed getting connection; pool exhausted")
mysql.connector.errors.PoolError: Failed getting connection; pool exhausted

Using Latest commit 15909f7. The MySQL shows process list as follow:

MariaDB [qiandao]> show processlist;
+----+------+-----------------+---------+---------+------+-------+------------------+----------+
| Id | User | Host            | db      | Command | Time | State | Info             | Progress |
+----+------+-----------------+---------+---------+------+-------+------------------+----------+
| 15 | root | localhost:34299 | qiandao | Query   |    0 | init  | show processlist |    0.000 |
| 16 | root | localhost:34358 | qiandao | Sleep   |    5 |       | NULL             |    0.000 |
| 17 | root | localhost:34359 | qiandao | Sleep   |    5 |       | NULL             |    0.000 |
| 18 | root | localhost:34360 | qiandao | Sleep   |    5 |       | NULL             |    0.000 |
| 19 | root | localhost:34361 | qiandao | Sleep   |    5 |       | NULL             |    0.000 |
| 20 | root | localhost:34362 | qiandao | Sleep   |    5 |       | NULL             |    0.000 |
+----+------+-----------------+---------+---------+------+-------+------------------+----------+
6 rows in set (0.00 sec)

搭建好了 为什么一保存就出错?

搭建好网站后 #python web.py ,进入ip:8923上传HAR,测试什么的都是成功的,但是保存的时候提示Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 1467, in _execute result = method(*self.path_args, **self.path_kwargs) File "/root/qiandao-master/web/handlers/har.py", line 28, in post tpl['har'] = self.db.user.decrypt(tpl['userid'], tpl['har']) File "/root/qiandao-master/db/user.py", line 112, in decrypt raise self.UserDBException('decrypt error') UserDBException: decrypt error。
再次返回到首页 提示Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 1467, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 1726, in wrapper
return method(self, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 2829, in wrapper
return method(self, *args, **kwargs)
File "/root/qiandao-master/web/handlers/my.py", line 34, in get
self.render('my.html', tpls=tpls, tasks=tasks, my_status=my_status)
File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 719, in render
html = self.render_string(template_name, **kwargs)
File "/root/qiandao-master/web/handlers/base.py", line 48, in render_string
return template.render(namespace)
File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/root/qiandao-master/web/tpl/my.html", line 1, in top-level template code
{% extends "base.html" %}
File "/root/qiandao-master/web/tpl/base.html", line 35, in top-level template code
{% block body %}{% endblock %}
File "/root/qiandao-master/web/tpl/my.html", line 90, in block "body"
{{ utils.tplname(tpl) }}
File "/root/qiandao-master/web/tpl/utils.html", line 98, in template
{{ tpl.sitename or "鏈懡鍚�" }}
UnicodeDecodeError: 'ascii' codec can't decode byte 0xfd in position 0: ordinal not in range(128)

timestamp 不工作

{{ timestamp() }} 得到的结果是 u'timestamp': u'',我猜想是在填写信息的时候接受了 timestamp 的空字符串而没有调用 timestamp() 这个 function,错误如 #39 (comment) 所示

导入模板后字符编解码出错

OS:

Linux lemaker 3.4.103 #1 SMP PREEMPT Thu Dec 18 13:07:12 CST 2014 armv7l GNU/Linux

python:

Python 2.7.3 32bit

错误信息:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1467, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1726, in wrapper
    return method(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 2829, in wrapper
    return method(self, *args, **kwargs)
  File "/home/bananapi/sources/qiandao/web/handlers/my.py", line 34, in get
    self.render('my.html', tpls=tpls, tasks=tasks, my_status=my_status)
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 719, in render
    html = self.render_string(template_name, **kwargs)
  File "/home/bananapi/sources/qiandao/web/handlers/base.py", line 48, in render_string
    return template.render(namespace)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/bananapi/sources/qiandao/web/tpl/my.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "/home/bananapi/sources/qiandao/web/tpl/base.html", line 35, in top-level template code
    {% block body %}{% endblock %}
  File "/home/bananapi/sources/qiandao/web/tpl/my.html", line 90, in block "body"
    {{ utils.tplname(tpl) }}
  File "/home/bananapi/sources/qiandao/web/tpl/utils.html", line 100, in template
    <span data-toggle="popover" data-content="{{ tpl.siteurl }}">{{ tpl.sitename or "未命名" }}</span>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128)

导入模板后用中文命名网站名字,出现这样的错误。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.