| skipped 9 lines |
10 | 10 | | import ssl |
11 | 11 | | import sys |
12 | 12 | | import tqdm |
| 13 | + | import random |
13 | 14 | | from typing import Tuple, Optional, Dict, List |
14 | 15 | | from urllib.parse import quote |
15 | 16 | | |
| skipped 404 lines |
420 | 421 | | |
421 | 422 | | if "url" not in site.__dict__: |
422 | 423 | | logger.error("No URL for site %s", site.name) |
423 | | - | |
| 424 | + | if hasattr(site, "mirrors"): |
| 425 | + | results_site["url_main"] = random.choice(site.mirrors) |
424 | 426 | | # URL of user on site (if it exists) |
425 | 427 | | url = site.url.format( |
426 | 428 | | urlMain=site.url_main, urlSubpath=site.url_subpath, username=quote(username) |
| skipped 469 lines |