用Python / BS4刮表(Scraping Table With Python/BS4)
我试图从http://www.pro-football-reference.com/boxscores/201602070den.htm用BS4和Python 2.7抓取“Team Stats”表。 但是我无法靠近它,
url = 'http://www.pro-football-reference.com/boxscores/201602070den.htm' page = requests.get(url) soup = BeautifulSoup(page.text, "html5lib") table=soup.findAll('table', {'id':"team_stats", "class":"stats_table"}) print table
我认为像上面的代码可以工作,但没有运气。
Im trying to scrape the "Team Stats" table from http://www.pro-football-reference.com/boxscores/201602070den.htm with BS4 and Python 2.7. However Im unable to get anywhere close to it,
url = 'http://www.pro-football-reference.com/boxscores/201602070den.htm' page = requests.get(url) soup = BeautifulSoup(page.text, "html5lib") table=soup.findAll('table', {'id':"team_stats", "class":"stats_table"}) print table
I thought something like the above code would work but no luck.
原文:https://stackoverflow.com/questions/38575120
最满意答案
Forge 设计自动化 API可能有助于这种情况,您可以使用Autodesk产品的云引擎(如AutoCAD,Revit,Inventor等)来读取文件详细信息。 你需要做的是编写一些小插件来读取存储在文件中的软件版本。
此外,您还可以使用一些第三方工具来归档相同的目标:
- RVT文件实际上是一个OLE文档,您可以使用
OLE library for .NET
来读取RVT内的软件版本,请查看Jeremy的这个博客Basic File Info和RVT File Version 。- DWG可以作为文本文件读取,您可以使用正则表达式来提取版本号,请参阅此处 。
Forge Design Automation APIs might help this case, you can use cloud engines of Autodesk product (such as AutoCAD, Revit, Inventor, etc.) to read file details. What you have to do is writing some tiny add-ins to read software version stored in the file.
Besides, you can use some third-party tools to archive the same goal as well:
- RVT file is actually an OLE document, you can use
OLE library for .NET
to read software version inside RVT, please check this blog Basic File Info and RVT File Version from Jeremy.- The DWG can be read as a text file, you can use the regular expression to extract the version number out, please refer here.
相关问答
更多-
不知何故,当安装服务器时,它没有安装nginx,所有必要的东西。 在Forge中列出了已安装的内容,但显然缺少了。 所以我决定销毁它并安装新的服务器。 新的工作应该是这样的。 Somehow when server was installed it did not install nginx, and all what was necessary. In Forge was listed what was installed and that was clearly missing. So I decide ...
-
我还有一个使用Forge NPM的教程来完成创建存储桶以上传文件并翻译它的整个过程。 我认为你遇到问题的部分是上传部分 检查这个https://github.com/jaimerosales/modelderivative-nodejs-tutorial/blob/master/uploader.js#L145 I have also a tutorial using the Forge NPM to do the whole process of creating bucket to upload fil ...
-
Forge 设计自动化 API可能有助于这种情况,您可以使用Autodesk产品的云引擎(如AutoCAD,Revit,Inventor等)来读取文件详细信息。 你需要做的是编写一些小插件来读取存储在文件中的软件版本。 此外,您还可以使用一些第三方工具来归档相同的目标: RVT文件实际上是一个OLE文档,您可以使用OLE library for .NET来读取RVT内的软件版本,请查看Jeremy的这个博客Basic File Info和RVT File Version 。 DWG可以作为文本文件读取,您可 ...
-
Codeigniter 3 - 如何使用Forge Class创建数据库模式?(Codeigniter 3 - How to use Forge Class to create a database schema?)[2022-01-31]
在尝试并获得很多意见之后,唯一的方法就是我评论道: 从自动加载器中删除数据库; 使用多个数据库,默认的数据库是相同的,但创建第二个具有空数据库名称的数据库; 对Forge类使用第二个数据库而不是默认值,仅用于创建数据库和表; 手动更改默认数据库并在此之后使用。 After try and get a lot of opinions, the only way is as I commented: Remove database from autoloader; Use multiple databases, ... -
好的,我可以收集... 新创建的节点(您的屏幕截图顶部有两个节点)默认情况下未连接任何内容。 看起来预览是使用这些不连接的节点,而不是你的新节点,我不确定这里是什么。 这可能是一个错误。 尝试删除坏节点(全部四个)并重新创建它们。 尝试更新Shader Forge。 (我不能重现这种行为) 你的法线贴图可能不是一个有效的法线贴图 ,因此它的(几乎完美)纯色没有任何真正的功能 : 右边是你自己的凹凸纹理的近似值,左边是用作所述纹理的平均值的纯色。 与真正的凹凸贴图相比: Slider值并不真正“更新”着色器( ...
-
我正在运行和较早版本的eclipse和Jboss工具插件。 更新后,它按照预期的方式工作。 I was running and older version of eclipse and the Jboss tool plugin. After updating it works as aspected.
-
在forge run android命令期间创建了一个APK,但在设备上安装后会立即删除它; 如果您需要创建一个APK以供在其他地方使用或上传到Google Play,请参阅forge package android 。 http://docs.trigger.io/en/v1.3/releasing.html#android An APK is created during the forge run android command, but it's deleted immediately after ...
-
试试最新的1.6.4版本。 Minecraft改变了他们的资源和图书馆的位置,因此Forge现在正在寻找错误的地方。 最后的1.6.4使用旧的安装系统,但是如果你愿意,你可以使用第二个到最后的1.6.4版本来尝试名为ForgeGradle的新构建系统。 这是一个好主意,因为这是1.7+的唯一方法。 祝你好运! (PS如果你想坚持1.6.2,你可以从1.6.4脚本中抢夺新的位置) Try the latest 1.6.4 version. Minecraft changed the location of t ...
-
你需要为你的桶提出一个独特的名字,对于那个坏消息抱歉。 你的想法并不糟糕。 例如,只需将您的client_id添加到存储桶名称即可: "test-tAp1fqjjtcgqS4CKpCYDjAyNbKW4IVCC" 或者使用代码生成的随机guid: function guid() { var d = new Date().getTime(); var guid = 'xxxx-xxxx-xxxx'.replace( /[xy]/g, function (c) { ...
-
从版本2.9开始,这仍然有效。 这是我的控制台: 您可以尝试以下几种方法: viewer未定义吗? 抓住viewer时,你是否在正确的范围内? 在获取实例树之前,必须先加载该文档。 加载文档时,将触发名为Autodesk.Viewing.GEOMETRY_LOADED_EVENT的事件,然后您可以开始操作实例树。 只需这样做: viewer.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT, function () { var instanceT ...