代码示例
curl -X GET 'https://gulangsc.cn/API/sp/juhe.php?url=https://v.douyin.com/alkqlV6er1Y/'
import requests
url = 'https://gulangsc.cn/API/sp/juhe.php?url=https://v.douyin.com/alkqlV6er1Y/'
response = requests.request('GET', url)
print(response.text)
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://gulangsc.cn/API/sp/juhe.php?url=https://v.douyin.com/alkqlV6er1Y/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
fetch('https://gulangsc.cn/API/sp/juhe.php?url=https://v.douyin.com/alkqlV6er1Y/', {
method: 'GET',
})
.then(res => res.json())
.then(console.log)
.catch(console.error);
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
var client = HttpClient.newHttpClient();
var request = HttpRequest.newBuilder()
.uri(URI.create("https://gulangsc.cn/API/sp/juhe.php?url=https://v.douyin.com/alkqlV6er1Y/"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
<?php
$url = 'https://gulangsc.cn/API/sp/juhe.php?url=https://v.douyin.com/alkqlV6er1Y/';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
#!/bin/bash
# 使用 curl
curl -X GET 'https://gulangsc.cn/API/sp/juhe.php?url=https://v.douyin.com/alkqlV6er1Y/'
# 或使用 wget
wget -qO- 'https://gulangsc.cn/API/sp/juhe.php?url=https://v.douyin.com/alkqlV6er1Y/'