We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cea32b6 commit 01e730dCopy full SHA for 01e730d
tests/test_examples.py
@@ -37,7 +37,12 @@ def titleName(row):
37
def country_population():
38
from lxml import etree
39
from urllib.request import urlopen
40
- page = urlopen('https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population').read()
+ for i in range(3):
41
+ try:
42
+ page = urlopen('https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population', timeout=30).read()
43
+ break
44
+ except:
45
+ pass
46
parser = etree.HTMLParser()
47
tree = etree.fromstring(page, parser=parser)
48
tables = tree.findall('.//table')
0 commit comments