3

私はサイトをたくさん検索してきましたが、本当に必要なものを見つけることができませんでした. データを含む web.warc.gz ファイルがあり、WARC ヘッダーを抽出する必要があります。Tomcat と Wayback (1.6) をインストールして、Wayback が提供する ./warc-header スクリプトを使用してそれを取得しようとしましたが、使用している形式のエラー メッセージが表示され続けます。

Sergeis-MacBook-Pro:bin sergeipashuev$ ./warc-header ~/Desktop/WEB.WARC.gz \r\n\ 
~/Desktop/output.csv type \r\n
      USAGE: tgtWarc fieldsSrc id
        tgtWarc is the path to the target WARC.gz
          fieldsSrc is the path to the text of the record
    make sure each line is terminated by \r\n
    and that the file ends with a blank, \r\n terminiated line
id is the XXX in:
    Content-Description: Made from XXX by org.archive.wayback.util.WARCHeader
    of the header record... header... 

または別のタイプのエラー:

   Sergeis-MacBook-Pro:bin sergeipashuev$ ./warc-header ~/Desktop/WEB.WARC.gz 
    ~/Desktop/output.csv Content-Type
    java.io.IOException: End-Of-Stream before \r\n\r\n End-Of-ANVLRecord:

at org.archive.util.anvl.ANVLRecord.load(ANVLRecord.java:163)
at org.archive.wayback.util.WARCHeader.writeHeaderRecord(WARCHeader.java:43)
at org.archive.wayback.util.WARCHeader.main(WARCHeader.java:75)

コマンドラインで書いているフォーマットだと確信していますが、まだ正しくできません。助けてください?

4

1 に答える 1

1

以下の github プロジェクト コードを使用して取得できます。

https://github.com/Smerity/cc-warc-examples/blob/master/src/org/commoncrawl/examples/S3ReaderTest.java

于 2015-04-02T11:23:31.140 に答える