前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >goindex搭建方法

goindex搭建方法

作者头像
blankmiss
发布2020-04-09 11:51:55
1.6K0
发布2020-04-09 11:51:55
举报
文章被收录于专栏:林祈林祈
Googledrive

大家都知道Google向来对学生都是比较良心的,国外大学的学生邮箱申请到的Googledrive都是无限容量的,而且下载速度不限制(这里要注意你的网络环境必须是在挂代理的情况下),但是很多人都没有可用的代理,中国GFW已经封锁互联网环境已经快20年了,大部分人是访问不了谷歌的,因为一些政策原因,在这里就不细说了,详情可以百度。

Cloudflare Workers

Cloudflare Workers是一家代码部署网站,在这个网站上你可以将你的代码部署在上面,你不需要担心服务器,因为用户可以使用免费的套餐,没有流量限制,也不需要你维护服务器,我们待会需要用到这个网站的部署业务和流量

rclone

Rclone-用于云存储的rsync

Rclone是一个命令行程序,用于与以下文件同步文件和目录 通过rclone来联通Googledrive和Cloudflare Workers

下载地址

github项目地址

goindex

Google云端硬盘目录索引 结合Cloudflare WorkersGoogle Drive的强大功能,您可以在Cloudflare Workers的浏览器中为文件建立索引。

项目地址goindex

使用方法

安装rclone到本地,上面已经贴出链接

linux可以使用curl https://rclone.org/install.sh | sudo bash 第一次运行使用 rclone config

代码语言:javascript
复制
No remotes found - make a new one
n) New remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
n/r/c/s/q> n
name> remote
Type of storage to configure.
Choose a number from below, or type in your own value
[snip]
XX / Google Drive
   \ "drive"
[snip]
Storage> drive
Google Application Client Id - leave blank normally.
client_id>
Google Application Client Secret - leave blank normally.
client_secret>
Scope that rclone should use when requesting access from drive.
Choose a number from below, or type in your own value
 1 / Full access all files, excluding Application Data Folder.
   \ "drive"
 2 / Read-only access to file metadata and file contents.
   \ "drive.readonly"
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ "drive.file"
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ "drive.appfolder"
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ "drive.metadata.readonly"
scope> 1
ID of the root folder - leave blank normally.  Fill in to access "Computers"         folders. (see docs).
root_folder_id> 
Service Account Credentials JSON file path - needed only if you want use SA         instead of interactive login.
service_account_file>
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine or Y didn't work
y) Yes
n) No
y/n> y
If your browser doesn't open automatically go to the following link:                 http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
Got code
Configure this as a team drive?
y) Yes
n) No
y/n> n
--------------------
[remote]
client_id = 
client_secret = 
scope = drive
root_folder_id = 
service_account_file =
token =    {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2014-03-16T13:57:58.955387075Z"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y

按照上述提示就可以完成操作了 注意在Google授权的时候需要挂一个全局代理,不然让rclone接收不到回馈信息

输入rclone config file

就可以知道返回的token在哪个目录下了我们需要的token是refresh_token这一段复制保存下来留着备用

获取我们的网页代码

打开这个 网址

点击获取代码

选择你的谷歌账号登陆 然后接收rclone的许可 会返回给你一段代码把代码复制返回刚刚打开的网址 点击此处

点击建造就会在下面的文本框里面返回一大段我们需要的网站代码复制,然后打开

Cloudflare Workers 前面说过他的网站了,这里就不赘述了

注册并且登陆

到这里网站已经部署好了 你就可以不用挂代理也能下载Googledrive的文件了 推荐晚上下载,去避开高峰期

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020-03-08,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Cloudflare Workers
  • rclone
  • goindex
    • 使用方法
      • 获取我们的网页代码
相关产品与服务
对象存储
对象存储(Cloud Object Storage,COS)是由腾讯云推出的无目录层次结构、无数据格式限制,可容纳海量数据且支持 HTTP/HTTPS 协议访问的分布式存储服务。腾讯云 COS 的存储桶空间无容量上限,无需分区管理,适用于 CDN 数据分发、数据万象处理或大数据计算与分析的数据湖等多种场景。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档