test
This commit is contained in:
parent
aae8db0bbd
commit
a839e3e361
@ -20,7 +20,7 @@ def fetch_string():
|
|||||||
content_url = 'http://developerexcuses.com'
|
content_url = 'http://developerexcuses.com'
|
||||||
response = requests.get(content_url)
|
response = requests.get(content_url)
|
||||||
tree = html.fromstring(response.content)
|
tree = html.fromstring(response.content)
|
||||||
title_elem = tree.xpath('/html/body/div[1]/center/a')
|
title_elem = tree.xpath('/html/body/div[1]/center/a')[0].text
|
||||||
fetched_str = str(title_elem)
|
fetched_str = str(title_elem)
|
||||||
return fetched_str
|
return fetched_str
|
||||||
# .wrapper > center:nth-child(1) > a:nth-child(1)
|
# .wrapper > center:nth-child(1) > a:nth-child(1)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user