diff --git a/tools/update-prizes-list.py b/tools/update-prizes-list.py index 902fcb9..ebec95b 100644 --- a/tools/update-prizes-list.py +++ b/tools/update-prizes-list.py @@ -34,19 +34,11 @@ def _limited_is_prize_domain(domain): 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0' } - # All these domains have a "Under construction" text on the main page, let's use that for fingerprinting - text_page = requests.get('http://%s/' % domain, headers=headers).text + # Prize domains have "Under construction" text on the main page, so let's use that for fingerprinting + # They can emit a redirect in JS if passed the given arguments + resp = requests.get('http://%s/?u=tqck80z&o=zdqr96x&t=DESKuniqANDsearch' % domain, headers=headers).text - if 'Under construction' not in text_page: - return False - - # They emit a redirect in JS if passed these arguments - text_page = requests.get('http://%s/?u=tqck80z&o=zdqr96x&t=DESKuniqANDsearch' % domain, headers=headers, timeout=3).text - - if 'redirDomain' not in text_page: - return False - - return True + return 'under construction' in resp.lower() or 'redirDomain' in resp def is_prize_domain(domain): try: