import.io エクストラクタに接続してデータを取得しようとしています。次に、データを MySQL データベースにインポートしようとしています。http://support.import.io/knowledgebase/articles/511605-extractor-to-sql-databaseの例に従っていますが、何らかの理由でデータベースにデータを取得できません。これを解決するための助けは非常に役に立ちます。以下に追加情報を示します。
以下は、チュートリアルにあるコマンドを実行したときの出力で、個人的な使用のために少し変更されています。
./importSQL.py
CONFIG FOUND, YAY!
{u'username': u'dmhumph_dmhumph', u'database': u'dmhumph_WATERFOWLGEARFINDER', u'inputUrl': u'https://www.rogerssportinggoods.com/decoys/avery-greenhead-gear-decoys/full-body-goose.html', u'mapping': {u'product_name/_text': u'product_name', u'image/_alt': u'product_name2', u'image': u'image', u'availability': u'availability', u'price': u'price', u'product_name/_title': u'product_name3', u'product_name': u'link'}, u'host': u'localhost', u'table': u'FullBodyGeese', u'ioAPIKey': u'<API-Key-Here>', u'password': u'<Password-Here>', u'sourceUUID': u'<Source-UUID-Here>', u'port': 3306, u'ioUserID': u'<IO-User-ID-Here>'}
Recieved 1 rows of data
product_name, product_name2, image, availability, price, product_name3, link
Mappings: {u'product_name/_text': u'product_name', u'image/_alt': u'product_name2', u'image': u'image', u'availability': u'availability', u'price': u'price', u'product_name/_title': u'product_name3', u'product_name': u'link'}
以下は、外に出て同じ抽出プログラムからデータを取得し、ファイルにダンプしたときに返されるデータのサンプルです。
stdClass Object
(
[offset] => 0
[results] => Array
(
[0] => stdClass Object
(
[product_name/_text] => Avery GHG Tim Newbold Lesser Canadas Sleeper 4 Pack
[image] => https://www.rogerssportinggoods.com/media/catalog/product/cache/1/small_image/210x/9df78eab33525d08d6e5fb8d27136e95/A/V/AV-72322-550.png
[price] => Regular Price: $99.99 Special Price $44.99
[availability] => Out of stock
[image/_alt] => Avery GHG Tim Newbold Lesser Canadas Sleeper 4 Pack
[product_name] => https://www.rogerssportinggoods.com/decoys/avery-greenhead-gear-decoys/full-body-goose/avery-ghg-tim-newbold-lesser-canadas-sleeper-4-pack.html
[product_name/_title] => Avery GHG Tim Newbold Lesser Canadas Sleeper 4 Pack
)
[1] => stdClass Object
(
[product_name/_text] => Avery GHG 72302 Tim Newbold Fully Flocked Lesser Canadas Sleepers
[image] => https://www.rogerssportinggoods.com/media/catalog/product/cache/1/small_image/210x/9df78eab33525d08d6e5fb8d27136e95/A/V/AV-72302-550.png
[price] => Regular Price: $129.99 Special Price $69.99
[availability] => Out of stock
[image/_alt] => Avery GHG 72302 Tim Newbold Fully Flocked Lesser Canadas Sleepers
[product_name] => https://www.rogerssportinggoods.com/decoys/avery-greenhead-gear-decoys/full-body-goose/avery-ghg-tim-newbold-fully-flocked-lesser-canadas-sleepers.html
[product_name/_title] => Avery GHG 72302 Tim Newbold Fully Flocked Lesser Canadas Sleepers
)
[2] => stdClass Object
(
[product_name/_text] => Greenhead Gear Pro Grade Series Full Body Canada Goose Decoys
[image] => https://www.rogerssportinggoods.com/media/catalog/product/cache/1/small_image/210x/9df78eab33525d08d6e5fb8d27136e95/A/V/AV-71446-500.png
[price] => Regular Price: $139.99 Special Price $89.99
[availability] => Out of stock
[image/_alt] => Greenhead Gear Pro Grade Series Full Body Canada Goose Decoys
[product_name] => https://www.rogerssportinggoods.com/decoys/avery-greenhead-gear-decoys/full-body-goose/greenhead-gear-pro-grade-series-full-body-canada-goose-decoys.html
[product_name/_title] => Greenhead Gear Pro Grade Series Full Body Canada Goose Decoys
)
)
[cookies] => Array
(
[0] => frontend="q7jjmij9u3jlnh505vl2d1oa45";Path="/";Domain="www.rogerssportinggoods.com";Port="443"
[1] => CATEGORY_INFO="%5B%5D";Path="/";Domain="www.rogerssportinggoods.com";Port="443"
[2] => LAST_CATEGORY="70";Path="/";Domain="www.rogerssportinggoods.com";Port="443"
)
[connectorVersionGuid] => 44b6228b-c59c-47a0-8cbf-458fabe5d77d
[connectorGuid] => 4a60b47a-b973-4e51-8e15-47cf81fb1858
[pageUrl] => https://www.rogerssportinggoods.com/decoys/avery-greenhead-gear-decoys/full-body-goose.html
[outputProperties] => Array
(
[0] => stdClass Object
(
[name] => product_name
[type] => URL
)
[1] => stdClass Object
(
[name] => image
[type] => IMAGE
)
[2] => stdClass Object
(
[name] => price
[type] => STRING
)
[3] => stdClass Object
(
[name] => availability
[type] => STRING
)
)
)