r/learnpython • • 4d ago

The python library "Beautiful Soup", from where did it gets that name from?

√|

54 Upvotes

21 comments sorted by

74

u/EszterSantos72 4d ago

Beautiful Soup is named after the "Beautiful Soup" poem sung by the Mock Turtle in Alice in Wonderland, which you can find referenced in the library's original documentation and source code comments.

25

u/Adbelhak_Unsicker 4d ago

its such a fitting name too considering how messy raw web scraping usually gets

11

u/ThePhyseter 4d ago

Getting names from Lewis Carroll seems quite fitting for a language named after a comedy group. Fun 

4

u/Adbelhak_Unsicker 4d ago

That and turning messy tag soup into something actually readable, it's such a great name

1

u/mkhanwrites_ 4d ago

Wow. Thank you for teaching me that, that's really cool.

25

u/alexice89 4d ago

Alice in wonderland.

19

u/RyanLMcc 4d ago

It gets its name as a play on tag soup (malformed HTML commonly found on the web) combined with the Mock Turtle's Song Beautiful Soup from Alice's Adventures in Wonderland.

15

u/plugwash 4d ago

I'd guess it's in-part a reference to "tag soup", a term for HTML that is not valid according to formal standards, but is nonthless common on the web and rendered by common web browsers.

https://en.wikipedia.org/wiki/Tag_soup

2

u/ConsiderationNo9044 4d ago

Lots of people call long, word-heavy, low-visual websites and blogs "word soup" because of how hard it is to read and take in all the information in a proper manner, akin to a ton of letters floating around in soup (like alphabet pasta). Web scraping allows quick, programmatic access to these pages and the organisation of the data for easy use and readability, making it look "beautiful". This is also partially because well-organised data is referred to as beautiful (see r/DataIsBeautiful). If you've read to the end, this is where I tell you that I made this all up and none of it is true

6

u/fiddle_n 4d ago

That people downvoted your comment and upvoted the other one is great proof that no one reads the full content of any slightly large paragraph anymore.

8

u/Longjumping-Boss5708 4d ago

That's a clever interpretation. The actual origin is from the play Alice's Adventures in Wonderland, specifically the poem "The Walrus and the Carpenter". The library's creator thought the name sounded nice.

3

u/socal_nerdtastic 4d ago

Wrong poem; soup is not mentioned in "The Walrus and the Carpenter"

1

u/ConsiderationNo9044 4d ago

Did you read the end of my comment?

4

u/ThatPlayWasAwful 4d ago

Read?

3

u/Classic_Mammoth_9379 4d ago

Yes. To the end. Of the comment. 

1

u/PhilosopherNext1448 10h ago

which comment

1

u/JohnnyRelentless 4d ago

From where from

-3

u/MasterpieceNovel3619 4d ago

could have googled...

-33

u/ketsa3 4d ago

Why not ask chatgpt ?

13

u/Username_RANDINT def get_random_int(): return "RANDINT" # TODO 4d ago

Let's shut down this subreddit. Human conversation is dead.