Files
yankee-gnome-fire-publisher/sullygnome.py

33 lines
833 B
Python
Raw Permalink Normal View History

2025-03-10 10:38:18 -04:00
import utils
def generate_urls(channel_name, year_begin, year_end):
"""
Generates SullyGnome URLs for a given channel within a specified year range.
Args:
channel_name: The name of the Twitch channel.
year_begin: The starting year (inclusive).
year_end: The ending year (exclusive).
Returns:
A list of generated URLs.
"""
base_url = "https://sullygnome.com/channel/{}/{}/games"
urls = []
for year in range(year_begin, year_end):
for month in range(1, 13):
## print("month / ",month)
month_str = utils.convertMonthNumberMonthLong(month)
custom_url = base_url.format(channel_name, f"{year}{month_str}")
## print("final url / ", custom_url)
urls.append(custom_url)
return urls