| | |
| | | String encryptedData = ""; |
| | | if(302 == status){ |
| | | String location = execute.header("Location"); |
| | | location = location.substring(location.indexOf("object_id=") + 1); |
| | | location = location.substring(0, location.indexOf("&")); |
| | | encryptedData = location; |
| | | location = location.substring(location.indexOf("?") + 1); |
| | | String[] split = location.split("&"); |
| | | for (String s : split) { |
| | | if(s.contains("object_id")){ |
| | | encryptedData = s.split("=")[1]; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | Config config = new Config().setClientKey(DouyinConfig.CLIENT_KEY).setClientSecret(DouyinConfig.CLIENT_SECRET); // 改成自己的app_id跟secret |