Giter Club home page Giter Club logo

acfun-api-replace-server's Introduction

acfun-api-replace-server

Replacing API server of Acfun to retrive original source from letvcloud instead of the shitty one.

You can use https://acfunfix.sinaapp.com/?vid= , but I do not want to replace the original player for some good reasons.

Sample Public API avalable at https://acfun-api.cnbeining.com/getVideo?id= , Cloudflare + Openshift, so do not expect much speed.

How to use this?

Check https://www.cnbeining.com/?p=1014 .

Why so much hate?

https://gist.github.com/cnbeining/ec8c74df1934a943bcf9

Sample outcome


$curl http://www.acfun.tv/video/getVideo.aspx?id=2318907

{"sourceId":"b4bb55f7ff","contentId":1980501,"allowDanmaku":0,"title":"Part 1","userId":382427,"danmakuId":2318907,"sourceUrl":"b4bb55f7ff","sourceType":"zhuzhan","createTime":"2015-06-24 03:13:58.0","videoList":[{"bitRate":1,"playUrl":"http://vplay.aixifan.com/des/acf-47/2318907_mp4/2318907_360p.mp4?k=6766de4527a96a6dfbad6cb28bfb4304&t=1446572031"},{"bitRate":2,"playUrl":"http://vplay.aixifan.com/des/acf-47/2318907_mp4/2318907_480p.mp4?k=64560667bd1c1d388bf1930d46b3314f&t=1446572031"},{"bitRate":3,"playUrl":"http://vplay.aixifan.com/des/acf-47/2318907_mp4/2318907_720p.mp4?k=55c995fd7f308f786492b8586cb0b257&t=1446572031"}],"success":true,"startTime":0,"id":2318907,"time":184,"config":0,"status":2}

$curl https://acfun-api.cnbeining.com/getVideo?id=2318907

{"status": 2, "sourceUrl": "b4bb55f7ff", "sourceType": "letv", "success": true, "title": "Part 1", "sourceId": "b4bb55f7ff", "contentId": 1980501, "userId": 382427, "startTime": 0, "createTime": "2015-06-24 03:13:58.0", "allowDanmak": 0, "time": 184, "id": 2318907, "config": 0, "danmakuId": 2318907}

Running on OpenShift

Plug and run on Openshift.

Requirement

  • Python 2.7
  • web.py
  • requests

Author

Beining, https://www.cnbeining.com/ , i#cnbeining.com

License

GPLv2 license.

This program is provided as is, with absolutely no warranty.

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.