Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   1625

suggestions on ways i can clean up my code/

by Zentred - 26 October, 2021 - 09:27 PM
This post is by a banned member (Zentred) - Unhide
Zentred  
Infinity
611
Posts
124
Threads
4 Years of service
#1
(This post was last modified: 26 October, 2021 - 09:54 PM by Zentred. Edited 2 times in total.)
someone saw my code and said it is messy so if anyone minds checking it and seeing where improvements could be done it would be MUCH appreciated!

https://anonfiles.com/ZcnfE5Q5u9/c_py

this is just a crunchyroll checker.
This post is by a banned member (Pshyotic) - Unhide
Pshyotic  
Registered
1.013
Posts
290
Threads
6 Years of service
#2
Upwork -> consultations $15 per hour  Evil
 
P S H Y O T I C

☻♥
[Image: Czwhvkg.png]
This post is by a banned member (Zentred) - Unhide
Zentred  
Infinity
611
Posts
124
Threads
4 Years of service
#3
(26 October, 2021 - 09:28 PM)Pshyotic Wrote: Show More
Upwork -> consultations $15 per hour  Evil

no thanks, nothing is wrong with the code and it works fine just messy

this is not something i'm desperate for, is just i leave it here and if anyone will be bored they might wanna check it out and suggest stuff
This post is by a banned member (Code) - Unhide
Code  
Supreme
443
Posts
79
Threads
4 Years of service
#4
(This post was last modified: 29 October, 2021 - 07:15 PM by Code. Edited 2 times in total.)
Your headers are broken and idk about your retries system but here is the code a bit more clean : https://codeshare.io/gL07Py
 
 
This post is by a banned member (UberFuck) - Unhide
UberFuck  
Godlike
1.557
Posts
375
Threads
5 Years of service
#5
(This post was last modified: 16 February, 2022 - 01:17 PM by UberFuck. Edited 1 time in total. Edit Reason: codeshare.io -> github )
(29 October, 2021 - 07:12 PM)Iwannaexplode Wrote: Show More
Your headers are broken and idk about your retries system but here is the code a bit more clean : https://codeshare.io/gL07Py

I took that and modified it a bit.
 
(26 October, 2021 - 09:27 PM)Zentred Wrote: Show More
someone saw my code and said it is messy so if anyone minds checking it and seeing where improvements could be done it would be MUCH appreciated!

https://anonfiles.com/ZcnfE5Q5u9/c_py

this is just a crunchyroll checker.

It helps if you break the code into smaller functions.  I'd honestly put all the request headers and long strings into a config.py and just * import everything in it, otherwise they just clutter up the rest of the code. 
Also, not sure why you would be using a different proxy for each get/post request...should be one for each account check attempt.

https://gist.github.com/foxegado/2b0669d...65464e51f9

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)