test
This commit is contained in:
parent
57aa0cfa92
commit
fb68567ba0
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
import requests
|
import requests
|
||||||
import lxml
|
from lxml import html
|
||||||
|
|
||||||
from sopel import plugin
|
from sopel import plugin
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ def upper(bot, trigger, comrun):
|
|||||||
def fetch_string():
|
def fetch_string():
|
||||||
content_url = 'http://developerexcuses.com'
|
content_url = 'http://developerexcuses.com'
|
||||||
response = requests.get(content_url)
|
response = requests.get(content_url)
|
||||||
tree = lxml.html.fromstring(response.text)
|
tree = html.fromstring(response.content)
|
||||||
title_elem = tree.xpath('/html/body/div[1]/center/a')[0]
|
title_elem = tree.xpath('/html/body/div[1]/center/a')[0]
|
||||||
fetched_str = str(title_elem)
|
fetched_str = str(title_elem)
|
||||||
return fetched_str
|
return fetched_str
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user