automated terminal push
This commit is contained in:
32
sullygnome.py
Normal file
32
sullygnome.py
Normal file
@@ -0,0 +1,32 @@
|
||||
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
|
||||
Reference in New Issue
Block a user