Skip to content

Commit

Permalink
Fix support for old channel names
Browse files Browse the repository at this point in the history
also reduce crawl time
  • Loading branch information
naveen521kk committed Jul 31, 2023
1 parent b543cbc commit b526f35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
load_dotenv()


CRAWL_DELAY = 1
CRAWL_DELAY = 0.5
SECONDS_IN_HOUR = 60 * 60
SECONDS_IN_DAY = 24 * 60 * 60
UPDATE_INTERVAL = 4 * 60 * 60 # Run every 4 hours
Expand Down
6 changes: 6 additions & 0 deletions updator/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ def scrape_rss_feeds():
channel_ids.extend(
re.findall(r"(?<=https://www\.youtube\.com/channel/)[0-9a-zA-Z_-]+", content)
)

# old custom channel names with /c/
channel_custom_names.extend(
re.findall(r"(?<=https:\/\/www\.youtube\.com\/)c\/[0-9a-zA-Z_-]+", content)
)

# add new @ based channel id
channel_custom_names.extend(
re.findall(r"(?<=https:\/\/www\.youtube\.com\/)@[\.0-9a-zA-Z_-]+", content)
Expand Down

1 comment on commit b526f35

@vercel
Copy link

@vercel vercel bot commented on b526f35 Jul 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

manim-website-api – ./

manim-website-api-git-main-manim.vercel.app
manim-website-api.vercel.app
manim-website-api-manim.vercel.app

Please sign in to comment.