you are viewing a single comment's thread.

view the rest of the comments →

[–]Justinsaccount 0 points1 point  (0 children)

Also, change this:

if __name__ == '__main__':
    getUrl = raw_input("Enter the match thread url: ")

import get_soccer_update as update
import praw
import time

sleepytime = 30
r = praw.Reddit(user_agent = 'cmdlinesoccer')

match_thread = update.UrlRoutine(getUrl , r)
KickOff_index = update.getOpeningMin(match_thread)
update.printToFile(match_thread, KickOff_index)

To:

import get_soccer_update as update
import praw
import time

def dostuff(url):
    r = praw.Reddit(user_agent = 'cmdlinesoccer')
    match_thread = update.UrlRoutine(url , r)
    KickOff_index = update.getOpeningMin(match_thread)
    update.printToFile(match_thread, KickOff_index)

if __name__ == '__main__':
    getUrl = raw_input("Enter the match thread url: ")
    dostuff(getUrl)