Skip to content

Commit

Permalink
No Python buffering, remove old Travis deploy file, add timeout to VT…
Browse files Browse the repository at this point in the history
… requests
  • Loading branch information
m417z committed Oct 16, 2021
1 parent 13f70e0 commit 0ec86ea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install 'git+git://github.com/m417z/pymultitor.git' 'mitmproxy==6.*' orjson requests
- name: Run Periodic Update
- name: Run periodic update
run: |
cd data
python deploy.py
python -u deploy.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

8 changes: 7 additions & 1 deletion data/upd04_get_virustotal_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ def get_virustotal_data_for_file(session, file_hash, output_dir):
# Sorry...
'X-VT-Anti-Abuse-Header': base64.b64encode(f'{random.randint(10000000000, 20000000000)}-ZG9udCBiZSBldmls-{round(time.time(), 3)}'.encode()).decode(),
}
r = session.get(url, verify=False, headers=headers)

r = None
try:
r = session.get(url, verify=False, headers=headers, timeout=60*10)
except:
return 'retry'

if r.status_code == 429:
return 'retry'

Expand Down

0 comments on commit 0ec86ea

Please sign in to comment.