2023年2月15日18:02:55

master
zhangmeng 2023-02-15 18:03:03 +08:00
parent e8970a3263
commit 5a67816074
4 changed files with 119 additions and 1 deletions

View File

@ -43,6 +43,9 @@ public class HomeController implements Serializable {
if (newValue.getIndex() == 1 ){
spring();
}
if (newValue.getIndex() == 2){
vip_parser();
}
}
});
}
@ -74,6 +77,15 @@ public class HomeController implements Serializable {
common_method();
}
private void vip_parser(){
try {
root = FXMLLoader.load(ResourcesUtils.getResource("vip-parser"));
} catch (IOException e) {
e.printStackTrace();
}
common_method();
}
private void common_method(){
splitPane.getItems().remove(1);
splitPane.getItems().add(1, root);

View File

@ -0,0 +1,89 @@
package com.zhangmeng.tools.controller;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.ComboBox;
import javafx.util.StringConverter;
public class VipParserController {
@FXML
private ComboBox<URLS> comboBox;
@FXML
public void initialize() {
ObservableList<URLS> list = FXCollections.observableArrayList();
URLS[] values = URLS.values();
list.addAll(values);
comboBox.setConverter(new StringConverter<URLS>() {
@Override
public String toString(URLS object) {
if (object == null){
return "";
}
return object.getName();
}
@Override
public URLS fromString(String string) {
return null;
}
});
comboBox.setItems(list);
comboBox.getSelectionModel().select(4);
}
@FXML
public void player(){
}
public enum URLS {
vip1717yun("1717yun解析", "https://www.1717yun.com/jx/ty.php?url=", "稳定通用"),
wpsseo("wpsseo", "http://www.wpsseo.cn/jx/?url=", "稳定通用"),
cjw123("cjw123", "https://a.cjw123.com/index.php?url=", "稳定通用"),
xmflv("xmflv", "https://jx.xmflv.com/?url=", "稳定通用"),
jsonplayer("jsonplayer", "https://jx.jsonplayer.com/player/?url=", "稳定通用"),
vip1717yun_2("VIP视频解析116kan智能解析", "https://www.1717yun.com/api/?url=", "vip解析");
private String name;
private String url;
private String desc;
URLS(String name, String url, String desc) {
this.name = name;
this.url = url;
this.desc = desc;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
}

View File

@ -13,7 +13,8 @@ public class ResourcesUtils {
public enum Menu{
Md5("md5加密",0),
SpringSecurity("spring加密",1);
SpringSecurity("spring加密",1),
VipParser("vip解析",2);
Menu(String title, int index) {
this.title = title;

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane fx:controller="com.zhangmeng.tools.controller.VipParserController" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="649.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Label layoutX="165.0" layoutY="273.0" text="将要解析的视频地址" AnchorPane.leftAnchor="165.0" />
<TextField layoutX="315.0" layoutY="269.0" prefHeight="25.0" prefWidth="457.0" />
<ComboBox layoutX="781.0" layoutY="269.0" prefHeight="25.0" prefWidth="246.0" fx:id="comboBox" />
<Button layoutX="1043.0" layoutY="269.0" mnemonicParsing="false" text="解析" AnchorPane.rightAnchor="117.0" onAction="#player"/>
</children>
</AnchorPane>