Skip to content

Instantly share code, notes, and snippets.

@developerfred
Created May 11, 2020 02:49
Show Gist options
  • Select an option

  • Save developerfred/27256a8b98d6ee2e861ebd5c92d266fa to your computer and use it in GitHub Desktop.

Select an option

Save developerfred/27256a8b98d6ee2e861ebd5c92d266fa to your computer and use it in GitHub Desktop.
from urllib.parse import urlparse
def show_url(url):
url_data = urlparse(url)
path = url_data.path
remove_path = ["/channel/"]
for channel in remove_path:
id_channel = path.replace(channel, "")
rss_url = '[RSS](https://www.youtube.com/feeds/videos.xml?channel_id=' + id_channel + ')'
return rss_url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment