diff --git a/src/extractors/lbry.py b/src/extractors/lbry.py
index f5367e8..505f85c 100644
--- a/src/extractors/lbry.py
+++ b/src/extractors/lbry.py
@@ -25,7 +25,24 @@ def extract_from_url (url, verbosity):
if len(username) > 0 and username[0] == "@":
return domain + "/$/rss/" + username
+def extract_from_page (page, verbosity):
+ # for example, https://odysee.com/the-ultimate-guide-to-using-matrix!:4d33438b778316b59aa174264d9eb3ec347fed53
+ # is canonically https://odysee.com/@techlore:3/the-ultimate-guide-to-using-matrix!#4
+ canonical_url = search (page, '')
+ if canonical_url is None:
+ canonical_url = search (page, '')
+
+ if not canonical_url is None:
+ return extract_from_url (canonical_url, verbosity)
+
def extract (url, page=None, network=False, verbosity=3, args={}):
feed = extract_from_url (url, verbosity)
if not feed is None:
return feed
+ else:
+ notify ("Unable to get feed from URL alone", verbosity, platform)
+ if network:
+ page = download (platform, url, args, verbosity)
+ feed = extract_from_page (page, verbosity)
+ if not feed is None:
+ return feed
diff --git a/tests/lbry.txt b/tests/lbry.txt
index c701858..feab1fc 100644
--- a/tests/lbry.txt
+++ b/tests/lbry.txt
@@ -2,10 +2,13 @@
https://odysee.com/@techlore:3 https://odysee.com/$/rss/@techlore:3
https://odysee.com/@Coldfusion:f https://odysee.com/$/rss/@Coldfusion:f
-# video page
+# video page with channel in URL
https://odysee.com/@techlore:3/the-dark-side-of-discord-(and-best:5 https://odysee.com/$/rss/@techlore:3
https://odysee.com/@Coldfusion:f/exploring-ai-generated-music:f https://odysee.com/$/rss/@Coldfusion:f
+# video page without channel in URL
+https://odysee.com/the-ultimate-guide-to-using-matrix!:4d33438b778316b59aa174264d9eb3ec347fed53 https://odysee.com/$/rss/@techlore:3
+
# TODO: playlist pages
# note: While odysee has a "playlists" tab for channels, I didn't see any
# evidence (on 2021-09-22) that playlists are an actual thing that exists.