huxuan / xiami_auto_checkin

A python script implement auto checkin on xiami.com
huxuan.org/p/xiami_auto_checkin
43 stars 19 forks source link

Cannot successfully checkin using xiami auto checkin #2

Open qqldd opened 11 years ago

qqldd commented 11 years ago

不能用鸟.. First time is starting from the end of Oct. 2013. Second time is starting from the end of Dec. 2013.

huxuan commented 10 years ago

Confirmed. Just too busy these days I will fix it when I have time. Patches are also welcome.

qqldd commented 10 years ago

Tried for a while and then giving up.... I do not familiar with these things T.T

I know the reason why it does not work, xiami changed the checkin url. It is not http://xiami.com/task/signin anymore. Seems like we need to use mobile version instead: http://xiami.com/web

Now, my test account check in url is like: http://www.xiami.com/web/checkin/id/27979523

Here is a good reference that should help: https://gist.github.com/lizheming/4368496

And related article: http://imnerd.org/xiami-autosign.html

huxuan commented 10 years ago

Seems it works again?

qqldd commented 10 years ago

It works again. It should be Xiami's problem. But the log message in log file does not look good. This is another issue. Closing Issue.

qqldd commented 10 years ago

Reopen again. It cannot work after 2013-12-30

windviki commented 10 years ago

See my fork: https://github.com/windviki/xiami_auto_checkin

windviki commented 10 years ago

Should I make a pull request? My fork has gone too far away from the original implement.

huxuan commented 10 years ago

Hi @windviki , really thanks for your interest on this project. Actually I am too busy to maintain this repo and it doesn't work currently. I do have noticed your fork before and I really appreciate your implementation of autostart on SAE, windows and etc. But I would like to make this script clean and tiny, it should only do the checkin task without more features. Features like autostart could be a standalone script/project which import this one. What's your opinion? Wish I have explain myself clearly.

windviki commented 10 years ago

@huxuan Thanks. And thank you for starting this useful project. I agree with you. KISS rule is great. Actually I have a new xiami.py (using urllib2) in my fork which only processes checkin task, and it could be imported from outside so that SAE can use it directly. The script xiami_auto_checkin.py in my fork is modified several times before and added some features like autostart. It could be packed into an EXE file and used easily by who does not have SAE, or other server. It's not that pure, and the new script can do all what it can do. I don't want to keep it in repo in future.

huxuan commented 10 years ago

Hi @windviki , Sorry for the late reply, just in cycling vocation for two days. I do have notice the xiami.py, it has a lot of difference compared with current version, but I think the failure of auto checkin in only cause by some changes in header or parameters in post, isn't it? Actually, this script is written when I begin to be fimiliar with Python and I admit that the code is a little ugly, but I don't make it larger and larger. Are you interested in modify based on the original version?

windviki commented 10 years ago

@huxuan Maybe we could keep our separated forks. But we can communicate with each other about changes of checkin procedures so that both forks can work fine. By now, the failure is not caused by header info. We must visit main page(or other xiami pages) to get a token from cookie, then put this token into post data when login. After all this, send request for checkin task from xiami mobile page. Sometimes the encoding of response is gzip, and we need to unzip it to get text content.

deqing commented 9 years ago

Looks like cannot login now.

Tried to add some print in the code, it seems login_response simply returns another html to ask you login again. Maybe need some changes for login_headers or login_data, not familiar with http stuff yet..

Can someone have a look? Thanks!