Python 播放空响应
我正在用python运行一些基本代码。 我在用刮板游戏 当启动命令print(play_scraper.details('com.android.chrome')时,我返回Python 播放空响应,python,Python,我正在用python运行一些基本代码。 我在用刮板游戏 当启动命令print(play_scraper.details('com.android.chrome')时,我返回 AttributeError: 'NoneType' object has no attribute 'select' 我已尝试调试该问题,但问题似乎返回了一个空列表: section_titles_divs = [x for x in soup.select('div.hAyfc div.BgcNfc')] 直到几周前
AttributeError: 'NoneType' object has no attribute 'select'
我已尝试调试该问题,但问题似乎返回了一个空列表:
section_titles_divs = [x for x in soup.select('div.hAyfc div.BgcNfc')]
直到几周前,我还收到了这样的消息:
{
'app_id': 'com.android.chrome',
'category': ['COMMUNICATION'],
'content_rating': ['Everyone'],
'current_version': 'Varies with device',
'description': 'Google Chrome is a fast, easy to use, and secure web browser. Designed for Android, Chrome brings you personalized news ...',
'description_html': 'Google Chrome is a fast, easy to ... Chrome web browser experience you love across all your devices.<br/> <br/> <b>Browse fast and type less.</b> ...',
'developer': 'Google LLC',
'developer_address': '1600 Amphitheatre Parkway, Mountain View 94043',
'developer_email': 'apps-help@google.com',
'developer_id': '5700313618786177705',
'developer_url': 'http://www.google.com/chrome/android',
'editors_choice': False,
'free': True,
'histogram': { 1: 672180, 2: 288519, 3: 735220, 4: 1560066, 5: 6033423},
'iap': False,
'iap_range': None,
'icon': 'https://lh3.googleusercontent.com/nYhPnY2I-e9rpqnid9u9aAODz4C04OycEGxqHG5vxFnA35OGmLMrrUmhM9eaHKJ7liB-',
'installs': '1,000,000,000+',
'interactive_elements': ['Unrestricted Internet'],
'price': '0',
'recent_changes': u"Thanks for choosing Chrome! You can now find your saved passwords more easily \u2013 just tap the new Search icon in Settings > Passwords. We've also included stability and performance improvements.",
'required_android_version': 'Varies with device',
'reviews': 9289408,
'score': '4.3',
'screenshots': [ 'https://lh3.googleusercontent.com/lKPDNfsO2QhJD9i77rGDTiH5ILjXlXwPsRi194hhkY4BsbaXbpCFrdjWvcU1zttUwqXz=w720-h310-rw', ...],
'size': 'Varies with device',
'title': 'Google Chrome: Fast & Secure',
'updated': 'May 10, 2018',
'url': 'https://play.google.com/store/apps/details?id=com.android.chrome',
'video': None
}
{
“app_id”:“com.android.chrome”,
“类别”:[“通信”],
“内容分级”:[“每个人”],
“当前版本”:“因设备而异”,
“描述”:“谷歌Chrome是一款快速、易用且安全的网络浏览器。专为Android设计,Chrome为您带来个性化新闻…”,
'description_html':'Google Chrome是一款快速、易于…的Chrome网络浏览器,您可以在所有设备上享受它。
,
“开发者”:“谷歌有限责任公司”,
“开发商地址”:“1600圆形剧场公园路,山景94043”,
“开发者电子邮件”:“应用程序”-help@google.com',
“开发者id”:“5700313618786177705”,
“开发者url”:http://www.google.com/chrome/android',
“编辑选择”:错误,
“自由”:对,
‘直方图’:{1:672180,2:288519,3:735220,4:156066,5:6033423},
“iap”:错误,
“iap_范围”:无,
'图标':'https://lh3.googleusercontent.com/nYhPnY2I-e9rpqnid9u9aAODz4C04OycEGxqHG5vxFnA35OGmLMrrUmhM9eaHKJ7liB-',
“安装”:“100000000+”,
“互动元素”:[“不受限制的互联网”],
“价格”:“0”,
“最近的更改”:u“感谢您选择Chrome!现在您可以更轻松地找到保存的密码\u2013只需点击设置>密码中的新搜索图标。我们还包括稳定性和性能改进。”,
“必需的android版本”:“因设备而异”,
“评论”:9289408,
“分数”:4.3分,
'截图':['https://lh3.googleusercontent.com/lKPDNfsO2QhJD9i77rGDTiH5ILjXlXwPsRi194hhkY4BsbaXbpCFrdjWvcU1zttUwqXz=w720-h310 rw',…],
“大小”:“因设备而异”,
“标题”:“谷歌浏览器:快速安全”,
“更新”:2018年5月10日,
“url”:”https://play.google.com/store/apps/details?id=com.android.chrome',
“视频”:无
}
谢谢你的帮助 今天早上我也遇到了类似的问题。我在UTIL中更改了: 附加信息数据=解析附加信息(soup.select一('.IxB2fe')) 到 附加信息数据=解析附加信息(soup.select一('div.IxB2fe')) 页面正在向上述选择器加载两个引用,第一个结果不正确。我假设过去只有一个比赛结果
希望这有帮助!我今天早上玩得很开心,这是肯定的。我今天早上也有类似的问题。我在UTIL中更改了: 附加信息数据=解析附加信息(soup.select一('.IxB2fe')) 到 附加信息数据=解析附加信息(soup.select一('div.IxB2fe')) 页面正在向上述选择器加载两个引用,第一个结果不正确。我假设过去只有一个比赛结果
希望这有帮助!今天早上我玩得很开心,这是肯定的。您的代码应该处理空列表吗?您的代码是否调用
select
方法?如果是,请包含该代码。您的代码是否应处理空列表?您的代码是否调用select
方法?如果是,请包括该代码。