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
A modern CSS selector implementation for BeautifulSoup

Soup Sieve Overview Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. It aims to provide selecting, matching, and filter

Isaac Muse 151 Dec 23, 2022
Scrap-mtg-top-8 - A top 8 mtg scraper using python

Scrap-mtg-top-8 - A top 8 mtg scraper using python

1 Jan 24, 2022
Html Content / Article Extractor, web scrapping lib in Python

Python-Goose - Article Extractor Intro Goose was originally an article extractor written in Java that has most recently (Aug2011) been converted to a

Xavier Grangier 3.8k Jan 02, 2023
Basic-html-scraper - A complete how to of web scraping with Python for beginners

basic-html-scraper Code from YT Video This video includes a complete how to of w

John 12 Oct 22, 2022
🤖 Threaded Scraper to get discord servers from disboard.org written in python3

Disboard-Scraper Threaded Scraper to get discord servers from disboard.org written in python3. Setup. One thread / tag If you whant to look for multip

Ѵιcнч 11 Nov 01, 2022
A Web Scraping Program.

Web Scraping AUTHOR: Saurabh G. MTech Information Security, IIT Jammu. If you find this repository useful. I would appreciate if you Star it and Fork

Saurabh G. 2 Dec 14, 2022
Web scraper build using python.

Web Scraper This project is made in pyhthon. It took some info. from website list then add them into data.json file. The dependencies used are: reques

Shashwat Harsh 2 Jul 22, 2022
This is a python api to scrape search results from a url.

googlescrape Installation Installation is simple! # Stable version pip install googlescrape Examples from googlescrape import client scrapeClient=cli

1 Dec 15, 2022
Pro Football Reference Game Data Webscraper

Pro Football Reference Game Data Webscraper Code Copyright Yeetzsche This is a simple Pro Football Reference Webscraper that can either collect all ga

6 Dec 21, 2022
A python tool to scrape NFT's off of OpenSea

Right Click Bot A script to download NFT PNG's from OpenSea. All the NFT's you could ever want, no blockchain, for free. Usage Must Use Python 3! Auto

15 Jul 16, 2022
Web-scraping - A bot using Python with BeautifulSoup that scraps IRS website by form number and returns the results as json

Web-scraping - A bot using Python with BeautifulSoup that scraps IRS website (prior form publication) by form number and returns the results as json. It provides the option to download pdfs over a ra

1 Jan 04, 2022
Scraping news from Ucsal portal with Scrapy.

NewsScraping Esse é um projeto de raspagem das últimas noticias, de 2021, do portal da universidade Ucsal http://noosfero.ucsal.br/institucional Tecno

Crissiano Pires 0 Sep 30, 2021
This program scrapes information and images for movies and TV shows.

Media-WebScraper This program scrapes information and images for movies and TV shows. Summary For more information on the program, read the WebScrape_

1 Dec 05, 2021
Web3 Pancakeswap Sniper bot written in python3

Pancakeswap_BSC_Sniper_Bot Web3 Pancakeswap Sniper bot written in python3, Please note the license conditions! The first Binance Smart Chain sniper bo

Treading-Tigers 295 Dec 31, 2022
Using Python and Pushshift.io to Track stocks on the WallStreetBets subreddit

wallstreetbets-tracker Using Python and Pushshift.io to Track stocks on the WallStreetBets subreddit.

91 Dec 08, 2022
Simple python tool for the purpose of swapping latinic letters with cirilic ones and vice versa in txt, docx and pdf files in Serbian language

Alpha Swap English This is a simple python tool for the purpose of swapping latinic letters with cirylic ones and vice versa, in txt, docx and pdf fil

Aleksandar Damnjanovic 3 May 31, 2022
爬取各大SRC当日公告 | 通过微信通知的小工具 | 赏金工具

OnTimeHacker V1.0 OnTimeHacker 是一个爬取各大SRC当日公告,并通过微信通知的小工具 OnTimeHacker目前版本为1.0,已支持24家SRC,列表如下 360、爱奇艺、阿里、百度、哔哩哔哩、贝壳、Boss、58、菜鸟、滴滴、斗鱼、 饿了么、瓜子、合合、享道、京东、

Bywalks 95 Jan 07, 2023
DaProfiler allows you to get emails, social medias, adresses, works and more on your target using web scraping and google dorking techniques

DaProfiler allows you to get emails, social medias, adresses, works and more on your target using web scraping and google dorking techniques, based in France Only. The particularity of this program i

Dalunacrobate 347 Jan 07, 2023
对于有验证码的站点爆破,用于安全合法测试

使用方法 python3 main.py + 配置好的文件 python3 main.py Verify.json python3 main.py NoVerify.json 以上分别对应有验证码的demo和无验证码的demo Tips: 你可以以域名作为配置文件名字加载:python3 main

47 Nov 09, 2022
Scrape plants scientific name information from Agroforestry Species Switchboard 2.0.

Agroforestry Species Switchboard 2.0 Scraper Scrape plants scientific name information from Species Switchboard 2.0. Requirements python = 3.10 (you

Mgs. M. Rizqi Fadhlurrahman 2 Dec 23, 2021