Skip to content

FEAT: Lyrics Web Scraping functionality as alternative to hard-coded#26

Open
Grok42 wants to merge 1 commit into
bajuba:mainfrom
Grok42:main
Open

FEAT: Lyrics Web Scraping functionality as alternative to hard-coded#26
Grok42 wants to merge 1 commit into
bajuba:mainfrom
Grok42:main

Conversation

@Grok42
Copy link
Copy Markdown

@Grok42 Grok42 commented May 14, 2022

FEAT: Added Lyrics Web Scraping functionality as alternative to hard-coded.

Hi James, the Rick Roll (Lyrics to File) function in main/tools.py gave me a chuckle so I thought I'd add something. Not sure if this repo is WIP or a leftover from a previous semester. Might get some mileage out of the modules I imported for future classes though.

I already had most of the script edits written since I've been using similar do web scrap DeviantArt pages and archive my web-based Poetry/Lit hobbycraft submissions to file. Dread eventually losing access to DeviantArt and the 350+ Literature submissions I've made. Need to get offline copies zipped up. DevArt is a big site though so not worried overly much about it going under.

Basically, just copied/edited existing script and then copy/pasted lyrics into a DeviantArt Lit Submission.

The new tools.py script is web-scrapping that. You can find it at this URL below (and in the code)...
Never-Gonna-Give-You-Up

I do have my DeviantArt credentials stored on my PCs browers but the script addition works from console. Haven't tested it on a PC that has never signed in to Deviant Art. So if Deviant Art stores some kind of device authentication on their servers and uses that, the script may not pull (curl) everything it needs. Let me know if there are issues. I'll give it a go on my PC downstairs (never logged in to DA) later.

Looking forward to our Zoom.

Best Regards,
John Hampton

@Grok42
Copy link
Copy Markdown
Author

Grok42 commented May 14, 2022

Additional note:
The three new module imports I mentioned. Possibly all three need to be installed (pip install [module]).
-- requests (curl module)
-- bs4 (beautiful soup)
-- re (regex module)

Though "re" module my be built in to base Python install, not sure. Pretty sure other two need installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant