Pyrics is a tool to scrape lyrics, get rhymes, generate relevant lyrics with rhymes.

Related tags

Web CrawlingPyrics
Overview

Pyrics

Pyrics is a tool to scrape lyrics, get rhymes, generate relevant lyrics with rhymes.

./test/run.py provides the full function in terminal

cmd>> python run.py

or

cmd>> conda activate
conda>> python run.py

Author: DK Xie

Installation

pip install Pyrics

Initialization

Way 1: Not Exist Data

from Pyrics import Pyrics as prc

prc = prc.Pyrics()

Way 2: Already Exist Data

from Pyrics import Pyrics as prc

prc = prc.Pyrics(path)

if exist data folder 'lyrics', folder strucure:

-lyrics
   -rhymes

lyric data (.csv) in lyrics folder, e.g.,

bands songs lyrics
0 Little Richard Tutti Frutti Wop-bop-a-loo-mop alop-bom-bom
1 Little Richard Tutti Frutti Tutti frutti, oh rutti
2 Little Richard Tutti Frutti Tutti frutti, woo!
3 Little Richard Tutti Frutti Tutti frutti, oh rutti
4 Little Richard Tutti Frutti Tutti frutti, oh rutti
5 Little Richard Tutti Frutti Tutti frutti, oh rutti

rhyme data (.csv) in rhymes folder, e.g.,

bands songs lyrics rhymes
0 Little Richard Tutti Frutti Wop-bop-a-loo-mop alop-bom-bom om
1 Little Richard Tutti Frutti Tutti frutti, oh rutti i
2 Little Richard Tutti Frutti Tutti frutti, woo! u
3 Little Richard Tutti Frutti Tutti frutti, oh rutti i
4 Little Richard Tutti Frutti Tutti frutti, oh rutti i
5 Little Richard Tutti Frutti Tutti frutti, oh rutti i

Generate Datasets

artists = 'Led Zeppelin'

1.Download Lyrics

#default iters_num = 1e20
download_lyrics(artists=artists, iters_num = 5, delay_time=10, fluctuate_rate=5):
bands songs lyrics
0 Led Zeppelin Good Times Bad Times In the days of my youth, I was told what it means to be a man
1 Led Zeppelin Good Times Bad Times And now I've reached that age, I've tried to do all those things the best I can
2 Led Zeppelin Good Times Bad Times No matter how I try, I find my way into the same old jam
3 Led Zeppelin Good Times Bad Times Good times, bad times, you know I've had my share
4 Led Zeppelin Good Times Bad Times When my woman left home with a brown eyed man
5 Led Zeppelin Good Times Bad Times But I still don't seem to care

2.Generate Lyrics Data with Rhymes

generate_rhymes(artist_search=artists)
bands songs lyrics rhymes
0 Led Zeppelin Good Times Bad Times In the days of my youth, I was told what it means to be a man ?n
1 Led Zeppelin Good Times Bad Times And now I've reached that age, I've tried to do all those things the best I can ?n
2 Led Zeppelin Good Times Bad Times No matter how I try, I find my way into the same old jam ?m
3 Led Zeppelin Good Times Bad Times Good times, bad times, you know I've had my share ?r
4 Led Zeppelin Good Times Bad Times When my woman left home with a brown eyed man ?n
5 Led Zeppelin Good Times Bad Times But I still don't seem to care ?r

Basic Function

lyrics = 'Don\'t you cry tonight'
artists = ['Guns N\' Roses', 'the doors','led zeppelin']

1.Get Rhymes of Lyrics

get_rhymes(lyrics)

=>'a?t'

2.Get the Lyrics with the Same Rhymes

get_rhymes_lyrics(lyrics=lyrics, artists=artists, length=5, exclude=True, same=False, print_lyrics=False):
bands songs lyrics rhymes
0 Led Zeppelin Heartbreaker Abuse my love a thousand times a?mz
1 The Doors Peace Frog (She came) The women are crying a???
2 Guns N' Roses Oh My God Well, this is better than a good compromise a?z
3 Guns N' Roses Don't Cry Talk to me softly, there's something in your eyes a?z
4 The Doors Someday Soon But you're going to die a?
5 The Doors Break On Through (To The Other Side) She get high a?

