Task
Students found it inconvenient to check book availability on the library website. They wanted to do it in VK, where they already spend their time.
Solution
I built a VK bot in Python. Catalog search, availability checks and reservations all happen in the chat. The bot reads live library data, so book statuses are always current.
What was done
- Helped put the requirements into a clear spec
- Built a VK bot for the university library in Python
- Added catalog search and availability checks
- Added book reservations right in the chat
- Connected the bot to live library data
Result
About 50 students a month search for and reserve books right in VK. Librarians get noticeably fewer questions about whether a book is available.
Developer's note
What was hard
The most difficult part was integrating the bot with the university catalog search. The legacy library software had no public API, and search pages responded with delays using a specific character encoding. I parsed the HTML responses carefully with BeautifulSoup, stripped redundant markup, and set strict network timeouts so the bot never hung on slow requests.
I also had to handle student typos. People frequently misspelled author names or book titles, so I added substring matching and helpful query suggestions instead of returning an empty response.
What came easy
Building the bot core with vkbottle went very fast. The asynchronous framework handled concurrent student messages effortlessly, and the chat button layout fit cleanly into the codebase on the first try.
Collecting request analytics was simple as well. Storing every search query via SQLAlchemy in PostgreSQL gave the library clear visibility into the most requested books and sections right away.
Technologies
PythonVK APIPostgreSQL