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 display_results(latest_show_id, oldest_show_id): start = oldest_show_id end = latest_show_id + 1 for show_id in range(start, end): # GET EPISODE info = get_episode(show_id) print("{}. {}".format(info.show_id, info.title))
def display_results(): start = random.randint(90, 110) end = random.randint(130, 141) for show_id in range(start, end): info = service.get_episode(show_id) print('{} {}'.format(info.show_id, info.title))
def main(): print("Welcome to the talk python info downloader") print() service.download_info() for show_id in range(100, 130): info = service.get_episode(show_id) print(f"{info.show_id}. {info.title}")
def display_results(latest_show_id, oldest_show_id): print("Working with total of {} episodes".format(latest_show_id)) start = oldest_show_id end = 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 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(): print("Talk Python sample") service.download_info() for show_id in range(100, 130): info = service.get_episode(show_id) print("{}. {}".format(info.show_id, info.title))
def main() -> object: print("Welcome to my program") print() service.download_info() for show_id in range(100, 130): info = service.get_episode(show_id) print('{}. {}'.format(info.show_id, info.title))
def main(): print("Welcome to the Talk Python info downloader.") print() service.download_info() for show_id in range(100, 130): info = service.get_episode(show_id) print("{} {}".format(info.title, info.link))
def main(): print("Welcome to the podcast info downloader") print() service.download_info() for show_id in range(100, 130): info = service.get_episode(show_id) print("{}. {}".format(info.show_id, info.title))
def main(): print("Welcome to the talk python info downloader") print() service.download_info() for show_id in range(1, 200): info = service.get_episode(show_id) print('{}. {}'.format(info.show_id,info.title))
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 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(): 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 display_results(): for show_id in range(100, 141): info = service.get_episode(show_id) print("{}. {}".format(info.show_id, info.title))