Full Code of Bleu404/PotplayerM3U8 for AI

main 890ee4197774 cached
2 files
5.5 KB
1.8k tokens
1 requests
Download .txt
Repository: Bleu404/PotplayerM3U8
Branch: main
Commit: 890ee4197774
Files: 2
Total size: 5.5 KB

Directory structure:
gitextract_k39kyefq/

├── MediaPlayParse - M3U8.as
└── README.md

================================================
FILE CONTENTS
================================================

================================================
FILE: MediaPlayParse - M3U8.as
================================================
/*
    资源站视频
*/

// void OnInitialize()
// void OnFinalize()
// string GetTitle() 									-> get title for UI
// string GetVersion									-> get version for manage
// string GetDesc()										-> get detail information
// string GetLoginTitle()								-> get title for login dialog
// string GetLoginDesc()								-> get desc for login dialog
// string GetUserText()									-> get user text for login dialog
// string GetPasswordText()								-> get password text for login dialog
// string ServerCheck(string User, string Pass) 		-> server check
// string ServerLogin(string User, string Pass) 		-> login
// void ServerLogout() 									-> logout
//------------------------------------------------------------------------------------------------
// bool PlayitemCheck(const string &in)					                                            -> check playitem
// string PlayitemParse(const string &in path,dictionary &MetaData, array<dictionary> &QualityList)	-> parse playitem
// bool PlaylistCheck(const string &in)																-> check playlist
// array<dictionary> PlaylistParse(const string &in)												-> parse playlist

string GetTitle()
{
    return "M3U8";
}

string GetVersion()
{
    return "1";
}

string GetDesc()
{
    return "M3U8";
}

string USERAGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36";
string HOMEURL;
int RI=0,PG=1;
bool isOnly = false;
JsonReader JSON;
array<string> URLLIST={
    "https://ikunzyapi.com/api.php/provide/vod",
    "https://www.feisuzyapi.com/api.php/provide/vod/",
    "https://api.tiankongapi.com/api.php/provide/vod/",
    "https://api.ukuapi.com/api.php/provide/vod/",
    "https://api.1080zyku.com/inc/apijson.php",
    "https://api.tiankongapi.com/api.php/provide/vod/at/json/from/tkm3u8/",
    "https://sdzyapi.com/api.php/provide/vod/",
    "https://www.hongniuzy2.com/api.php/provide/vod/at/json/"
    };

void getHomeURL(string name)
{
    HOMEURL = URLLIST[RI] + "?ac=list&PG="+PG+"&wd=" + HostUrlEncode(name);
}

JsonValue getPlayList()
{
    JsonValue ret;
    string tempstr = HostUrlGetString(HOMEURL, USERAGENT, "", "", false);
    JSON.parse(tempstr, ret);
    return ret["list"];
}

JsonValue getItemdetail(string ids)
{
    JsonValue ret;
    string detailurl = URLLIST[RI] + "?ac=detail&ids=" + ids;
    HostPrintUTF8(detailurl);
    string tempstr = HostUrlGetString(detailurl, USERAGENT, "", "", false);
    JSON.parse(tempstr, ret);
    return ret["list"];
}

array<string> handelUrlStr(string url)
{
    array<string> ret;
    if(url.find('#')>0)
    {
        url.replace("#","$");
    }
    else{
        url.replace("$$$","$");
    }
    ret = url.split("$");
    //HostPrintUTF8(url);
    return ret;
}

bool PlaylistCheck(const string & in path)
{
    array < string > temp = path.split("#");
    isOnly = false;
    if(path.find("¥")==0||path.find("$")==0){
        isOnly = true;
    }
    if(path.find("panvideo") == 0)
    {
        return false;
    }
    if (path.find(":") < 0 && temp.size() < 4) 
    {
        if(temp.length()>1){
            if(parseInt(temp[1])<100){
                RI = parseInt(temp[1])-1;
                PG = 1;
            }
            else{
                RI = parseInt(temp[1])/100-1;
                PG = parseInt(temp[1])%100;
            }
        }
        string name = temp[0];
        name.replace("$","");
        name.replace("¥","");
        getHomeURL(name);
        return true;
    }
    return false;
}

