我要回答你问的具体问题:如何使用ultimate-api。
首先确保您的机器上安装了python3和virtualenv:
$ type -a python3
$ type -a virtualenv
如果这些命令中的任何一个没有返回任何内容,则必须先安装给定的程序。现在转到克隆ultimate-api存储库并运行的目录:
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install -r requirements.txt
您不需要成为root用户。
现在启动服务器:
$ python3 run.py
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 122-615-257
在你最喜欢的网络浏览器中访问http://127.0.0.1:5000,它应该说hi。现在,因为ultimate-api的文档说你必须使用:
ultimate-标签的完整(包括协议)网址。
用/tab方法。
例:
http://127.0.0.1:5000/tab?url=https://tabs.ultimate-/tab/_chk_chk_chk/intensify_bass_934215
http://127.0.0.1:5000/tab?url=https://tabs.ultimate-/tab/_chk_chk_chk/me_and_giuliani_down_by_the_schoolyard_a_true_story_bass_512135
更新
比如,获取100个顶部标签的网址:
$ wget -U firefox https://www.ultimate-/top/tabs -O - 2>/dev/null | grep -F 'https://tabs.ultimate-/tab/' | grep -E -o '
现在,您可以将此URL与ultimate-api服务器一起使用。