Grab bag get Baidu Music API

Source: Internet
Author: User

This capture package is a three-part package that gets the data in the mobile app:

1.WIN7 Building WiFi

2.PC Erecting Proxy Server

Phone Settings Agent

3. Packet Capture analysis

First, Win7 build WiFi

Under Win7 is very simple to build WiFi, online tutorials are also very much, below a brief introduction to the method:

First of all, make sure that the laptop has the wireless card turned on.

1) Open cmd as Administrator

2) Input command: netsh wlan set hostednetwork mode=allow ssid= account key= password, where "account" and "password" is the WiFi account and password you want to set, the password is limited to 8 characters or more. Mode: Whether to enable the virtual network card. Enter Finish, enter, you can see the prompt to set the success.

3) Open the Network and Sharing Center and change the adapter settings, you can see one more name called: "Microsoft Virtual WiFi Miniport Adapter" Wireless network connection 2

4) Right-click on the network connection, select "Properties", "share", make the following settings


The word "shared" appears on the network card icon, indicating that the width connection has been shared to the virtual WiFi.

5) continue to run in cmd: netsh wlan start hostednetwork

Discover that the Red Fork on the virtual network card disappears and you can connect to the WiFi using your phone

Second, the PC set up proxy server

This article uses the Ccproxy Proxy server. Run as Administrator.

1) Settings-advanced-Network, cancel "Prohibit LAN external users"


2) Set the local LAN IP address to the IP address of the wireless network you just established.


3) account number, as set


4) Click on the "New" button. Add the IP account of the native PC to the server first




Turn on your phone's network settings, locate the WiFi network you are connected to, and configure the IP and port settings for the proxy:


Add the phone's IP account to the proxy server

At this point, the mobile phone to open web pages and applications, you can network normally, while the proxy server shows the number of connected devices.


Now that the proxy server is set up, grab the packet below.

Three, grasping packet analysis

The current packet capture analysis tools, such as Wireshark, Smartsniff and so on, the following describes the use of Smartsniff to grab the package.

Start grabbing the bag. Open the thousands listening to Baidu music version, casually point a song to play, and then stop grasping the package, the results are as follows:


API at a glance, the following summarizes a few of the more useful APIs:

1) Search Suggestions http://tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method= BAIDU.TING.SEARCH.CATALOGSUG&FORMAT=JSON&QUERY=%E5%B0%8F%E8%8B%B9%E6%9E%9C Search Suggestions: Only the name of the song/HTTP tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.search.suggestion&query=%e5%b0%8f%e8%8b%b9%e6% 9e%9c&format=json&from=ios&version=2.1.12) search results for http://tingapi.ting.baidu.com/v1/restserver/ting? from=qianqian&version=2.1.0&method=baidu.ting.search.common&format=json&query=%e5%b0%8f%e8%8b% b9%e6%9e%9c&page_no=1&page_size=303) Http://tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian &version=2.1.0&method=baidu.ting.artist.getlist&format=json&order=1&offset=0&limit=5 4) New song list http://tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method= Baidu.ting.billboard.billlist&format=json&type=1&offset=0&size=50 5) Hot song list HTTP// tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method=baidu.ting.billboard.billlist&format=json&type=2&offset=0&size=50 Notice the difference between this and the top, Type=1 6) Billboard http://tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method= baidu.ting.billboard.billlist&format=json&type=8&offset=0&size=507) Hito Chinese list 7) Hito Chinese list/http Tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method= baidu.ting.billboard.billlist&format=json&type=18&offset=0&size=508) KTV Hot song list HTTP// Tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method= baidu.ting.billboard.billlist&format=json&type=6&offset=0&size=509) Radio list/HTTP/ Tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method= Baidu.ting.radio.getcategorylist&format=json 10) Get a list of songs under a station http://tingapi.ting.baidu.com/v1/restserver/ ting?from=qianqian&version=2.1.0&method=baidu.ting.radio.getchannelsong&format=json&pn=0& Rn=10&amP;channelname=public_tuijian_ktv 11) Get SongID's song information Http://tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian &version=2.1.0&method=baidu.ting.song.getinfos&format=json&songid=8059247&ts=1408284347323 &e=jon56ktxnnbepd9mvczkyjcsx%2fe1mklx%2bpmiktcoeu4%3d&nw=2&ucf=1&res=1 12) Get a list of favorite songs of the logged-in user Where the Bduss parameter is used to indicate a unique user http://tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method= baidu.ting.favorite.getfavoritesong&format=json&pn=0&rn=50&bduss= ulxz1dwbm9icdbrmm13afcwz282ejltm1dys1ned2jpwxpqcdgyt0w0vn5sumhvqvfbqufbjcqaaaaaaaaaaaeaaab0l~ COEHL3MDQZNZM1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH-48FN~UPBTD 13) Singer List http ://tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method= Baidu.ting.artist.get72hotartist&format=json&order=1&offset=0&limit=50 14) Singer profile, Tinguid for singer ID http ://tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method=baidu.ting.artist.getinfo&format=json&tinguid=7994 15) Singer song list, tinguid for singer ID/HTTP/ Tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method= baidu.ting.artist.getsonglist&format=json&order=2&tinguid=7994&offset=0&limits= 5016) New Disc shelves http://tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method= BAIDU.TING.PLAZA.GETRECOMMENDALBUM&FORMAT=JSON&OFFSET=0&LIMIT=5017) Album info/http Tingapi.ting.baidu.com/v1/restserver/ting?from=qianqian&version=2.1.0&method= baidu.ting.album.getalbuminfo&format=json&album_id=12231435718) New Song Express http://tingapi.ting.baidu.com/v1/ restserver/ting?from=qianqian&version=2.1.0&method=baidu.ting.plaza.getnewsongs&format=json& Limit=50

This article is Eliot original, reprint please indicate source: http://blog.csdn.net/xyw_blog/article/details/38641793

Grab bag get Baidu Music API

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.