Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Ball Python facts #395

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ You can see the bot in action at https://www.reddit.com/user/AnimalFactsBot/comm
* Avocet
* Axolotl
* Badger
* Ball Python
* Barnacle
* Bear
* Beaver
Expand Down
14 changes: 14 additions & 0 deletions animalfacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def check_comment_for_animal(comment, reddit):
botengine('axolotl', r'\saxolotls?\s', reddit, AXOLOTL_FACTS, comment)
botengine('honeybadger', '\shoney badgers?\s', reddit, HONEYBADGER_FACTS, comment) # Needs to be here out of order so that it gets picked up before regular badger
botengine('badger', '\sbadgers?\s', reddit, BADGER_FACTS, comment)
botengine('ball python', r'\sballpython?\s', reddit, BALLPYTHON_FACTS, comment)
botengine('barnacle', '\sbarnacles?\s', reddit, BARNACLE_FACTS, comment)
botengine('bear', '\sbears?\s', reddit, BEAR_FACTS, comment)
botengine('beaver', '\sbeavers?\s', reddit, BEAVER_FACTS, comment)
Expand Down Expand Up @@ -706,6 +707,19 @@ def animalfactsbot(reddit):
'Badgers have featured in lots of British literature over the years, such as Brian Jacques\' Redwall series, \'Tommy Brock\' in Beatrix Potter\'s The Tale of Mr. Tod, \'Bill Badger\' in Mary Tourtel\'s Rupert Bear, \'Mr. Badger\' in Kenneth Grahame\'s The Wind in the Willows, and \'Trufflehunter\' in C. S. Lewis\'s Chronicles of Narnia.',
)

BALLPYTHON_FACTS = (
'The name ball python comes from their habit of rolling themselves into a tight ball when frightened.',
'Ball pythons have an average lifespan of around 30 years.',
'The oldest recorded ball python lives at the St. Louis Zoo and is more than 62 years old.',
'Wild ball pythons rely on their labial pits to help them find prey. The labial pits function as a sort of infrared vision and allow the snake to see the heat produced by other living things.',
'There are over 7,500 different ball python morphs on the market.',
'The first designer ball python morph was an albino produced in 1992.',
'The most expensive ball python morph is the lavender albino, which has gone for $40,000 in the past.',
'Ball pythons are typically nocturnal or crepuscular, meaning that they are active during dusk, dawn, and/or nighttime.',
'Ball pythons are the most popular pet snake and the second most popular pet reptile after the bearded dragon.',
'Ball pythons shed their skin every 5 to 7 weeks on average',
)

BARNACLE_FACTS = (
'Although the barnacle is frequently confused for a mollusc because of its hard outer shell, it is actually a crustacean.',
'In their juvenile form barnacles are free-floating, but eventually they attach themselves to any nearby rock, shell, or other object and stay there for the rest of their lives.',
Expand Down