浏览代码

show dots as progress bar for titles fetching

Nick Sweeting 6 年之前
父节点
当前提交
1ca27a60b2
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      archivebox/util.py

+ 1 - 0
archivebox/util.py

@@ -234,6 +234,7 @@ def fetch_page_title(url, default=True):
 
 
     try:
     try:
         sys.stdout.write('.')
         sys.stdout.write('.')
+        sys.stdout.flush()
         html_content = urllib.request.urlopen(url, timeout=10).read().decode('utf-8')
         html_content = urllib.request.urlopen(url, timeout=10).read().decode('utf-8')
         match = re.search('<title>(.*?)</title>', html_content)
         match = re.search('<title>(.*?)</title>', html_content)
         return match.group(1) if match else default or None
         return match.group(1) if match else default or None