kalanakt / All-Url-Uploader

A simple telegram Bot, Upload Media File| video To telegram using the direct download link. (youtube, Mediafire, google drive, mega drive, etc)
https://urluploader.vercel.app
MIT License
383 stars 950 forks source link

fix error UnicodeEncode #28

Closed Divarion-D closed 2 years ago

Divarion-D commented 2 years ago

Why do we need emoticons checkmarks in the log? On vds they generate an error: UnicodeEncodeError: 'latin-1' codec can't encode character '\u2705' in position 25: ordinal not in range(256)

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 48.22 ⛔ 48.22 ⛔ 0.00
Method Length 455.00 ⛔ 455.60 ⛔ 0.60 👎
Working memory 20.13 ⛔ 20.13 ⛔ 0.00
Quality 11.64% 11.64% 0.00%
Other metrics Before After Change
Lines 544 544 0
Changed files Quality Before Quality After Quality Change
Uploader/button.py 6.66% ⛔ 6.66% ⛔ 0.00%
Uploader/dl_button.py 17.07% ⛔ 17.07% ⛔ 0.00%

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
Uploader/button.py youtube_dl_call_back 60 ⛔ 971 ⛔ 22 ⛔ 4.82% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Uploader/dl_button.py ddl_call_back 47 ⛔ 889 ⛔ 20 ⛔ 7.88% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Uploader/dl_button.py download_coroutine 14 🙂 213 ⛔ 16 ⛔ 35.25% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

kalanakt commented 2 years ago

A ok 👌