Check-in [915e4b09da]
Overview
Comment: | Don't keep converter Soundcloud streaming URLs (access token time out after an hour or something). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
915e4b09dadfae6d3dbcb238616870b8 |
User & Date: | mario on 2015-05-26 08:38:25 |
Other Links: | manifest | tags |
Context
2015-05-27
| ||
10:49 | Minor formulation fix. check-in: 80da39f2ec user: mario tags: trunk | |
2015-05-26
| ||
08:38 | Don't keep converter Soundcloud streaming URLs (access token time out after an hour or something). check-in: 915e4b09da user: mario tags: trunk | |
02:09 | Move broken plugins into disabled/ folder. check-in: 75f6084791 user: mario tags: trunk | |
Changes
Modified contrib/url_soundcloud.py from [e898244f76] to [df26d4522d].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + - + + | # api: streamtuner2 # title: Soundcloud streams # description: Convert soundcloud links from reddit to streamable tracks |
︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | + | url = row["url"] log.DATA_CONVERT_SOUNDCLOUD(url) track = client().get('/resolve', url=url) track_str = "/tracks/{}/stream".format(track.id) url = client().get(track_str, allow_redirects=False).location # override attributes row = copy.copy(row) # Throw away afterwards; tokens time out. row["url"] = url row["format"] = "audio/mpeg" audioformat = "audio/mpeg" source = "srv" except Exception as e: log.ERR_SOUNDCLOUD("URL resolving failed:", e) |
︙ |