sxiii icon

AliExpress Price Parsing with Python

sxiii | PRO | 03/25/17 02:42:26 AM UTC | 0 ⭐ | 859 👁️ | Never ⏰ | []
Python |

440 B

|

None

|

0 👍

/

0 👎

# Python program to grab AliExpress price of an item.
# Written by SecurityXIII on 25.03.2017
 
import urllib
from lxml.html import fromstring
 
url = 'https://ru.aliexpress.com/item/6-12Colors-Non-toxic-Crayon-edible-baby-drawing-Supplies-ring-toy-Easy-to-erase-educational-toys/32753968959.html'
id = 'j-sku-discount-price'
 
content = urllib.urlopen(url).read()
doc = fromstring(content)
print doc.get_element_by_id(id).text_content()

Comments