Created
September 20, 2022 11:50
-
-
Save peterbe/d23051a2b099cfd26df278a13d7b5469 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from urllib.parse import urlencode | |
import requests | |
langs = ('en', 'cn', 'es', 'ja', 'pt') | |
versions = ('dotcom', 'ghec', '3.6', '3.5', '3.3', '3.4', '3.2', 'ghae') | |
for lang in langs: | |
for version in versions: | |
url = 'http://localhost:4000/search?' + urlencode({ | |
'language': lang, | |
'version': version, | |
'query': 'github' | |
}) | |
r = requests.get(url) | |
r.raise_for_status() | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment