mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Adding support for subscribing to Mastodon usernames (newsblur@mastodon.social for instance).
This commit is contained in:
parent
b2bf1a66cc
commit
5aa06c393f
1 changed files with 4 additions and 0 deletions
|
@ -454,6 +454,10 @@ class Feed(models.Model):
|
|||
without_rss = True
|
||||
if url and re.match(r'(https?://)?(www\.)?facebook.com/\w+/?$', url):
|
||||
without_rss = True
|
||||
# Turn url @username@domain.com into domain.com/users/username.rss
|
||||
if url and url.startswith('@') and '@' in url[1:]:
|
||||
username, domain = url[1:].split('@')
|
||||
url = f"https://{domain}/users/{username}.rss"
|
||||
if url and 'youtube.com/user/' in url:
|
||||
username = re.search('youtube.com/user/(\w+)', url).group(1)
|
||||
url = "http://gdata.youtube.com/feeds/base/users/%s/uploads" % username
|
||||
|
|
Loading…
Add table
Reference in a new issue