خرید بک لینک

Vote count: 0

I have used beautiful soup to scrap data from a live web page.I have a variable price which is in "$" and i want to extract only the integer part of it.So i have used regular expression as follows :

    price = soup.find('span',{"class":"price"})
    prices =re.search(r'[d{1,}]+', price.text.strip()).group()

The problem is, the prices is a string and when i use int(prices) it gives an error as follows:

asked 57 secs ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 2 ارديبهشت 1395 ساعت: 1:15

صفحه بندی