瀏覽代碼

Avoid 429 (rate limit) errors in awesome_bot (#164)

* Allow 429 (rate limit) errors in awesome_bot

It seems we're pretty consistently getting these from github projects, so I assume we're hitting their rate-limit.

It'd be nice if awesome_bot had some kind of internal rate limit, but the docs don't show anything, and it seems like vast majority of projects running it just allow 429s, like I have here.

Not stoked about it, but c'est la vie

* Switch tools to parse subsections to fix API build

* Apply a request delay instead of allowing 429s in awesome_bot
Haydn Greatnews 3 年之前
父節點
當前提交
44d21aef14
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      .github/api.py
  2. 1 1
      .github/workflows/main.yml

+ 1 - 1
.github/api.py

@@ -60,7 +60,7 @@ def cut_section(start):
 def parse_readme(readme):
     return {
         'apps': parse_subsections(cut_section('Apps')),
-        'tools': parse_section(cut_section('Tools')),
+        'tools': parse_subsections(cut_section('Tools')),
         'resources': parse_subsections(cut_section('Resources')),
         'sites': parse_section(cut_section('Open-source sites')),
         'metadata': {

+ 1 - 1
.github/workflows/main.yml

@@ -13,7 +13,7 @@ jobs:
       with:
         ruby-version: '2.x'
     - run: gem install awesome_bot
-    - run: awesome_bot README.md --allow-redirect --allow-dupe --allow-ssl
+    - run: awesome_bot README.md --request-delay 0.1 --allow-redirect --allow-dupe --allow-ssl
     - uses: actions/setup-python@v1
       with:
         python-version: '3.x'