def main(): show_header() service.download_info() print("Working with total of {} episodes".format( service.get_latest_show_id())) display_results()
def main(): show_header() # DOWNLOAD THE EPISODE DATA url = 'https://talkpython.fm/episodes/rss' resp = requests.get(url) resp.raise_for_status() dom = ElementTree.fromstring(resp.text) items = dom.findall('channel/item') episode_count = len(items) for idx, item in enumerate(items): episode = Episode( item.find('title').text, item.find('link').text, item.find('pubDate').text, episode_count - idx - 1) episode_data[episode.show_id] = episode # GET LATEST SHOW ID latest_show_id = get_latest_show_id() print("Working with total of {} episodes".format(latest_show_id)) end, start = display_results() for show_id in range(start, end): get_episode(show_id)
def display_results(): # DISPLAY RESULTS start = random.randint(90, 110) latest_id = get_latest_show_id() end = random.randint(130, latest_id + 1) for show_id in range(start, end): get_episode(show_id)
def main(): print('This is a github test') print('this is a new line for testing github') show_header() service.download_info() print("Working with total of {} episodes".format(service.get_latest_show_id())) display_results()
def display_results(): start = random.randint(90, 110) end = random.randint(130, service.get_latest_show_id()+1) for show_id in range(start, end): info = service.get_episode(show_id) print("{}. {}".format(info.show_id, info.title))
def display_results(): # DISPLAY RESULTS start = get_min_show_id() end = get_latest_show_id() for show_id in range(start, end): info = get_episode(show_id) print("{}. {}".format(info.show_id, info.title))
def display_results(): # DISPLAY RESULTS start = random.randint(90, 110) latest_id = get_latest_show_id() end = random.randint(130, latest_id + 1) for show_id in range(start, end): info = get_episode(show_id) print("{}. {}".format(info.show_id, info.title))
def display_results(): start = random.randint(90, 110) end = random.randint(130, service.get_latest_show_id()+1) for show_id in range(start, end): info = service.get_episode(show_id) print("{}. {}".format(info.show_id, info.title))
def main(): show_header() download_data() print("Working with total of {} episodes".format(get_latest_show_id())) display_results()
def display_results(): # This is updated since the video recording. # We had to trim back the episode list, so I changed # this code to use the moving numbers from the RSS feed # as they change over time. start = service.get_min_show_id() end = service.get_latest_show_id() for show_id in range(start, end): info = service.get_episode(show_id) print("{}. {}".format(info.show_id, info.title))
def main(): """ A short comment to test commit feature with github :return: """ show_header() service.download_info() print("Working with total of {} episodes".format( service.get_latest_show_id())) display_results()
def display_results(): """ A new comment for tests with github integration :return: """ start = random.randint(90, 110) end = random.randint(130, service.get_latest_show_id() + 1) for show_id in range(start, end): info = service.get_episode(show_id) print("{}. {}".format(info.show_id, info.title))
def main(): # SHOW THE HEADER show_header() # DOWNLOAD THE EPISODE DATA download_data() # GET LATEST SHOW ID latest_show_id = get_latest_show_id() print("Working with total of {} episodes".format(latest_show_id)) # DISPLAY RESULTS display_results()
def main(): show_header() download_data() # GET LATEST SHOW ID latest_show_id = get_latest_show_id() print("Working with total of {} episodes".format(latest_show_id)) end, start = display_results() for show_id in range(start, end): # GET EPISODE info = get_episode(show_id) print("{}. {}".format(info.show_id, info.title))
def main(): show_header() service.download_info() print("Working with total of {} episodes".format(service.get_latest_show_id())) display_results()
def display_results() -> object: # DISPLAY RESULTS start = random.randint(1, 30) latest_id = get_latest_show_id() end = random.randint(1, latest_id + 1) return end, start