Advertisement
Guest User

python-pseudo code

a guest
Jan 29th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. # json being parsed with:
  2. chaordic = json.loads(response.xpath('//script[contains(.,"window.chaordic_meta")]/text()').extract()[0].strip().split('=', 1)[1].replace("'",'"').replace('new Date()','0'))
  3. # then tried those forms to get the image url.
  4. # they all return [u'http://images.marisa.com.br/323220pd.jpg'] instead of u'http://images.marisa.com.br/323220pd.jpg'
  5. item['image'] = chaordic.images['1390X1431']
  6. item['image'] = chaordic.images['1390X1431'].pop(0)
  7. item['image'] = getattr(chaordic.images, '1390X1431')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement