DEV Community

Iru.
Iru.

Posted on • Edited on

3

waybackmachine August '19

... because it's always fun to go back in time and remember how it was back then ...


pet-project :: Playmoss playlist downloader

Yeah! Finally had my hands on some code in order to download my playlists from Playmoss :)

Python is not my first language, don't judge me...

#
# $ python3 playmoss2mp3.py {playmoss_playlist_url}
# ex.
# $ python3 playmoss2mp.py https://playmoss.com/en/wideawakening/playlist/2019-wideawakening-legacy
#
#
import requests
import youtube_dl
import os,sys
from bs4 import BeautifulSoup
# sysin
#url = 'https://playmoss.com/en/wideawakening/playlist/2019-wideawakening-legacy'
url = sys.argv[1]
album = url.split('/')[-1]
# album
current = os.getcwd()
print("{}/{}".format(current,album))
if not os.path.exists(album):
os.makedirs(album)
os.chdir(album)
# playmoss req
page = requests.get(url)
soup = BeautifulSoup(page.text,'html.parser')
songs = soup.find_all(class_='song-info')
# per song download and post-process
ydl_options = {
'format':'bestaudio/best',
'postprocessors':[
{'key': 'FFmpegExtractAudio','preferredcodec': 'mp3','preferredquality': '192'},
{'key': 'FFmpegMetadata'}
]
}
for song in songs:
ysong = song.span.a.get('href')
print(ysong)
try:
with youtube_dl.YoutubeDL(ydl_options) as ydl:
ydl.download([ysong])
except:
print('error in url {}'.format(ysong))
os.chdir(current)
view raw playmoss2mp3.py hosted with ❤ by GitHub

a pic :: The league of heroic Software Developers

The league of heroic Software Developers

from League of heroic Software Developers. I would say I'm quite a shapeshifter mechanic but guess what my teammates say x)


remote-ergonomics :: SafeEye for an eye resting programme

Something that still happens me, both working at office or home, is that if I'm focused on something I tend not to make breaks, and this app has helped me to at least, exercise my SafeEyes

I'm still looking forward to something similar, but related to hand/leg/back exercises.


watch :: Silver Bullet Syndrom


adopt :: Java 11 Scripting

Although I'm starting to get my hands on python and would like to get more comfortable with bash scripting. Knowing that at some point I can use java11-Scripting is an interesting concept for devops tooling


The w00t? :: The Ikea Effect

While I was reading about How to break the monolith into microservices I got to this part

The labor of building, no matter how painful the process or imperfect the result, make us grow love for it. This is in fact known as the IKEA Effect.


takemymoney :: AirSelfie

The smallest, easiest, and most ejoyable aerial camera ever.


a game :: SuperHexagon

Monthly hook on this game called SuperHexagon (round 2€ in steam), it's like being on drugs :D
The mechanics is quite simple, just gonna zen your mind, see the shape, and the music will show you.... the crazyness; why lie.

If you enjoy live-time puzzles and precision-requiring repetitive-games to chill a bit, should try it!


monthly ear hook :: DDR Stardom Shuffle Songs

From the OST of DDR Stardom Shuffle

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay