-
Notifications
You must be signed in to change notification settings - Fork 3
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
Sourcery refactored master branch #6
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,9 +22,9 @@ i = 1 | |
|
||
for entry in api: | ||
try: | ||
print("File" + str(i) + "=" + "http://riitube.rc24.xyz/video/wii/?q=" + entry["videoId"]) | ||
print("Title" + str(i) + "=" + entry["title"]) | ||
print("Length" + str(i) + "=" + str(entry["lengthSeconds"])) | ||
print(f"File{str(i)}=http://riitube.rc24.xyz/video/wii/?q=" + entry["videoId"]) | ||
print(f"Title{str(i)}=" + entry["title"]) | ||
print(f"Length{str(i)}=" + str(entry["lengthSeconds"])) | ||
Comment on lines
-25
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lines
|
||
|
||
i += 1 | ||
except: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,13 +28,11 @@ for entry in api.split(b"\n"): | |
if last not in playlist: | ||
playlist[last] = entry | ||
|
||
i = 1 | ||
|
||
for entry in playlist: | ||
print("File" + str(i) + "=" + "http://riitube.rc24.xyz/video/wii/?q=" + urllib.parse.quote(playlist[entry]) + "&site=iptv") | ||
print("Title" + str(i) + "=" + entry.decode()) | ||
print("Length" + str(i) + "=" + "9999999") | ||
|
||
i += 1 | ||
for i, (entry, value) in enumerate(playlist.items(), start=1): | ||
print( | ||
f"File{str(i)}=http://riitube.rc24.xyz/video/wii/?q={urllib.parse.quote(value)}&site=iptv" | ||
) | ||
print(f"Title{str(i)}={entry.decode()}") | ||
print(f"Length{str(i)}=9999999") | ||
Comment on lines
-31
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lines
|
||
# except: | ||
# continue |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,11 +16,11 @@ print("Content-Type: text/plain;charset=UTF-8;\n"); | |
|
||
print("[Playlist]") | ||
|
||
i = 1 | ||
|
||
for entry in api: | ||
print("File" + str(i) + "=" + "http://riitube.rc24.xyz/video/wii/?q=" + entry["link"].replace("https://vimeo.com/", "") + "&site=vimeo") | ||
print("Title" + str(i) + "=" + entry["name"]) | ||
print("Length" + str(i) + "=" + str(entry["duration"])) | ||
|
||
i += 1 | ||
for i, entry in enumerate(api, start=1): | ||
print( | ||
f"File{str(i)}=http://riitube.rc24.xyz/video/wii/?q=" | ||
+ entry["link"].replace("https://vimeo.com/", "") | ||
+ "&site=vimeo" | ||
) | ||
print(f"Title{str(i)}=" + entry["name"]) | ||
print(f"Length{str(i)}=" + str(entry["duration"])) | ||
Comment on lines
-19
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lines
|
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.
Lines
15-22
refactored with the following changes:convert-to-enumerate
)use-fstring-for-concatenation
)str()
from formatted values in f-strings (remove-str-from-fstring
)simplify-fstring-formatting
)