web-scraping - 如何使用 ImportXML 公式或类似公式将 CSV 数据从网站导入谷歌表格?
问题描述
我之前从网站 socialblade.com 使用=IMPORTXML(J1,"//*[@id='afd-header-views-30d']")
. 但是现在我想为过去一个月的浏览量导入一串数字,我不知道如何,这是网站的源代码的样子:
<div id="AverageViewsPerMonth" style = "width: 860px; height: 160px; padding-top: 10px;"></div>
<script type="text/javascript">
g = new Dygraph(
// containing div
document.getElementById('AverageViewsPerMonth'),
// CSV or path to a CSV file.
"Date,Monthly Views\n" + "2016-10-1,6338035\n" + "2016-11-1,3005749\n" + "2016-12-1,2951816\n" + "2017-01-1,3185303\n" + "2017-02-1,3849745\n" + , {
title: 'Total Views Per Month for Peaceful Cuisine ',
这是任何人都可以编辑的 Google 电子表格:
https://docs.google.com/spreadsheets/d/1DjZbiUy6P2L2i2INoN1c0tAZsAeCBmM3-PSXp9E0JFw/edit?usp=sharing
如果有人能告诉我如何使用这样的社交刀片链接示例,我将不胜感激:
解决方案
推荐阅读
- python - 删除多余的管道“|” 附加文件后在 CSV 中
- python - OutOfBoundsDatetime:越界纳秒时间戳:203-02-19 00:00:00
- python - 在 python seaborn 中可视化矩阵
- windows-10 - Windows 10 快速访问链接删除了右键单击选项
- raspberry-pi4 - 覆盆子上的 Sim800l
- powershell - 通过 powershell 远程控制注册表路径
- git - Intellij Idea 取消“撤消提交”
- frame - 创建一个只有匹配数字的数据名声
- django-rest-framework - 导入 allauth 视图会导致运行时错误:django.contrib.sites.models.Site 未声明显式 app_label
- python - 一旦在同一页面上不断刷新,链接就不会在新选项卡中打开,并且在脚本运行后