This file contains hidden or 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
from tqdm import tqdm | |
import requests, grequests | |
class ProgressSession(): | |
def __init__(self, urls): | |
self.pbar = tqdm(total = len(urls), desc = 'Making async requests') | |
self.urls = urls | |
def update(self, r, *args, **kwargs): | |
if not r.is_redirect: | |
self.pbar.update() |