3.Get Relevant Lyrics contain Input Lyrics

lyrics = 'I love you'
get_relevant_lyrics(lyrics=lyrics, artists=artists, length=5):
bands songs lyrics rhymes
18 The Doors Ships w/Sails Well, you asked how much I love you u
32 Led Zeppelin Darlene And I love you, Yes I do u
31 Led Zeppelin Darlene Cause I love you, Darlene in
12 The Doors Hello, I Love You Hello, I love you u
3 Guns N' Roses Prostitute Where would you go if I told you I love you and then walked away? Oh, yeah ?

Core Function: Generate Songs Lyrics

Combine the lyrics randomly to generate songs with rhymes

keyword = 'baby'
artists = ['Guns N\' Roses', 'the doors','led zeppelin']

1.Generate Songs Lyrics contain Keywords with Rhymes

generate_lyrics(inputs=keyword, artists=artists, paragraph_length=4, lyrics_length=16, relevant=True, same=False, print_lyrics=True )
I gotta tell you baby
Save our city
Think of me as just a dream
Changes fill my time, baby, that's alright with me


Tell me, baby, what's my name
Alright, okay, alright, okay!
All that amounts to is love that you fed by perversion and pain
In fact, they look so strange


Tell you, pretty baby
Changes fill my time, baby, that's alright with me
I'm from South Philadelphia
It'd be enough, but just my luck, I fell in love and maybe


When the levee breaks, baby you've got to move, you got to move now
I see you walking around
People talking all around
Break it down

2.Generate Song Lyrics with the Same Rhymes of Input

generate_lyrics(inputs=keyword, artists=artists, paragraph_length=4, lyrics_length=16, relevant=False, same=False, print_lyrics=True )
She just puts around, being lazy
Somebody, somebody
Oh baby, baby, I like your honey and it sure likes me
If I could teach my hands to see


Noon burned gold into our hair
Gonna love you, baby, here I come again
Lost cells
But now, could you blow it all on a million-dollar bet


I never wanted you to be someone afraid to know themselves
And now I can't get back again
Please, Mr. Fireman, won't you ring your bell?
Craze, baby, the rainbow's end


Down in the pits you go no lower
You don't have to go, oh, oh, oh, oh
To a strange night of stone
Oh yeah, oh yeah, oh, oh, oh
Owner
MisterDK
MisterDK
An application that on a given url, crowls a web page and gets all words, sorts and counts them.

Web-Scrapping-1 An application that on a given url, crowls a web page and gets all words, sorts and counts them. Installation Using the package manage

adriano atambo 1 Jan 16, 2022
Web Crawlers for Data Labelling of Malicious Domain Detection & IP Reputation Evaluation

Web Crawlers for Data Labelling of Malicious Domain Detection & IP Reputation Evaluation This repository provides two web crawlers to label domain nam

1 Nov 05, 2021
fork huanghyw/jd_seckill

Jd_Seckill 特别声明: 本仓库发布的jd_seckill项目中涉及的任何脚本,仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断。 本项目内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布。

512 Jan 03, 2023
京东云无线宝积分推送,支持查看多设备积分使用情况

JDRouterPush 项目简介 本项目调用京东云无线宝API,可每天定时推送积分收益情况,帮助你更好的观察主要信息 更新日志 2021-03-02: 查询绑定的京东账户 通知排版优化 脚本检测更新 支持Server酱Turbo版 2021-02-25: 实现多设备查询 查询今

雷疯 199 Dec 12, 2022
Create crawler get some new products with maximum discount in banimode website

crawler-banimode create crawler and get some new products with maximum discount in banimode website. این پروژه کوچک جهت یادگیری و کار با ابزار سلنیوم

nourollah rezaei 2 Feb 17, 2022
A crawler of doubamovie