array < dictionary > PlaylistParse(const string & in path)
{
    //HostOpenConsole();
    array < dictionary > ret;
    string tempstr,ids,orign = path.split("#")[0];
    JsonValue Itemlist;
    JsonValue showList;

    HostPrintUTF8(HOMEURL);
    Itemlist = getPlayList();
    
    for (int i = 0; i < Itemlist.size(); i++) 
    {
        ids = ids + Itemlist[i]["vod_id"].asString() + ",";
    }
    showList = getItemdetail(ids);
    for (int i = 0; i < showList.size(); i++) 
    {
        string showName = showList[i]["vod_name"].asString();
        if(isOnly && ("$"+showName != orign && "¥"+showName != orign))
        {
            HostPrintUTF8(showName);
            continue;
        }
        array <string> showurl = handelUrlStr(showList[i]["vod_play_url"].asString());
        dictionary item;
        for (int j = 0; j < showurl.size(); j++)
        {
            if(showurl[j]=="")
            {
                continue;
            }
            else if(showurl[j].find("http") < 0)
            {
                item["title"] = "【资源"+(RI+1)+"】"+showName +" "+ showurl[j];
            }
            else if(showurl[j].find("m3u8") > 0)
            {
                item["url"] = showurl[j];
                ret.insertLast(item);   
            }
        }
    }
    return ret;
}


================================================
FILE: README.md
================================================
# PotplayerM3U8

## 简介

- 小型在线看视频网站寿命都比较短,网址经常更换,网站广告,播放器不好用。  
- 所以我们跳过中间商,直接查找它们引用的资源站资源。***请勿相信视频中的广告,造成损失概不负责***。

## 用法

- 1.安装[【Potplayer】](https://bleu.lanzoue.com/iFZgu07w69vg)密码:`3mk7`。
- 2.下载`MediaPlayParse - M3U8.as`文件。
- 3.打开PotPlayer安装路径,依次选择目录`Extension\Media\PlayParse`,将下载的文件粘贴到这里。
- 4.重新打开`PotPlayer`,`Ctrl+u`,文本框输入影视名称(豆瓣中文名),`确定`。

## 影视名称的几种写法

- 1.`西游记`
  > 使用第一个资源站(默认),查找跟`西游记`相关的影视

- 2.`西游记#3`
  > 使用第三个资源站,查找跟`西游记`相关的影视

- 3.`¥西游记#3`
  > 使用第三个资源站,查找名字是`西游记`的影视

- 4.`$西游记#3`
  > 同第三种用法

  ![资源站图片](https://github.com/Bleu404/PotplayerM3U8/blob/main/resource.png)
  
## 手动添加资源站
    保证支持CMS采集,数据格式是json,填写到上图的数组中,注意其中标点为英文。
    上图第三个资源站api接口:https://help.tiankongapi.com/#More
Download .txt
gitextract_k39kyefq/

├── MediaPlayParse - M3U8.as
└── README.md
Condensed preview — 2 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (7K chars).
[
  {
    "path": "MediaPlayParse - M3U8.as",
    "chars": 4973,
    "preview": "/*\r\n    资源站视频\r\n*/\r\n\r\n// void OnInitialize()\r\n// void OnFinalize()\r\n// string GetTitle() \t\t\t\t\t\t\t\t\t-> get title for UI\r\n//"
  },
  {
    "path": "README.md",
    "chars": 701,
    "preview": "# PotplayerM3U8\n\n## 简介\n\n- 小型在线看视频网站寿命都比较短,网址经常更换,网站广告,播放器不好用。  \n- 所以我们跳过中间商,直接查找它们引用的资源站资源。***请勿相信视频中的广告,造成损失概不负责***。\n\n#"
  }
]

About this extraction

This page contains the full source code of the Bleu404/PotplayerM3U8 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 2 files (5.5 KB), approximately 1.8k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!