-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
_ #19
Conversation
Merge pull request #17 from TeamKillerX/main
Reviewer's Guide by SourceryThis PR refactors the AkenoPlus class by introducing a new helper method Updated class diagram for AkenoPlusclassDiagram
class AkenoPlus {
- key
- api_endpoint: str
- headers: dict
+ AkenoPlus(key, api_endpoint)
+ api_akenoai(method)
+ set_key(new_key: str)
+ clean(file_path: str)
+ terabox(link)
+ terabox_v2(link)
+ chatgpt_old(query)
+ chatgpt_mode_web(query, **params)
+ sites_torrens_all()
+ search_for_torrents(**params)
+ get_torrent_from_url(**params)
+ get_recent(**params)
+ get_category(**params)
+ paal_see(files_open, **params)
+ remini_enhancer(files_open)
+ paal_text_to_image(**params)
+ google_video_to_text(files_open, **params)
+ google_image_to_text(files_open, **params)
+ google_audio_to_text(files_open, **params)
+ blackbox(**payload)
+ hentai()
+ fbdown(link)
+ pinterest(**params)
+ igdl(version, **params)
+ fdownloader(**params)
+ capcut(link)
+ add_ipblock(ip)
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @xtsea - I've reviewed your changes - here's some feedback:
Overall Comments:
- The
fdownloader
method still uses string concatenation instead of the newapi_akenoai()
helper method - In the
capcut
method, theurl
variable is used but not properly defined usingapi_akenoai()
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
akenoai/akeno.py
Outdated
@@ -32,6 +33,9 @@ def __init__(self, key=..., api_endpoint: str = "https://private-akeno.randydev. | |||
self.api_endpoint = api_endpoint | |||
self.headers = {"x-akeno-key": str(self.key)} | |||
|
|||
def api_akenoai(self, method=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: The method should validate the method
parameter to handle None case gracefully
Consider adding validation to prevent appending 'None' to the URL when method is None
def api_akenoai(self, method):
if not method:
raise ValueError("Method parameter cannot be None or empty")
return f"{self.api_endpoint}/{method}"
return await response.json() | ||
|
||
async def fdownloader(self, **params): | ||
url = self.api_akenoai("akeno/capcut-v1") | ||
async with aiohttp.ClientSession() as session: | ||
async with session.get(f"{self.api_endpoint}/akeno/fdownloader", params=params, headers=self.headers) as response: | ||
return await response.json() | ||
|
||
async def capcut(self, link=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk): The url variable is used but never defined using api_akenoai
Merge pull request #19 from TeamKillerX/main
Summary by Sourcery
Enhancements: