如何获取INR符号,如图所示,在pycharm中使用BeautifulSoup库?

时间:2017-05-23 16:52:41

标签: python beautifulsoup pycharm html-parsing element

enter image description here

我的代码是:

import requests
from bs4 import BeautifulSoup
request = requests.get("http://www.amazon.in/Yunique-Plus-YU4711-2GB-RAM-Black/dp/B01HMNHNP2")
content = request.content
soup= BeautifulSoup(content,"html.parser")
element= soup.find("span",{"class": "a-color-price"})
print(element.text.strip())

如何修改以打印:( INR符号)6,199.00而不是仅:6,199.00

0 个答案:

没有答案