soundcloud

package
v1.43.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2021 License: OSL-3.0 Imports: 3 Imported by: 2

README

SoundCloud

com.soundcloud.android

Newer versions are broken. Even with no proxy, I just get this over and over:

Signing you in

This one seems to work:

2020.03.19-release

How to get client_id

First, make a request like this:

GET / HTTP/2
Host: m.soundcloud.com

In the HTML response, you should see something like this:

"clientId":"iZIs9mchVcX5lhVRyQGGAYlNPVldzAoX"

The client_id seems to last at least a year:

https://github.com/rrosajp/soundcloud-archive/commit/c02809dc

Other client_ids:

widget & widget2
https://w.soundcloud.com/player/

win10_app
https://soundcouch.soundcloud.com/#/

win10_app_beta
https://soundcouch-beta.soundcloud.com/#/

Image

artworks:

https://soundcloud.com/oembed?format=json&url=https://soundcloud.com/western_vinyl/jessica-risker-cut-my-hair
https://i1.sndcdn.com/artworks-000308141235-7ep8lo-t500x500.jpg

placeholder:

https://soundcloud.com/oembed?format=json&url=https://soundcloud.com/pdis_inpartmaint/harold-budd-perhaps-moss
https://soundcloud.com/images/fb_placeholder.png

avatars:

https://soundcloud.com/oembed?format=json&url=https://soundcloud.com/pdis_inpartmaint
https://i1.sndcdn.com/avatars-000274827119-0dxutu-t500x500.jpg

Documentation

Index

Constants

View Source
const (
	Placeholder = "https://soundcloud.com/images/fb_placeholder.png"
)

Variables

View Source
var LogLevel mech.LogLevel

Functions

This section is empty.

Types

type Alternate added in v1.27.2

type Alternate struct {
	Thumbnail_URL string
	Author_URL    string
}

func Oembed added in v1.26.9

func Oembed(addr string) (*Alternate, error)

type Media

type Media struct {
	// cf-media.sndcdn.com/QaV7QR1lxpc6.128.mp3?Policy=eyJTdGF0ZW1lbnQiOlt7IlJl...
	URL string
}

type Track

type Track struct {
	ID    int
	Title string
	// 2021-04-12T07:00:01Z
	Display_Date string
	Media        struct {
		Transcodings []struct {
			Format struct {
				Protocol string
			}
			// api-v2.soundcloud.com/media/soundcloud:tracks:103650107/
			// aca81dd5-2feb-4fc4-a102-036fb35fe44a/stream/progressive
			URL string
		}
	}
	User struct {
		Username string
	}
}

func Resolve added in v1.26.8

func Resolve(addr string) (*Track, error)

func Tracks added in v1.26.8

func Tracks(ids string) ([]Track, error)

func (Track) Progressive added in v1.40.8

func (t Track) Progressive() (*Media, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL