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

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more