Giter Site home page Giter Site logo

dyapitest's Issues

Go版

package main

import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
"time"
)

func main() {
// 仅供学习,如有侵权,联系删除............
res, err := videoInfo([]string{"视频ID"})
fmt.Println(res, err)
}

func videoInfo(videoIds []string) (string, error) {
data := url.Values{}
data.Set("aweme_ids", fmt.Sprintf("[%s]", strings.Join(videoIds, ",")))
data.Set("origin_type", "goods_rank_list_0")
data.Set("push_params", "")
data.Set("request_source", "0")

urll := fmt.Sprintf(`https://api3-normal-c-hl.amemv.com/aweme/v1/multi/aweme/detail/?os_api=22&device_type=MI+9&ssmix=a&manifest_version_code=120701&dpi=240&uuid=262213994129345&app_name=aweme&version_name=12.7.0&ts=%d&cpu_support64=false&storage_type=0&app_type=normal&appTheme=dark&ac=wifi&host_abi=armeabi-v7a&update_version_code=12709900&channel=tengxun_new&_rticket=%d&device_platform=android&iid=0&version_code=120700&mac_address=10:2a:b3:52:8c:70&cdid=fda4c8ff-171e-4959-8154-5454fec79a87&openudid=af452f2f28b2d1f9&device_id=0&resolution=720*1280&os_version=5.1.1&language=zh&device_brand=Android&aid=1128&mcc_mnc=46007`, time.Now().Unix(), time.Now().UnixNano()/1e6)
resp, err := http.PostForm(urll, data)
if err != nil {
	return "", err
}
defer resp.Body.Close()
content, err := ioutil.ReadAll(resp.Body)
if err != nil {
	return "", err
}
return string(content), nil

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.