Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable cloudflare backed sites #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/bundle-all.js

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions dist/script.user.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions dist/tampermonkey-metadata.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// ==UserScript==
// @name btdouban
// @version 0.0.5
// @version 0.0.6
// @description [Caution: Ensure using VPN] Gets Douban medias' BitTorrent resources
// @namespace https://github.com/caryyu/bteye
// @author caryyu
// @match *://movie.douban.com/subject/*
// @grant GM_xmlhttpRequest
// @connect btdb.eu
// @connect kat.rip
// @connect herokuapp.com
// @connect 1337x.to
// @connect yts.mx
Expand Down
12 changes: 8 additions & 4 deletions src/source/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
const btdb_eu = require('./btdb_eu')
const kat_rip = require('./kat_rip')
// Note:
// the ones being disabled are backed by Cloudflare which can't be passed through
// @date 2021-01-22

//const btdb_eu = require('./btdb_eu')
//const kat_rip = require('./kat_rip')
const thepiratebay_org = require('./thepiratebay_org')
const _1337x_to = require('./1337x_to')
const yts_mx = require('./yts_mx')

module.exports = [
new btdb_eu(),
new kat_rip(),
//new btdb_eu(),
//new kat_rip(),
new thepiratebay_org(),
new _1337x_to(),
new yts_mx()
Expand Down
2 changes: 1 addition & 1 deletion src/source/yts_mx.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Source {

return Promise.all(torrents.map((i, val) => {
var link = $(val).attr('href')
console.log(link)

return new Promise(function (resolve, reject) {
GM_xmlhttpRequest({
method: 'GET',
Expand Down
36 changes: 18 additions & 18 deletions test/all.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const mocks = require('./mocks')
const thepiratebay_org = require('../src/source/thepiratebay_org')
const btdb_eu = require('../src/source/btdb_eu')
const kat_rip = require('../src/source/kat_rip')
//const btdb_eu = require('../src/source/btdb_eu')
//const kat_rip = require('../src/source/kat_rip')
const _1337x_to = require('../src/source/1337x_to')
const yts_mx = require('../src/source/yts_mx')
const expect = require('chai').expect
Expand All @@ -15,23 +15,23 @@ describe('Do thepiratebay.org testing', function() {
})
})

describe('Do btdb.eu testing', function() {
it('the result size should be greater than 0', async function() {
this.timeout(30000)
var keyword = 'mulan'
var result = await new btdb_eu().execute(keyword)
expect(result.length).to.be.greaterThan(0)
})
})
//describe('Do btdb.eu testing', function() {
//it('the result size should be greater than 0', async function() {
//this.timeout(30000)
//var keyword = 'mulan'
//var result = await new btdb_eu().execute(keyword)
//expect(result.length).to.be.greaterThan(0)
//})
//})

describe('Do kat.rip testing', function() {
it('the result size should be greater than 0', async function() {
this.timeout(30000)
var keyword = 'mulan'
var result = await new kat_rip().execute(keyword)
expect(result.length).to.be.greaterThan(0)
})
})
//describe('Do kat.rip testing', function() {
//it('the result size should be greater than 0', async function() {
//this.timeout(30000)
//var keyword = 'mulan'
//var result = await new kat_rip().execute(keyword)
//expect(result.length).to.be.greaterThan(0)
//})
//})

describe('Do 1337x.to testing', function() {
it('the result size should be greater than 0', async function() {
Expand Down