This repository has been archived by the owner on Jan 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
l4 edited this page Apr 20, 2019
·
7 revisions
libcsn
is a C library to search and get metadata from chiasenhac.com, which is a (kinda) popular music sharing site, with good embedded metadata and high quality music (That's their claim, I'm not really sure since I'm no music expert)
- Since the new chiasenhac site uses an API to search, returning a data as json format, searching became less painful
$ curl 'https://chiasenhac.vn/search/real?q=shallow&type=json&rows=1&view_all=true'
shall return
[
{
"q":"shallow",
"music":{
"data":[
{
"music_id":1957703,
"music_title":"Shallow",
"music_artist":"Lady Gaga; Bradley Cooper",
"music_bitrate":"1000",
"music_bitrate_html":"<span class=\"card-text\" style=\"color: red\">Lossless<\/span>",
"music_link":"https:\/\/us.chiasenhac.vn\/mp3\/us-uk\/us-pop\/shallow~lady-gaga-bradley-cooper~tsvbs76sqq4tk4.html",
"cat_id":4,
"music_listen":426204,
"music_filename":"",
"music_cover":"https:\/\/data.chiasenhac.com\/data\/cover\/96\/95123.jpg",
"music_title_url":"shallow~lady-gaga-bradley-cooper",
"music_downloads":20058
}
],
"rows":"1",
"page":1,
"row_total":42
},
"music_playback":{
"data":[
],
"rows":10,
"page":1,
"row_total":0
},
"video":{
"data":[
{
"video_id":1966081,
"video_title":"Shallow",
"video_artist":"Lady Gaga; Bradley Cooper",
"video_bitrate":"96",
"video_link":"https:\/\/mv.chiasenhac.vn\/hd\/video\/us-video\/shallow~lady-gaga-bradley-cooper~vsvbv6rrqq2kaa.html",
"video_cover":"https:\/\/data.chiasenhac.com\/data\/thumb\/1967\/1966081.jpg",
"video_listen":null,
"video_length":"216",
"video_length_html":"03:36",
"video_downloads":406,
"video_title_url":"shallow~lady-gaga-bradley-cooper"
}
],
"rows":"1",
"page":1,
"row_total":2
},
"artist":{
"data":[
{
"artist_id":97016,
"artist_nickname":"Shallow Rivers",
"artist_link":"\/ca-si\/Shallow-Rivers~Y3NuX2FydGlzdH45NzAxNg==.html",
"artist_cover":"\/imgs\/no_cover_artist.jpg",
"artist_avatar":"\/imgs\/no_cover.jpg"
}
],
"rows":"1",
"page":1,
"row_total":3
},
"album":{
"data":[
{
"cover_id":52484,
"music_album":"Shallow Bed",
"album_link":"\/nghe-album\/Shallow-Bed~Y3NuX2FsYnVtfjUyNDg0.html",
"album_id":"",
"album_bitrate":null,
"album_artist":"Dry The River",
"album_artist_html":"<a href=\"\/ca-si\/Dry-The-River~Y3NuX2FydGlzdH41NzY2Mg==.html\">Dry The River<\/a>",
"album_cover":"https:\/\/data.chiasenhac.com\/data\/cover\/53\/52484.jpg"
}
],
"rows":"1",
"page":1,
"row_total":5
}
}
]
Currently there are 2 sites to fetch:
- The old site which is old and no HTTP only, loads faster however it might be deleted someday
- The new site is good to go although its structure could be change in the future
- XPATH
- SAX