Use Url class in 1
This commit is contained in:
parent
66203a72cf
commit
0efa8136a2
@ -1,6 +1,5 @@
|
||||
import string
|
||||
|
||||
URL = 'http://www.pythonchallenge.com/pc/def/map.html'
|
||||
from utils.Url import Url
|
||||
|
||||
SECRET = ("g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq "
|
||||
"ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw "
|
||||
@ -27,13 +26,11 @@ def shift_chars(riddle_string, shift_by_int):
|
||||
|
||||
def main():
|
||||
shifted_secret = shift_chars(SECRET, 2)
|
||||
print('Shifted secret:', shifted_secret)
|
||||
shifted_url = shift_chars(URL, 2)
|
||||
print('Shifted url:', shifted_url)
|
||||
new_url = URL.replace('map', shifted_url.split('/')[-1][:3])
|
||||
print('New url:', new_url)
|
||||
|
||||
|
||||
print(shifted_secret)
|
||||
shifted_url = shift_chars('map', 2)
|
||||
builder = Url()
|
||||
builder.solution = shifted_url
|
||||
print(builder.url)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
x
Reference in New Issue
Block a user