相关文章推荐
小眼睛的热带鱼  ·  Python equivalent of ...·  3 月前    · 
俊逸的火锅  ·  Python 控制台 — Blender ...·  3 月前    · 
健身的抽屉  ·  在 Google Cloud 上使用 ...·  3 月前    · 
直爽的黑框眼镜  ·  Difference between ...·  3 月前    · 
深沉的便当  ·  GitHub | DevOps ...·  6 月前    · 
绅士的竹笋  ·  海悅聯名卡·  1 年前    · 
阳刚的烤地瓜  ·  Parsing dates in ...·  1 年前    · 
刚毅的酱牛肉  ·  java bufferedwriter ...·  2 年前    · 
{'asin': '0000037214', 'related': {'also_viewed': ['B00JO8II76', 'B00DGN4R1Q', 'B00E1YRI4C']}, 'title': 'Purple Sequin Tiny Dancer Tutu Ballet Dance Fairy Princess Costume Accessory', 'price': 6.99, 'salesRank': {'Clothing': 1233557}, 'imUrl': ' http://ecx.images-amazon.com/images/I/31mCncNuAZL.jpg ', 'brand': 'Big Dreams', 'categories': [['Clothing, Shoes & Jewelry', 'Girls'], ['Clothing, Shoes & Jewelry', 'Novelty, Costumes & More', 'Costumes & Accessories', 'More Accessories', 'Kids & Baby']]}
提取 'imUrl': ' http://ecx.images-amazon.com/images/I/31mCncNuAZL.jpg '这一项
...收起
对于你给的字符串,可以被看作一个字典,所以可以按照键值来提取imUrl的value值,也可以用正则表达式提取imUrl的value值. 两种方法我都写出来了,你看看吧,要用哪种方法,你自己决定.(因为回答问题不能出现链接,所以我把imUrl的value值改成了'imUrl链接',意思是一样的) 第一种方法 data={'asin': '0000037214', 'related': {'also_viewed': ['B00JO8II76', 'B00DGN4R1Q', 'B00E1YRI4C']}, 'title
...全文