Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tomatolichy committed Sep 21, 2018
1 parent 9a7dc19 commit 956ce73
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions scraper.py
Expand Up @@ -2,14 +2,27 @@
# including some code snippets below that you should find helpful

import scraperwiki
import lxml.html
#import lxml.html
from lxml import html
#


# # Read in a page
html = scraperwiki.scrape("https://uk.webuy.com/product-detail/?id=sssdtosxg51tbpci")
#

product_id = "sssdtosxg51tbpci"
product_name = "Toshiba XG5"

cexurl = "https://uk.webuy.com/product-detail/?id="

#html = scraperwiki.scrape("https://uk.webuy.com/product-detail/?id=sssdtosxg51tbpci")

url = "https://uk.webuy.com/product-detail/?id=sssdtosxg51tbpc"
doc_text = scraperwiki.scrape(url)
doc = html.fromstring(doc_text)

# # Find something on the page using css selectors


root = lxml.html.fromstring(html)
root.cssselect("<span style="line-height: 17px !important; margin: 1px 1px 3px;")
#
Expand Down

0 comments on commit 956ce73

Please sign in to comment.