Giter Site home page Giter Site logo

momo's Introduction

简介

最近在用墨墨背单词这个单词软件,各方面做的都很好。可惜存在单词上限,每背一个单词,就少一个,如果没有任何增加单词上限的途径的话,只能背500个单词你就可以删软件了。。

除了签到以及印章连连看的方式之外,还有没有增加上限的途径呢?是有的,就是每次打完卡之后可以对当日的学习情况进行分享。这个页面一旦被浏览过一次,你的单词上限就会+1(当然,一个ip只算一次),每日上限20个。于是我就写了一个自动刷访问量的脚本,原本是单线程的,很慢,后来再修改了一下弄成多线程的了。大体思路是:

  1. 去免费代理ip网站爬代理
  2. 利用代理访问文章
  3. 增加访问量

多线程利用的自然是生产者-消费者模型。实现得有点简陋,正好最近在线程进程这边补缺补漏,就当练手了吧。

均在linux下运行(unix或许也行

需要安装:

pip install termcolor

MoMo-aiohttp.py在Py3.x下运行,需要安装aiohttp

版本

  1. MoMo.py 自己实现的多线程访问
  2. MoMo-aiohttp.py 利用aiohttp实现的协程访问(在数量较小的情况下,和1差不多,但是数量上去了,差别会越来越大)

运行示例

example

在MoMo-aiohttp.py中, async with session.get(url='', proxy='http://'+proxy, timeout=5) as resp: # Your url url需要改,怎么获得这个呢?首先你打卡之后,要分享到空间去,然后点开这个分享,转发链接到“我的电脑“,然后你就能看到这个url,大概是这样: https://www.maimemo.com/share/page/?uid=XXXXXXX&pid=1181 其中pid是每天都+1的,uid就是你的墨墨UID,在“我的设置“中可以看到 设置好了之后再跑跑看

声明

本项目仅用于个人学习测试使用,勿用于非法用途,由于其他用途所产生的一切不良后果本人概不负责。

2018-08-24 更新

墨墨修改分享的 url 了,现在开始每天的文章用 pid 区分。uid 同样为墨墨UID。暂时没找到生成 pid 的方法,不过没事,每次运行改一下 pid 就行

2018.11.19 19:24:18 更新

http://www.66ip.cn/mo.php?tqsl=100 这个免费 ip 地址,原来是在源码中直接显示的 ip,现在估计爬的人太多了,改为运行一段 js 后才显示 ip。所以需要根据 js 写对应的 python 解析脚本。当然,最好换其他家的免费代理 ip,或者自己搭一个免费 ip 爬取系统,github 有很多这样的。

最多改一下地址与正则表达式就行了。

2019.02.25 20:31:05 更新

如果出现以下报错,请关闭系统的代理再试一下。

» python MoMo-aiohttp.py
[+] get proxy...
  [-]Error: HTTPConnectionPool(host='127.0.0.1', port=7890): Max retries exceeded with url: http://www.89ip.cn/tqdl.html?num=100 (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',)))

2019-07-15 13:42:22 更新

~~根据反馈,本工具已经失效~ 估计是墨墨修改机制了~~

好像还是有效的。本人已经不用墨墨了,希望有人能帮忙测试一下?

momo's People

Contributors

macr0phag3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

momo's Issues

可能会被官方重置单词量上限

@Macr0phag3 你好!我看到一篇2015年写的刷单词上限的文章 http://zhiyilv.com/369.html ,其中的原理和你的很像,但是他在刷了至少一个月之后提到:

官方已经把我的上限重置了,...

由于我对计算机知之甚少,所以想请教你,长久使用 MoMo-aiohttp.py 会不会也如同上文作者一样,导致单词上限被重置呢,有没有什么办法能顾全用py刷单词上限和不被官方重置呢,谢谢!

探讨下机制

现在应该不止是看独立的IP,可能还要看网页的JS加载出来没有,然后进行浏览判定

还能用吗

刚使用不同ip手动访问一下分享界面,页面显示单词数量并没有增加

好像不能用了

运行完第二天,没有人数增加。想问下也是同样的情况吗
image

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.