Skip to content

Commit ab8b0e7

Browse files
committed
added a new python script
1 parent f66a723 commit ab8b0e7

File tree

7 files changed

+142
-218
lines changed

7 files changed

+142
-218
lines changed

bin/archlinux-post-install-script

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
# =================================================
33
# Created: Dom 29/Dez/2013 hs 07:08
4-
# Last Change: 2018 abr 08 14:24
4+
# Last Change: 2018 abr 13 09:34
55
# This script aims: arch linux post install script
66
# Author: Sérgio Luiz Araújo Silva
77
# Site: http://vivaotux.blogspot.com
@@ -155,6 +155,7 @@ sudo pip install pdfkit
155155
# import pdfkit
156156
# pdfkit.from_url('http://google.com', 'out.pdf')
157157

158+
sudo pip install flake8
158159
# sudo pip install weasyprint
159160
#
160161
# python
@@ -244,7 +245,8 @@ yaourt -S california
244245
yaourt -Ss command-not-found
245246

246247
# leitor de rss
247-
yaourt -S feedreader-git
248+
# yaourt -S feedreader-git
249+
yaourt -S feedreader
248250

249251
# in order to use the plugin command-not-found you must have
250252
# read this also: https://wiki.archlinux.org/index.php/Pkgfile

bin/soundcloud.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
# vim: ai ts=4 sts=4 et sw=4
4+
# File: <+Filename Here+>
5+
# Author: Sergio Araujo
6+
# Last Change: dom 15 abr 2018 10:58:12 -03
7+
# Created: dom 15 abr 2018 10:58:12 -03
8+
# email: <voyeg3r ✉ gmail.com>
9+
# Github: https://github.com/voyeg3r
10+
# twitter: @voyeg3r
11+
12+
import requests
13+
import re
14+
import sys
15+
16+
url = sys.argv[-1]
17+
html = requests.get(url)
18+
19+
track_id = re.search(r'soundcloud://sounds:(.+?)"', html.text)
20+
21+
final_page = requests.get("https://api.soundcloud.com/i1/tracks/{0}/streams?client_id=6pDzV3ImgWPohE7UmVQOCCepAaKOgrVL".format(track_id.group(1)))
22+
print(final_page.json()['http_mp3_128_url'])

0 commit comments

Comments
 (0)