找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 1626|回复: 5

[iptv信源 资源分享或寻求] 百视tvapp

[复制链接]
发表于 2022-4-21 18:32 | 显示全部楼层 |阅读模式
  1. import java.io.*;
  2. import java.net.URL;
  3. import java.net.URLConnection;
  4. import java.security.MessageDigest;
  5. import java.security.NoSuchAlgorithmException;
  6. import java.text.SimpleDateFormat;
  7. import java.util.Date;
  8. import net.sf.json.JSONObject;
  9. public class test {

  10.     public static void main(String[] args){
  11.         String time = XP();
  12.         String str = "channelid=199999&deviceInfo=" +"x7eWefrJDIFetLs7vPUepQFyG7T8WdM+UrH3g6JutCvZC9MDynD67vCi9WKg6l4L4iCKARfhMuZGdA0f53vz0Iwh9CLQFGZbNwuEDZ6/MhcDzKKZXcDHZuV3ZbG+VMGnFKHVlZ3nZDJzbDZocgwmTNUV2TFpiny0MXnYkyAqMw9s84hxFjmqbtzNsHBpO0mgbmfVxbb2qEj9PhNwU9dxvnIIqSiXJkUR5G4x/kJhbmXwjKfRoxzOLLIt6FIDTVFcPe8KOAyRanjyeWZx+BaGOA==" + "&devid=1899999&modelType=1&osVersion=25&platform=android&roleType=1&time=" + time + "&udid=bbdd4df1c5ae18ae&userId=0&version=4803&";
  13.         str = str.substring(0, str.length() + -1) + "C8F5954G8B61A93EDT4594BB8C318852";
  14.         String sign = MD5(str);
  15.         String param = "{"platform":"android","roleId":"","roleType":"1","sign":""+sign+"","time":""+time+"","userId":"0","devid":"1899999","version":4803,"osVersion":25,"channelid":"199999","udid":"bbdd4df1c5ae18ae","deviceInfo":"x7eWefrJDIFetLs7vPUepQFyG7T8WdM+UrH3g6JutCvZC9MDynD67vCi9WKg6l4L4iCKARfhMuZG\\ndA0f53vz0Iwh9CLQFGZbNwuEDZ6/MhcDzKKZXcDHZuV3ZbG+VMGnFKHVlZ3nZDJzbDZocgwmTNUV\\n2TFpiny0MXnYkyAqMw+0rfIMOXnvXqG5zmh4Agy/Jp7aSd+IBRp9urPqyP2wELPpg+xVYEg5+/+n\\n5QZj0/YkW9bWBB6NUDfkHf97y4InaJ56TweBvF8X6xfPC0RVqQ\\u003d\\u003d\\n","modelType":"1"}";
  16.         String url = "https://bp-api.bestv.com.cn/cms/api/live/channels";
  17.         JSONObject sr = sendPost(url,param);
  18.         System.out.println(sr);
  19.     }
  20.     public static String XP() {
  21.         return new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
  22.     }
  23.     public static String MD5(String str) {
  24.         byte[] bytes = str.getBytes();
  25.         char[] cArr = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
  26.         try {
  27.             MessageDigest instance = MessageDigest.getInstance("MD5");
  28.             instance.update(bytes);
  29.             byte[] digest = instance.digest();
  30.             char[] cArr2 = new char[32];
  31.             int i2 = 0;
  32.             for (int i3 = 0; i3 < 16; i3++) {
  33.                 byte b2 = digest[i3];
  34.                 int i4 = i2 + 1;
  35.                 cArr2[i2] = cArr[(b2 >>> 4) & 15];
  36.                 i2 = i4 + 1;
  37.                 cArr2[i4] = cArr[b2 & 15];
  38.             }
  39.             return new String(cArr2);
  40.         } catch (NoSuchAlgorithmException e2) {
  41.             e2.printStackTrace();
  42.             return null;
  43.         }
  44.     }


  45.     public static JSONObject sendPost(String url, String param) {
  46.         PrintWriter out = null;
  47.         BufferedReader in = null;
  48.         JSONObject jsonObject = null;
  49.         String result = "";
  50.         try {
  51.             URL realUrl = new URL(url);
  52.             // 打开和URL之间的连接
  53.             URLConnection conn = realUrl.openConnection();
  54.             conn.setRequestProperty("User-Agent", "bestv app  android 4803 vivo");
  55.             conn.setRequestProperty("userId", "0");
  56.             conn.setRequestProperty("udid","bbdd4df1c5ae18ae");
  57.             conn.setRequestProperty("Content-Type", "application/json; charset=utf-8");
  58.             conn.setRequestProperty("connection", "Keep-Alive");
  59.             // 发送POST请求必须设置如下两行
  60.             conn.setDoOutput(true);
  61.             conn.setDoInput(true);
  62.             // 获取URLConnection对象对应的输出流(设置请求编码为UTF-8)
  63.             out = new PrintWriter(new OutputStreamWriter(conn.getOutputStream(), "UTF-8"));
  64.             // 发送请求参数
  65.             out.print(param);
  66.             // flush输出流的缓冲
  67.             out.flush();
  68.             // 获取请求返回数据(设置返回数据编码为UTF-8)
  69.             in = new BufferedReader(
  70.                     new InputStreamReader(conn.getInputStream(), "UTF-8"));
  71.             String line;
  72.             while ((line = in.readLine()) != null) {
  73.                 result += line;
  74.             }
  75.             jsonObject = JSONObject.fromObject(result);
  76.             //System.out.println(jsonObject);
  77.         } catch (IOException e) {
  78.             e.printStackTrace();
  79.         } finally{
  80.             try{
  81.                 if(out!=null){
  82.                     out.close();
  83.                 }
  84.                 if(in!=null){
  85.                     in.close();
  86.                 }
  87.             }
  88.             catch(IOException ex){
  89.                 ex.printStackTrace();
  90.             }
  91.         }

  92.         return jsonObject;
  93.     }


  94. }
复制代码


点评

可惜频道太少,原来的bestv频道多的多,现在只有几个基础频道了  发表于 2022-4-22 08:34
我的恩山、我的无线 The best wifi forum is right here.
发表于 2022-4-21 18:43 | 显示全部楼层
骞蹭粈涔堢敤鐨
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-4-21 20:06 | 显示全部楼层
这是百视通盒子的直播app?还是上海官网那个百视通app?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-4-21 20:10 | 显示全部楼层
发的JAVA源码?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-4-21 20:15 | 显示全部楼层
鲸鱼:啊啊啊啊啊啊啊啊啊
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-24 11:36

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表