Giter Club home page Giter Club logo

atc's Introduction

Atc:Abbey微博图床计划

Feature:

  1. 上传模式,支持:拖拽文件、点击上传、复制粘贴(截图之后粘贴板有图片信息)
  2. 支持批量上传
  3. 支持选择图片大小

安装使用

  1. 下载代码
cd /home
git clone https://github.com/abbeyokgo/Atc.git
cd Atc
mkdir upload
  1. 配置账号信息 编辑config.py
  • 微博账号密码
  • 云打码账号密码

ps. 配置云打码是为了自动登录微博。

微博用户名密码

  • WEIBO_USERNAME:微博账号
  • WEIBO_PASSWORD:微博密码

云打码的用户名、密码

  • YUNDAMA_USERNAME:云打码账号
  • YUNDAMA_PASSWORD:云打码密码

云打码注册地址:http://www.yundama.com/index/reg

注册之后必须充值!充值1元就能用很久了!

  1. 安装依赖&运行
pip install -r requirements.txt
gunicorn -keventlet -b 0:35000 run:app

然后访问:http://ip:35000

  1. 绑定域名

参考 PyOne绑定域名

注意:端口号

  1. 配置开机启动(仅限centos7,其他系统请自行搜索)

注意目录是否正确

cp supervisord.conf.sample supervisord.conf
echo "supervisord -c /home/Atc/supervisord.conf" >> /etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local

预览

atc's People

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  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  avatar  avatar  avatar

atc's Issues

OSError: [Errno 2] No such file or directory: './upload/image.png'

[2019-02-20 00:03:44,656] ERROR in app: Exception on /upload [POST]
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/Atc/run.py", line 24, in upload
url=t.upload(filepath)
File "/home/Atc/wb_util.py", line 180, in upload
url = self.request_image_url(image_path)
File "/home/Atc/wb_util.py", line 159, in request_image_url
os.remove(image_path)
OSError: [Errno 2] No such file or directory: './upload/image.png'
[2019-02-20 00:03:44,660] ERROR in app: Exception on /upload [POST]
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/Atc/run.py", line 24, in upload
url=t.upload(filepath)
File "/home/Atc/wb_util.py", line 180, in upload
url = self.request_image_url(image_path)
File "/home/Atc/wb_util.py", line 159, in request_image_url
os.remove(image_path)
OSError: [Errno 2] No such file or directory: './upload/image.png'

图片上传微博图床被压缩

作者您好,我在使用微博图床的上传接口时发现,图片上传上去后,打开生成的图片url,图片变模糊了,不是原图,这个问题不知道您遇到吗,要如何解决呢?
谢谢!

OSError: [Errno 11] Resource temporarily unavailable

[2019-01-16 08:12:30 +0000] [20180] [INFO] Starting gunicorn 19.9.0
[2019-01-16 08:12:30 +0000] [20180] [INFO] Listening at: http://0.0.0.0:35000 (20180)
[2019-01-16 08:12:30 +0000] [20180] [INFO] Using worker: eventlet
[2019-01-16 08:12:30 +0000] [20187] [INFO] Booting worker with pid: 20187
checking if login
load cookies and login success
[2019-01-16 08:12:53 +0000] [20187] [ERROR] Socket error processing request.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/gunicorn/workers/base_async.py", line 66, in handle
six.reraise(*sys.exc_info())
File "/usr/lib/python2.7/site-packages/gunicorn/workers/base_async.py", line 56, in handle
self.handle_request(listener_name, req, client, addr)
File "/usr/lib/python2.7/site-packages/gunicorn/workers/base_async.py", line 129, in handle_request
six.reraise(*sys.exc_info())
File "/usr/lib/python2.7/site-packages/gunicorn/workers/base_async.py", line 112, in handle_request
resp.write_file(respiter)
File "/usr/lib/python2.7/site-packages/gunicorn/http/wsgi.py", line 403, in write_file
if not self.sendfile(respiter):
File "/usr/lib/python2.7/site-packages/gunicorn/http/wsgi.py", line 393, in sendfile
sent += sendfile(sockno, fileno, offset + sent, count)
File "/usr/lib/python2.7/site-packages/gunicorn/http/_sendfile.py", line 66, in sendfile
raise OSError(e, os.strerror(e))
OSError: [Errno 11] Resource temporarily unavailable

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.