Closed jose1711 closed 8 years ago
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.
a discussion (no related file): All right, the logic here seems to be really flowed, but before any further discussion, could you run your code through a solid beautifier for once, please ? I can't read this shit !
Comments from Reviewable
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.
a discussion (no related file):
Ran it through PythonTidy, if a specific formatter is required, please advise.
Comments from Reviewable
Review status: 0 of 1 files reviewed at latest revision, 4 unresolved discussions.
a discussion (no related file):
Great. We want to follow PEP 8 but besides that, nothing special.
lib/server/myviruresolver.py, line 31 [r2] (raw file):
__name__ = 'myviru' UA = 'Mozilla/6.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5) Gecko/2008092417 Firefox/3.0.3'
Why not to use UA
from util
?
lib/server/myviruresolver.py, line 48 [r2] (raw file):
for f in playlist['video']: streamurl = f['url'] streamurl += '|Cookie=' + urllib.quote('UniversalUserID='
Why do you always use urllib.quote()
on UniversalUserID=
? Hard coding UniversalUserID%3D
instead would improve the performance a bit.
_lib/server/myviruresolver.py, line 50 [r2] (raw file):_
streamurl += '|Cookie=' + urllib.quote('UniversalUserID=' + uuid.value) streamurl += '&User-Agent=' + urllib.quote(UA)
The same thing, but quoting the UA
outside the loop would be more appropriate.
Comments from Reviewable
Review status: 0 of 1 files reviewed at latest revision, 4 unresolved discussions.
a discussion (no related file):
ok, will use autopep8 from now on, other suggestions implemented as well
Comments from Reviewable
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.
a discussion (no related file):
But there's one exception you might want to know about. When it comes to line lengths, we use maximum of 100 characters.
LGTM, merging now.
Comments from Reviewable
Reviewed 1 of 1 files at r3. Review status: all files reviewed at latest revision, all discussions resolved.
Comments from Reviewable
This change is