Skip to content

Navigation Menu

Sign in
Appearance settings

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

Appearance settings

Suggestion for Code Refactoring and Enhancement in Anime Tracker python project #3080

Copy link
Copy link
@Nancy248

Description

@Nancy248
Issue body actions

I have reviewed the current implementation of the code in the repository, specifically in the [anime_tracker.py] file. I noticed some opportunities for improvement and would like to suggest the following modifications
Proposed Changes:

Modularization: The code can benefit from improved modularization. I've introduced separate functions to handle different responsibilities, making the code more readable and maintainable.

Exception Handling: by adding proper exception handling for potential errors during HTTP requests and HTML parsing, ensuring a more robust user experience.

Global Variable Elimination: The use of a global variable (soup) has been eliminated. Instead, the BeautifulSoup object is now passed between functions as a return value.

User Input Processing: User input processing has been moved to a separate function (main) for better organization, and a Keyboard Interrupt check has been added to handle program termination by the user.

Tag Presentation: Tags are now presented as a list, improving readability.

I would be happy to discuss these changes. Thank you
and let me know if it suits good

Metadata

Metadata

Assignees

Labels

assignedIssues which are assigned to someoneIssues which are assigned to someoneenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.