作为Android应用程序的一部分,我正在尝试将URL的HTML代码读取为字符串。当我使用“ https://www.google.com”时,这一切都可以正常工作,但是当我使用网站时,我想从“ https://bmorgan17.github.io/DCD/resources/data_raw.html”中获取数据。
from lxml import etree
context = etree.parse('transactions.xml').getroot()
total_amount = 0
for transaction in context.findall('Transaction'):
category = transaction.find('category')
amount = transaction.find('amount')
if category and category == 'income' and amount:
total_amount += int(amount.text)
这是我的代码:
Error: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x5c959090: Failure in SSL library, usually a protocol error
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x59282c38:0x00000000)
}
如果有人可以帮助我,那就太好了!
编辑:
我将其用作测试电话,因为它比仿真器快得多。 如果我需要为更新的手机制作模拟器,请告诉我。