Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

u/climb_bot on Reddit

License

NotificationsYou must be signed in to change notification settings

benhunter/climb_bot

Repository files navigation

climb_bot posts links to rock climbing routes and areas onMountainProject.com. climb_bot is monitoring the subredditsr/climbing andr/test. climb_bot searches MountainProject for the closest match and links to it, so partial information can often still give a relevant reply.

If climb_bot can't find a match, it won't post a reply at all. Comments that have not been replied to by climb_bot can be edited and climb_bot will keep attempting to find a link. But once a climb_bot replies, it won't look at that comment again.

Commands

climb_bot looks for the command 'climb:' or '!climb' in comments. adding the keyword 'area' searches for areas on MountainProject. Examples:

  • Climb: The Nose, Yosemite
  • climb: The Nose, Yosemite
  • !Climb The Nose, Yosemite
  • !climb The Nose, Yosemite
  • climb: area Yosemite Valley
  • !climb area Yosemite Valley

About the code

climb_bot is written inPython 3 and hosted onPythonAnywhere. It requires thePRAWandBeautifulSoup4, and uses aSQLite3 database to record comments that are replied to. The configuration file for the bot is stored inJSON and loaded byConfig.py. The reddit logic is inclimb_bot.py and replies generated from MountainProject are parsed inRoute.py andArea.py.


[8]ページ先頭

©2009-2025 Movatter.jp