jmausolf / poshmark_sharing

BSD 3-Clause "New" or "Revised" License
111 stars 58 forks source link

Fix bug - script couldn't restart, time format string throws exception #8

Closed Esildor closed 5 years ago

Esildor commented 5 years ago

Fixed by using a different format string to format the time output in the print statement

Could be a caused by me being on python 3.7.... idk, I'm new to this

jmausolf commented 5 years ago

Thanks, I am working on making some additional updates to cleanup the code. I believe the error with the script not restarting might have been the placement of the driver selection in another pull request. Regarding the time format, it's possible there was a format not compatible with 3.7, but I believe this update should hopefully work for 3.7 and earlier versions: https://docs.python.org/3/library/time.html#time.strftime

    #Closing Message
    loop_delay = int(random_loop_time/60)
    current_time = time.strftime("%I:%M%p on %b %d, %Y")
    print(textwrap.dedent('''
        [*] the share war will continue in {} minutes...
            current time: {}
        '''.format(loop_delay, current_time)))

I will hopefully commit this and other changes later. Currently, I have run the code to frequently and the login captchas signal I should return to this a bit later.

jmausolf commented 5 years ago

I successfully integrated the aforementioned change in another pull request. Closing this one.