小编use*_*478的帖子

Python - Web Scraping HTML table and printing to CSV

I'm pretty much brand new to Python, but I'm looking to build a webscraping tool that will rip data from an HTML table online and print it into a CSV in the same format.

Here's a sample of the HTML table (it's enormous, so I'm going to provide only a few rows).

<div class="col-xs-12 tab-content">
        <div id="historical-data" class="tab-pane active">
          <div class="tab-header">
            <h2 class="pull-left bottom-margin-2x">Historical data for Bitcoin</h2>

            <div class="clear"></div>

            <div class="row">
              <div class="col-md-12">
                <div class="pull-left">
                  <small>Currency in USD</small>
                </div>
                <div …
Run Code Online (Sandbox Code Playgroud)

html python csv beautifulsoup web-scraping

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

beautifulsoup ×1

csv ×1

html ×1

python ×1

web-scraping ×1