Giter VIP home page Giter VIP logo

bilibili-oversea-search's Introduction

bilibili海外区域搜索

首先安装Tampermonkey等脚本管理工具,然后点击这里安装脚本(旧版搜索页面)。

如使用B站新版搜索页面的请点击这里安装。

在搜索页面选中番剧标签,设置好代理服务器,代理服务器相关详见这里

设置好代理服务器后在下拉框选择相应的服务器点击“搜索”按钮即可搜索。

港澳台搜索代理

港澳台可通过部署阿里云函数香港节点 HTTP 函数实现,下面为部署代码,代理服务器填写除了 https:// 外的完整路径。另外部分公共服务器可能不支持港澳台搜索,请自行选择使用。

var getRawBody = require('raw-body');
var getFormBody = require('body/form');
var body = require('body');

exports.handler = (req, resp, context) => {
    'use strict';

    const params = {
        path: req.path,
        queries: req.queries,
        headers: req.headers,
        method: req.method,
        requestURI: req.url,
        clientIP: req.clientIP,
    }
    const https = require('https');
    let queries = [];
    for (const key in req.queries) {
        queries.push(`${key}=${encodeURIComponent(req.queries[key])}`);
    }
    const options = {
        hostname: 'api.bilibili.com',
        port: 443,
        path: req.path + '?' + queries.join('&'),
        method: 'GET',
        headers: {
            'Referer': 'https://search.bilibili.com/bangumi',
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36 Edg/93.0.961.52'
        }
    };
    const httpsRequest = https.request(options, (res) => {
        console.log('statusCode:', res.statusCode);
        let responseText = '';
        res.on('data', (d) => {
            responseText += d.toString();
        });
        res.on('end', function() {
            resp.send(responseText);
        });
    });

    httpsRequest.on('error', (error) => {
        resp.send(error.toString());
    });
    httpsRequest.end();
}

bilibili-oversea-search's People

Contributors

aisukayuki avatar gamekingv avatar

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.