PT发布之一键转载脚本使用指南
本文最后更新于:2 年前
前言
正如自己所想的,现在正在逐步公开脚本,搭建的GitHub项目在10个月前就已经存在了——auto_feed_js。无奈当时过于低调,没有什么反响,现在再次公开,并在这里附上一点使用指南。现在已经将最新的版本1.6.8上传过去了。
注意:由于版本更新,最新版本需要参照PT发布之一键转载脚本使用指南(2)使用。
为了使用方便,现将脚本更新至greasyfork.org,最新版本仍旧为1.6.8。请通过此方式安装,以后更新可以直接安装更新。
项目托管在Github上,欢迎Star:
2021.3.23补充
看到有人说不会用,那就再补一点基础知识好了。首先这是基于油猴的一个脚本,所以需要油猴插件,我自己用chrome,火狐、edge等都有,所以首先需要安装这个插件。链接:https://www.tampermonkey.net/。
如果被墙的话,自行搜索离线安装方案。
安装方法
- 安装好之后会自动启用,扩展区域会出现相应扩展图标,点击打开之后选择打开管理面板>>
然后,点击最左边加号选择新建一个脚本,将GitHub页面里的auto_feed_js里的内容替换新建脚本里的内容,ctrl+s保存。
再次打开auto_feed进行编辑,按照后续的使用配置配置个人的站点即可。
- 直接打开greasyfork.org,会显示安装按钮,安装即可。以后更新的话也直接打开该页面,进行更新即可。
使用配置
在脚本中划分了几个部分,最开始就是用户配置的部分,也就是用户需要了解的部分,接下来分别来讲它们的作用。
/*******************************************************************************************************************
* part 0 用户变量层 *
********************************************************************************************************************/
//提供可用的获取豆瓣信息两个api,从0-1选择。主要应用于外站,
const apis = ['https://ptgen.rhilip.info', 'https://api.rhilip.info/tool/movieinfo/gen'];
const api_chosen = 0;
const if_uplver = 1; //是否匿名,默认匿名,不匿名改成0
const tmdb_key = '0f79586eb9d92afa2b7266f7928b055c'; //TMDB API-KEY,用于发布需要TMDB编号的站点,这里提供一个key,如果使用不了了请自行申请
//欧美国家列表,可以酌情添加
const us_ue = ['挪威|丹麦|瑞典|芬兰|英国|爱尔兰|荷兰|比利时|卢森堡|法国|西班牙|葡萄牙|德国|奥地利|瑞士|美国|加拿大|澳大利亚|意大利|波兰|新西兰'];
//是否在PTP/HDB/HDT/UHD种子列表显示搜索跳转功能,1表示显示,0表示隐藏
const SHOW_PTP_SEARCH_URLS = 1;
const SHOW_HDB_SEARCH_URLS = 0;
const SHOW_HDT_SEARCH_URLS = 0;
const SHOW_UHD_SEARCH_URLS = 0;
上述这一部分主要主要功能参见注释部分,可能基本上都不用改,就是匿名那里看自己想不想匿名。
const site_info = {
// '1PTBA': 'https://1ptba.com/',
// '52PT': 'https://52pt.site/',
// 'BHD' : 'https://beyond-hd.me/',
// 'BLU': "https://blutopia.xyz/",
// 'BTSchool': 'https://pt.btschool.club/',
// 'CCF': 'http://ccfbits.org/',
'CMCT': "https://springsunday.net/",
'CHDBits': "https://chdbits.co/",
// 'DiscFan': 'https://discfan.net/',
// 'Dragon': 'https://www.dragonhd.xyz/',
// 'HaiDan': 'https://www.haidan.video/',
'HD4FANS': 'https://pt.hd4fans.org/',
// 'HDArea': 'https://www.hdarea.co/',
// 'HDAtmos' : 'https://hdatmos.club/',
// 'HDB': 'https://hdbits.org/',
'HDChina': "https://hdchina.org/",
// 'HDCity': 'https://hdcity.city/',
// 'HDDolby': 'https://www.hddolby.com/',
// 'HDfans': 'http://hdfans.org/',
// 'HDHome': "https://hdhome.org/",
'HDPost': 'https://pt.hdpost.top/',
// 'HDRoute': 'http://hdroute.org/',
'HDSky': "https://hdsky.me/",
// 'HDSpace': 'https://hd-space.org/',
// 'HDT': 'https://hd-torrents.org/',
// 'HDTime': 'https://hdtime.org/',
// 'HDU': 'https://pt.hdupt.com/',
// 'HDZone': 'https://hdzone.me/',
// 'HITPT': 'https://www.hitpt.com/',
'HUDBT': 'https://hudbt.hust.edu.cn/',
// 'iTS': 'https://shadowthein.net/',
// 'JoyHD': 'https://www.joyhd.net/',
'LemonHD': "https://lemonhd.org/",
'MTeam': "https://kp.m-team.cc/",
// 'NanYang': "https://nanyangpt.com/",
// 'Oshen': 'http://www.oshen.win/',
'OurBits': "https://ourbits.club/",
'PTer': "https://pterclub.com/",
'PThome': "https://www.pthome.net/",
// 'PTMSG': 'https://pt.msg.vg/',
// 'PTNIC': 'https://www.ptnic.net/',
// 'ptsbao': 'https://ptsbao.club/',
// 'PTT': 'https://www.pttime.org/',
'PuTao': "https://pt.sjtu.edu.cn/",
// 'SoulVoice': 'https://pt.soulvoice.club/',
// 'TCCF': 'https://et8.org/',
'TJUPT': 'https://www.tjupt.org/',
'TLFbits': "http://pt.eastgame.org/",
'TTG': "https://totheglory.im/",
// 'UHD': 'https://uhdbits.org/',
// 'YDY' :'https://pt.hdbd.us/',
};
这里罗列了脚本支持转发的站点,50个左右,前边有双斜线代表注释掉了,也就是不开启转发到这里。如果想要脚本显示转发图标,将上边的代码对应位置取消注释即可。
// 'UHD': 'https://uhdbits.org/', -> 'UHD': 'https://uhdbits.org/',
表示开启支持转发到UHD。
//支持快速搜索的站点列表,可自行添加或注释,举例:imdbid表示tt123456, imdbno表示123456,search_name表示the big bang thoery
const site_search_list = [
`<a href="https://passthepopcorn.me/torrents.php?searchstr={imdbid}" target="_blank">PTP</a>`,
// `<a href="https://broadcasthe.net/torrents.php?action=advanced&imdb={imdbid}" target="_blank">BTN</a>`,
`<a href="https://hdbits.org/browse.php?search={imdbid}" target="_blank">HDB</a>`,
`<a href="https://karagarga.in/browse.php?search={imdbid}&search_type=imdb" target="_blank">KG</a>`,
`<a href="http://cinemageddon.net/browse.php?search={imdbid}&proj=0&descr=1" target="_blank">CG</a>`,
`<a href="https://filelist.io/browse.php?search={imdbid}" target="_blank">FileList</a>`,
`<a href="https://beyond-hd.me/torrents?imdb={imdbid}" target="_blank">BHD</a>`,
`<a href="https://blutopia.xyz/torrents?imdb={imdbid}#page/1" target="_blank">BLU</a>`,
`<a href="https://pt.hdpost.top/torrents?imdb={imdbid}#page/1" target="_blank">HDPost</a>`,
`<a href="https://hd-torrents.org/torrents.php?&search={imdbid}" target="_blank">HDT</a>`,
`<a href="https://hd-space.org/index.php?page=torrents&search={imdbno}&active=1&options=2" target="_blank">HDSpace</a>`,
// `<a href="http://hdroute.org/browse.php?action=s&imdb={imdbno}" target="_blank">HDR</a>`,
// `<a href="https://hdf.world/torrents.php?searchstr={search_name}" target="_blank">HDF</a>`,
`<a href="https://privatehd.to/torrents?in=1&search={search_name}" target="_blank">PHD</a>`,
// `<a href="https://avistaz.to/torrents?in=1&search={search_name}" target="_blank">AVZ</a>`,
// `<a href="https://xthor.tk/browse.php?sch={search_name}" target="_blank">xTHOR</a>`,
`<a href="https://lemonhd.org/torrents.php?search={imdbid}&search_area=imdb&suggest=4" target="_blank">Lemon</a>`,
// `<a href="https://lemonhd.org/torrents.php?search={search_name}&search_area=0" target="_blank">Lemon2</a>`,
`<a href="https://uhdbits.org/torrents.php?searchstr={imdbid}" target="_blank">UHD</a>`
];
这里对应后图的快速搜索,即根据IMDB或名称查找站点是否有对应的资源,跟上边一样,注释掉了就不会显示。
//常用站点列表,这里只是举例说明,可以替换成自己想要的站点名称即可
const common_sites = ['HDPost', 'TTG', 'CMCT', 'HUDBT', 'LemonHD', 'Pter'];
//这部分是属于官种名称匹配,用于声明感谢,可自定义匹配正则以及感谢bbcode
const reg_team_name = {
'MTeam': /-(.*mteam|mpad|tnp|BMDru)/i,
'CMCT': /-(CMCT|cmctv)/i,
'HDSky': /-(hds|.*@HDSky)/i,
'CHDBits': /-(CHD|.*@CHDBits)/i,
'OurBits': /(-Ao|-.*OurBits|-FLTTH|-IloveTV)/i,
'TTG': /-(WiKi|DoA|.*TTG|NGB|ARiN)/i,
'HDChina': /-(HDC)/i,
'PTer': /-(Pter|.*Pter)/i,
'LemonHD': /-(LHD|i18n|League.*)/i,
'HDHome': /-hdh/i,
'PThome': /(-pthome|-pth|.*@pth)/i,
'PuTao': /-putao/i,
'NanYang': /-nytv/i,
'TLFbits': /-tlf/i,
'HDDolby': /-DBTV/i,
'FRDS': /-FRDS|@FRDS/i,
'BeiTai': /-BeiTai/i
};
const thanks_str = "[quote][b][color=Blue]转自{site},感谢原制作者发布。[/color][/b][/quote]\n\n{descr}";
上边那个常用站点列表对应的是一键转发打开多个站点长传页面,可以对照样式添加想要发布的站点。另外的那部分是声明判断官种来感谢的,基本上不用管。
基本上只要设置这一部分就够了,如果自己不需要魔改的话。支持大概转发到50多个站点,上方设置开启了10来个而已,源站点没有具体计算。大概是国内NP架构都会有部分支持~
外观
以蝴蝶、FL、BLU、UHD为例,打开种子详情页面:
典型的NP架构,内站无需多言,直接转发即可。
FL表格不明显,自己单独写了一个表格,BLU和UHD分属于不同的外网架构。
存在的问题及解决思路
它们转内站最大的问题就是:
- 图片防外链:所以博客里边讲解了一些自动截图上传的python脚本。
- 缺失豆瓣信息:多是IMDB,所以使用了PTGen的API(感谢R酱)用于获取,博客里也有其他的一些API和实现方案。
所以基本上就是点击获取就可以得到豆瓣信息,之后点击转发就可以了。
以上是电影的直接解决方案,但是一旦碰到剧集就傻眼了,因为国外的剧集基本上都是第一季的imdb。所以在不是第一季的前提下,又弄出了两种替代备选方案。
- 点击选中API,会有一个隐藏的textare下拉出来,此时点击检索名称,会有一些检索结果,选中合适的资源对应的豆瓣链接,点击获取,成功后再次点击转发,已经OK了
- 实在是没有搜索出来的,取消选中API,直接搜索名称会跳转到豆瓣,将获取到的豆瓣链接替换输入框里的imdb链接,再次点击获取即可,过程我就不演示了。
至于脚本还拥有的其他功能,只能靠大家慢慢去探索了,总而言之,无论内站外站,都有了比较成熟的解决方案。
总结
世界上本没有路,走的人多了,也便成了路。(本篇文章所用截图均保存于路过图床,希望不会有事,哈哈~~~)