豆瓣电影 A crawler of doubamovie 一个小小的入门级scrapy框架的应用,选取豆瓣电影对排行榜前1000的电影数据进行爬取。 spider.py start_requests方法为scrapy的方法,我们对它进行重写。 def start_requests(self):

Cats without dried fish 1 Oct 05, 2021
Using Selenium with Python to Web Scrap Popular Youtube Tech Channels.

Web Scrapping Popular Youtube Tech Channels with Selenium Data Mining, Data Wrangling, and Exploratory Data Analysis About the Data Web scrapi

David Rusho 0 Aug 18, 2021
A way to scrape sports streams for use with Jellyfin.

Sportyfin Description Stream sports events straight from your Jellyfin server. Sportyfin allows users to scrape for live streamed events and watch str

axelmierczuk 38 Nov 05, 2022
script to scrape direct download links (ddls) from google drive index.

bhadoo Google Personal/Shared Drive Index scraper. A small script to scrape direct download links (ddls) of downloadable files from bhadoo google driv

sαɴᴊɪᴛ sɪɴʜα 53 Dec 16, 2022
Scraping script for stats on covid19 pandemic status in Chiba prefecture, Japan

About 千葉県の地域別の詳細感染者統計(Excelファイル) をCSVに変換し、かつ地域別の日時感染者集計値を出力するスクリプトです。 Requirement POSIX互換なシェル, e.g. GNU Bash (1) curl (1) python = 3.8 pandas = 1.1.

Conv4Japan 1 Nov 29, 2021
🕷 Phone Crawler with multi-thread functionality

Phone Crawler: Phone Crawler with multi-thread functionality Disclaimer: I'm not responsible for any illegal/misuse actions, this program was made for

Kmuv1t 3 Feb 10, 2022
A webdriver-based script for reserving Tsinghua badminton courts.

AutoReserve A webdriver-based script for reserving badminton courts. 使用说明 下载 chromedriver 选择当前Chrome对应版本 安装 selenium pip install selenium 更改场次、金额信息dat

Payne Zhang 4 Nov 09, 2021
Binance harvester - A Python 3 script to harvest data from the Binance socket stream and calculate popular TA indicators and produce lists of top trending coins

Binance harvester - A Python 3 script to harvest data from the Binance socket stream and calculate popular TA indicators and produce lists of top trending coins

68 Oct 08, 2022
Anonymously scrapes onlinesim.ru for new usable phone numbers.

phone-scraper Anonymously scrapes onlinesim.ru for new usable phone numbers. Usage Clone the repository $ git clone https://github.com/thomasgruebl/ph

16 Oct 08, 2022
Amazon web scraping using Scrapy Framework

Amazon-web-scraping-using-Scrapy-Framework Scrapy Scrapy is an application framework for crawling web sites and extracting structured data which can b

Sejal Rajput 1 Jan 25, 2022
Python script who crawl first shodan page and check DBLTEK vulnerability

🐛 MASS DBLTEK EXPLOIT CHECKER USING SHODAN 🕸 Python script who crawl first shodan page and check DBLTEK vulnerability

Divin 4 Jan 09, 2022
A dead simple crawler to get books information from Douban.

Introduction A dead simple crawler to get books information from Douban. Pre-requesites Python 3 Install dependencies from requirements.txt (Optional)

Yun Wang 1 Jan 10, 2022
Scrapy-soccer-games - Scraping information about soccer games from a few websites

scrapy-soccer-games Esse projeto tem por finalidade pegar informação de tabela d

Caio Alves 2 Jul 20, 2022
This code will be able to scrape movies from a movie website and also provide download links to newly uploaded movies.

Movies-Scraper You are probably tired of navigating through a movie website to get the right movie you'd want to watch during the weekend. There may e

1 Jan 31, 2022
Consulta de CPF e CNPJ na Receita Federal com Web-Scraping

Repositório contendo scripts Python que realizam a consulta de CPF e CNPJ diretamente no site da Receita Federal.

Josué Campos 5 Nov 29, 2021