diff --git a/.gitignore b/.gitignore index ec8d0c28..98761495 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,6 @@ target # zookeeper /zookeeper/data + +cpuprofile +meory.pprof diff --git a/FE/webpack/webpack_v1/package.json b/FE/webpack/webpack_v1/package.json index 98c62dc2..d2297b5e 100644 --- a/FE/webpack/webpack_v1/package.json +++ b/FE/webpack/webpack_v1/package.json @@ -18,7 +18,7 @@ "extract-text-webpack-plugin": "^1.0.1", "file-loader": "^0.10.0", "imports-loader": "^0.7.0", - "jquery": "^3.1.1", + "jquery": "^3.4.0", "node-sass": "^4.3.0", "open-browser-webpack-plugin": "^0.0.3", "postcss-loader": "^1.2.2", diff --git a/FE/webpack/webpack_v1/yarn.lock b/FE/webpack/webpack_v1/yarn.lock index 64a5e6fa..d0eae26d 100644 --- a/FE/webpack/webpack_v1/yarn.lock +++ b/FE/webpack/webpack_v1/yarn.lock @@ -1,5 +1,7 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 + + abbrev@1: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" @@ -94,8 +96,10 @@ asap@~2.0.3: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + dependencies: + safer-buffer "~2.1.0" assert-plus@^0.2.0: version "0.2.0" @@ -680,6 +684,10 @@ balanced-match@^0.4.1, balanced-match@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + base64-js@^1.0.2: version "1.2.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" @@ -689,8 +697,8 @@ batch@0.5.3: resolved "https://registry.yarnpkg.com/batch/-/batch-0.5.3.tgz#3f3414f380321743bfc1042f9a83ff1d5824d464" bcrypt-pbkdf@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" dependencies: tweetnacl "^0.14.3" @@ -742,6 +750,13 @@ brace-expansion@^1.0.0: balanced-match "^0.4.1" concat-map "0.0.1" +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" @@ -1229,10 +1244,11 @@ domain-browser@^1.1.1: resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" dependencies: jsbn "~0.1.0" + safer-buffer "^2.1.0" ee-first@1.1.1: version "1.1.1" @@ -1516,9 +1532,9 @@ fstream-ignore@~1.0.5: inherits "2" minimatch "^3.0.0" -fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" +fstream@^1.0.0, fstream@^1.0.12, fstream@~1.0.10: + version "1.0.12" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045" dependencies: graceful-fs "^4.1.2" inherits "~2.0.0" @@ -1568,8 +1584,8 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" getpass@^0.1.1: - version "0.1.6" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" dependencies: assert-plus "^1.0.0" @@ -1597,6 +1613,17 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@~7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + globals@^9.0.0: version "9.14.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" @@ -1610,8 +1637,8 @@ globule@^1.0.0: minimatch "~3.0.2" graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + version "4.1.15" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" "graceful-readlink@>= 1.0.0": version "1.0.1" @@ -1767,7 +1794,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@2, inherits@2.0.3: +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -1920,7 +1947,7 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" -isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1945,15 +1972,9 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -jodid25519@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" - dependencies: - jsbn "~0.1.0" - -jquery: - version "3.1.1" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.1.1.tgz#347c1c21c7e004115e0a4da32cece041fad3c8a3" +jquery@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.0.tgz#8de513fa0fa4b2c7d2e48a530e26f0596936efdf" js-base64@^2.1.9: version "2.1.9" @@ -1985,8 +2006,8 @@ js-yaml@~3.6.1: esprima "^2.6.0" jsbn@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jsesc@^1.3.0: version "1.3.0" @@ -2050,7 +2071,7 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -loader-utils@^0.2.11, loader-utils@^0.2.15, loader-utils@^0.2.16, loader-utils@^0.2.3, loader-utils@^0.2.7, loader-utils@~0.2.2, loader-utils@~0.2.5, loader-utils@0.2.x: +loader-utils@0.2.x, loader-utils@^0.2.11, loader-utils@^0.2.15, loader-utils@^0.2.16, loader-utils@^0.2.3, loader-utils@^0.2.7, loader-utils@~0.2.2, loader-utils@~0.2.5: version "0.2.16" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d" dependencies: @@ -2276,20 +2297,30 @@ mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.13, mime-types@~2.1.7: dependencies: mime-db "~1.26.0" -mime@^1.3.4, mime@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" - mime@1.2.x: version "1.2.11" resolved "https://registry.yarnpkg.com/mime/-/mime-1.2.11.tgz#58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10" +mime@1.3.4, mime@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" + minimatch@^3.0.0, minimatch@^3.0.2, minimatch@~3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: brace-expansion "^1.0.0" +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -2298,11 +2329,7 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@~0.5.1: +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -2414,7 +2441,7 @@ node-sass: sass-graph "^2.1.1" stdout-stream "^1.4.0" -nopt@~3.0.6, "nopt@2 || 3": +"nopt@2 || 3", nopt@~3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" dependencies: @@ -2446,7 +2473,7 @@ normalize-url@^1.4.0: query-string "^4.1.0" sort-keys "^1.0.0" -npmlog@^4.0.0, npmlog@^4.0.1, "npmlog@0 || 1 || 2 || 3 || 4": +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" dependencies: @@ -2932,26 +2959,26 @@ pseudomap@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + q@^1.1.2: version "1.4.1" resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" -qs@~6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" - qs@6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.0.tgz#3b7848c03c2dece69a9522b0fae8c4126d745f3b" +qs@~6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" + query-string@^4.1.0, query-string@^4.2.2: version "4.3.1" resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.1.tgz#54baada6713eafc92be75c47a731f2ebd09cd11d" @@ -3178,7 +3205,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@^2.61.0, request@^2.79.0, request@2: +request@2, request@^2.61.0, request@^2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -3257,7 +3284,13 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@~2.5.1, rimraf@~2.5.4, rimraf@2: +rimraf@2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + dependencies: + glob "^7.1.3" + +rimraf@~2.5.1, rimraf@~2.5.4: version "2.5.4" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" dependencies: @@ -3267,6 +3300,10 @@ ripemd160@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-0.2.0.tgz#2bf198bde167cacfa51c0a928e84b68bbe171fce" +safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + sass-graph@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.1.2.tgz#965104be23e8103cb7e5f710df65935b317da57b" @@ -3287,7 +3324,7 @@ sax@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" -semver@^5.3.0, semver@~5.3.0, "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5": +"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.3.0, semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -3419,7 +3456,7 @@ source-map-url@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9" -source-map@^0.1.38, source-map@^0.1.43, source-map@0.1.x: +source-map@0.1.x, source-map@^0.1.38, source-map@^0.1.43: version "0.1.43" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" dependencies: @@ -3454,18 +3491,17 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa" + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" ecc-jsbn "~0.1.1" - jodid25519 "^1.0.0" + getpass "^0.1.1" jsbn "~0.1.0" + safer-buffer "^2.0.2" tweetnacl "~0.14.0" "statuses@>= 1.3.1 < 2", statuses@~1.3.0: @@ -3503,10 +3539,6 @@ strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" -string_decoder@^0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -3515,6 +3547,10 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +string_decoder@^0.10.25, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -3599,11 +3635,11 @@ tar-pack@~3.3.0: uid-number "~0.0.6" tar@^2.0.0, tar@~2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + version "2.2.2" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.2.tgz#0ca8848562c7299b8b446ff6a4d60cdbb23edc40" dependencies: block-stream "*" - fstream "^1.0.2" + fstream "^1.0.12" inherits "2" timers-browserify@^2.0.2: @@ -3699,16 +3735,16 @@ url-loader: loader-utils "0.2.x" mime "1.2.x" -url-parse@^1.1.1: - version "1.1.7" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.1.7.tgz#025cff999653a459ab34232147d89514cc87d74a" +url-parse@1.0.x: + version "1.0.5" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" dependencies: querystringify "0.0.x" requires-port "1.0.x" -url-parse@1.0.x: - version "1.0.5" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" +url-parse@^1.1.1: + version "1.1.7" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.1.7.tgz#025cff999653a459ab34232147d89514cc87d74a" dependencies: querystringify "0.0.x" requires-port "1.0.x" @@ -3724,7 +3760,7 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -util@^0.10.3, util@0.10.3: +util@0.10.3, util@^0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" dependencies: @@ -3866,7 +3902,7 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@^1.2.9, which@1: +which@1, which@^1.2.9: version "1.2.12" resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" dependencies: @@ -3878,22 +3914,22 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.1" -window-size@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" - window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -3951,4 +3987,3 @@ yargs@~3.10.0: cliui "^2.1.0" decamelize "^1.0.0" window-size "0.1.0" - diff --git a/aws/iot/aws iot.ipynb b/aws/iot/aws iot.ipynb new file mode 100644 index 00000000..dfb09d3f --- /dev/null +++ b/aws/iot/aws iot.ipynb @@ -0,0 +1,224 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "References:\n", + "\n", + "* [AWS IoT Python](https://github.com/aws/aws-iot-device-sdk-python/blob/master/README.rst)\n", + "* [AWS CA](https://docs.aws.amazon.com/en_pv/iot/latest/developerguide/server-authentication.html)\n", + "\n", + "\n", + "prepares:\n", + "\n", + "```python\n", + "pip install AWSIoTPythonSDK kipp3\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [], + "source": [ + "import logging\n", + "import os\n", + "import time\n", + "import json\n", + "from concurrent.futures import ThreadPoolExecutor\n", + "from threading import Event\n", + "\n", + "from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient\n", + "from kipp3.utils import setup_logger\n", + "from kipp3.decorator import debug_wrapper\n", + "\n", + "\n", + "logger = setup_logger(\"awsiot\")\n", + "executor = ThreadPoolExecutor(max_workers=10)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "# Configure logging\n", + "logging.getLogger(\"AWSIoTPythonSDK.core\").setLevel(logging.INFO)\n", + "\n", + "\n", + "# streamHandler = logging.StreamHandler()\n", + "# formatter = logging.Formatter(\"%(asctime)s - %(name)s - %(levelname)s - %(message)s\")\n", + "# streamHandler.setFormatter(formatter)\n", + "# logger.addHandler(streamHandler)" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 43, + "metadata": {}, + "output_type": "execute_result" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-12-17 06:22:02,617 - INFO - :8 - awsiot] - >> topic='laisky-hello' publish True, payload='{\"yo\": \"jedi\"}'\n", + "[2019-12-17 06:22:02,960 - INFO - :8 - awsiot] - >> topic='laisky-hello' publish True, payload='{\"yo\": \"jedi\"}'\n" + ] + } + ], + "source": [ + "# config_path = \"/Users/laisky/repo/laisky/configs\"\n", + "config_path = \"/opt/configs\"\n", + "\n", + "cli = AWSIoTMQTTClient(\"laisky-demo\")\n", + "cli.configureEndpoint(\"a2mth8rkdw0p8j-ats.iot.us-west-2.amazonaws.com\", 8883)\n", + "cli.configureCredentials(\n", + " os.path.join(config_path, \"mqtt/root-CA.crt\"),\n", + " os.path.join(config_path, \"mqtt/python-cli.private.key\"),\n", + " os.path.join(config_path, \"mqtt/python-cli.cert.pem\"),\n", + ")\n", + "\n", + "cli.configureAutoReconnectBackoffTime(1, 32, 20)\n", + "cli.configureOfflinePublishQueueing(-1) # Infinite offline Publish queueing\n", + "cli.configureDrainingFrequency(2) # Draining: 2 Hz\n", + "cli.configureConnectDisconnectTimeout(10) # 10 sec\n", + "cli.configureMQTTOperationTimeout(10) # 5 sec\n", + "\n", + "\n", + "def customCallback(cli, userdata, message):\n", + " print(\"Received a new message: \")\n", + " print(message.payload)\n", + " print(\"from topic: \")\n", + " print(message.topic)\n", + " print(\"--------------\\n\\n\")\n", + "\n", + "\n", + "cli.connect()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "stop_evt = Event()" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-12-17 06:22:15,548 - INFO - :20 - awsiot] - subscribe to topic='laisky-hello'\n", + "[2019-12-17 06:22:15,952 - INFO - :8 - awsiot] - >> topic='laisky-hello' publish True, payload='{\"yo\": \"jedi\"}'\n", + "[2019-12-17 06:22:15,972 - INFO - :23 - awsiot] - << topic='laisky-hello' got: userdata=None, msg.mid=1, msg.state=0, msg.retain=0, msg.topic='laisky-hello', msg.payload=b'{\"yo\": \"jedi\"}'\n", + "[2019-12-17 06:22:15,973 - INFO - /Users/laisky/repo/laisky/kipp/kipp3/decorator/__init__.py:129 - kipp] - callback cost 0.00s\n", + "[2019-12-17 06:22:18,956 - INFO - :8 - awsiot] - >> topic='laisky-hello' publish False, payload='{\"yo\": \"jedi\"}'\n", + "[2019-12-17 06:22:21,235 - INFO - :23 - awsiot] - << topic='laisky-hello' got: userdata=None, msg.mid=1, msg.state=0, msg.retain=0, msg.topic='laisky-hello', msg.payload=b'{\"yo\": \"jedi\"}'\n", + "[2019-12-17 06:22:21,237 - INFO - /Users/laisky/repo/laisky/kipp/kipp3/decorator/__init__.py:129 - kipp] - callback cost 0.00s\n", + "[2019-12-17 06:22:22,166 - INFO - :8 - awsiot] - >> topic='laisky-hello' publish True, payload='{\"yo\": \"jedi\"}'\n", + "[2019-12-17 06:22:22,184 - INFO - :23 - awsiot] - << topic='laisky-hello' got: userdata=None, msg.mid=1, msg.state=0, msg.retain=0, msg.topic='laisky-hello', msg.payload=b'{\"yo\": \"jedi\"}'\n", + "[2019-12-17 06:22:22,185 - INFO - /Users/laisky/repo/laisky/kipp/kipp3/decorator/__init__.py:129 - kipp] - callback cost 0.00s\n", + "[2019-12-17 06:22:25,372 - INFO - :8 - awsiot] - >> topic='laisky-hello' publish True, payload='{\"yo\": \"jedi\"}'\n", + "[2019-12-17 06:22:25,395 - INFO - :23 - awsiot] - << topic='laisky-hello' got: userdata=None, msg.mid=1, msg.state=0, msg.retain=0, msg.topic='laisky-hello', msg.payload=b'{\"yo\": \"jedi\"}'\n", + "[2019-12-17 06:22:25,396 - INFO - /Users/laisky/repo/laisky/kipp/kipp3/decorator/__init__.py:129 - kipp] - callback cost 0.00s\n" + ] + } + ], + "source": [ + "TOPIC = \"laisky-hello\"\n", + "\n", + "\n", + "@debug_wrapper\n", + "def publisher(topic:str, stop_evt: Event):\n", + " while not stop_evt.is_set():\n", + " payload = json.dumps({\"yo\": \"jedi\"})\n", + " logger.info(f\">> {topic=} publish {cli.publish(topic, payload, 1)}, {payload=}\")\n", + " time.sleep(3)\n", + "\n", + " logger.info(\"publisher stop\")\n", + "\n", + "\n", + "@debug_wrapper\n", + "def stop_all_publisher():\n", + " stop_evt.set()\n", + "\n", + " \n", + "def get_subscriber(topic):\n", + " logger.info(f\"subscribe to {topic=}\")\n", + " @debug_wrapper\n", + " def callback(client, userdata, msg):\n", + " logger.info(\n", + " f\"<< {topic=} got: {userdata=}, {msg.mid=}, {msg.state=}, {msg.retain=}, {msg.topic=}, {msg.payload=}\"\n", + " )\n", + " \n", + " return callback\n", + "\n", + "topic = TOPIC\n", + "# cli.unsubscribe(TOPIC)\n", + "\n", + "cli.subscribe(topic, 1, get_subscriber(topic))\n", + "fp = executor.submit(publisher, topic, stop_evt)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-12-17 06:22:28,376 - INFO - :11 - awsiot] - publisher stop\n", + "[2019-12-17 06:22:28,378 - INFO - /Users/laisky/repo/laisky/kipp/kipp3/decorator/__init__.py:129 - kipp] - publisher cost 12.63s\n" + ] + } + ], + "source": [ + "stop_evt.set()\n", + "stop_evt = Event()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.0" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/aws/iot/requirements.txt b/aws/iot/requirements.txt new file mode 100644 index 00000000..8579e8b2 --- /dev/null +++ b/aws/iot/requirements.txt @@ -0,0 +1 @@ +paho-mqtt diff --git a/go.mod b/go.mod index f51bd667..aaa10015 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,104 @@ module github.com/Laisky/HelloWorld go 1.12 require ( + cloud.google.com/go v0.43.0 // indirect + git.apache.org/thrift.git v0.13.0 + github.com/DataDog/zstd v1.4.0 // indirect + github.com/GeertJohan/go.rice v1.0.0 // indirect + github.com/Joker/hpp v1.0.0 // indirect + github.com/Laisky/go-chaining v0.0.0-20180507092046-43dcdc5a21be + github.com/Laisky/go-utils v1.5.2 + github.com/Laisky/graphql v1.0.4-0.20191219072120-f743add4d25b + github.com/Laisky/zap v1.9.2 + github.com/Shopify/sarama v1.23.1 // indirect + github.com/appleboy/gofight/v2 v2.1.1 // indirect + github.com/astaxie/beego v1.12.0 + github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668 // indirect + github.com/casbin/casbin v1.9.1 // indirect + github.com/cespare/xxhash v1.1.0 + github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 + github.com/cloudflare/cfssl v0.0.0-20190911221928-1a911ca1b1d6 // indirect + github.com/coreos/bbolt v1.3.3 // indirect + github.com/coreos/etcd v3.3.13+incompatible // indirect + github.com/coreos/go-semver v0.3.0 // indirect + github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect + github.com/couchbase/go-couchbase v0.0.0-20190708161019-23e7ca2ce2b7 // indirect + github.com/couchbase/gomemcached v0.0.0-20190515232915-c4b4ca0eb21d // indirect + github.com/couchbase/goutils v0.0.0-20190315194238-f9d42b11473b // indirect + github.com/daaku/go.zipexe v1.0.1 // indirect + github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc github.com/dvyukov/go-fuzz v0.0.0-20190516070045-5cc3605ccbb6 // indirect github.com/dvyukov/go-fuzz-corpus v0.0.0-20190304103735-86a5af9d6842 // indirect - github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect - github.com/gomarkdown/markdown v0.0.0-20190222000725-ee6a7931a1e4 + github.com/eapache/go-resiliency v1.2.0 // indirect + github.com/edsrzf/mmap-go v1.0.0 // indirect + github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4 // indirect + github.com/gin-contrib/sse v0.1.0 // indirect + github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 // indirect + github.com/go-kit/kit v0.9.0 // indirect + github.com/go-redis/redis v6.15.2+incompatible // indirect + github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect + github.com/golang/protobuf v1.3.2 + github.com/gomarkdown/markdown v0.0.0-20190222000725-ee6a7931a1e4 // indirect + github.com/google/certificate-transparency-go v1.0.21 // indirect + github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70 // indirect + github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c // indirect + github.com/gorilla/mux v1.7.3 // indirect + github.com/gorilla/pat v1.0.1 // indirect + github.com/graphql-go/graphql v0.7.8 + github.com/grpc-ecosystem/grpc-gateway v1.9.5 // indirect + github.com/jcmturner/gofork v1.0.0 // indirect + github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 // indirect + github.com/jmoiron/sqlx v1.2.0 // indirect + github.com/juju/errors v0.0.0-20190207033735-e65537c515d7 // indirect + github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8 // indirect + github.com/juju/testing v0.0.0-20190613124551-e81189438503 // indirect + github.com/kataras/golog v0.0.0-20190624001437-99c81de45f40 // indirect + github.com/kisielk/errcheck v1.2.0 // indirect + github.com/kisielk/sqlstruct v0.0.0-20150923205031-648daed35d49 // indirect + github.com/klauspost/compress v1.9.3 // indirect + github.com/klauspost/cpuid v1.2.2 // indirect + github.com/klauspost/pgzip v1.2.1 + github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect + github.com/kr/pty v1.1.8 // indirect + github.com/lib/pq v1.2.0 // indirect + github.com/libp2p/go-reuseport v0.0.1 + github.com/mattn/go-sqlite3 v1.11.0 // indirect + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/patrickmn/go-cache v2.1.0+incompatible + github.com/pelletier/go-toml v1.4.0 // indirect + github.com/pkg/profile v1.3.0 // indirect + github.com/prometheus/common v0.6.0 // indirect + github.com/rcrowley/go-metrics v0.0.0-20190706150252-9beb055b7962 // indirect + github.com/rogpeppe/fastuuid v1.2.0 // indirect + github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect + github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f + github.com/siddontang/ledisdb v0.0.0-20190202134119-8ceb77e66a92 // indirect + github.com/sirupsen/logrus v1.4.2 // indirect + github.com/smartystreets/assertions v1.0.1 // indirect + github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945 // indirect + github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 + github.com/spf13/afero v1.2.2 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/stephens2424/writerset v1.0.2 // indirect - golang.org/x/tools v0.0.0-20190525145741-7be61e1b0e51 // indirect + github.com/syndtr/goleveldb v1.0.0 // indirect + github.com/tidwall/gjson v1.3.2 // indirect + github.com/tinylib/msgp v1.1.0 + github.com/ugorji/go/codec v1.1.7 + github.com/wendal/errors v0.0.0-20181209125328-7f31f4b264ec // indirect + github.com/weppos/publicsuffix-go v0.10.0 // indirect + github.com/zmap/zlint v1.0.2 // indirect + go.etcd.io/bbolt v1.3.3 // indirect + go.uber.org/zap v1.10.0 + golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc // indirect + golang.org/x/exp v0.0.0-20190718202018-cfdd5522f6f6 // indirect + golang.org/x/image v0.0.0-20190703141733-d6a02ce849c9 // indirect + golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 // indirect + golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 + golang.org/x/sync v0.0.0-20190423024810-112230192c58 + golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 // indirect + golang.org/x/text v0.3.2 + golang.org/x/tools v0.0.0-20190723021737-8bb11ff117ca // indirect + google.golang.org/appengine v1.6.5 // indirect + google.golang.org/grpc v1.22.0 + gopkg.in/jcmturner/gokrb5.v7 v7.3.0 // indirect ) diff --git a/go.sum b/go.sum index 23d707eb..4e303193 100644 --- a/go.sum +++ b/go.sum @@ -1,23 +1,644 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= +git.apache.org/thrift.git v0.13.0 h1:/3bz5WZ+sqYArk7MBBBbDufMxKKOA56/6JO6psDpUDY= +git.apache.org/thrift.git v0.13.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/zstd v1.3.6-0.20190409195224-796139022798/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.3.8/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.4.0/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Depado/ginprom v1.1.2/go.mod h1:OPTeCiC3QLr6QueEA0UNChKGWyxKOqmC4k4WUJUh5lg= +github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= +github.com/GeertJohan/go.rice v1.0.0 h1:KkI6O9uMaQU3VEKaj01ulavtF7o1fWT7+pk/4voiMLQ= +github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= +github.com/Joker/hpp v0.0.0-20180418125244-6893e659854a/go.mod h1:MzD2WMdSxvbHw5fM/OXOFily/lipJWRc9C1px0Mt0ZE= +github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= +github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Joker/jade v1.0.0 h1:lOCEPvTAtWfLpSZYMOv/g44MGQFAolbKh2khHHGu0Kc= +github.com/Joker/jade v1.0.0/go.mod h1:efZIdO0py/LtcJRSa/j2WEklMSAw84WV0zZVMxNToB8= github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74= +github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Laisky/go-chaining v0.0.0-20180507092046-43dcdc5a21be h1:7Rxhm6IjOtDAyj8eScOFntevwzkWhx94zi48lxo4m4w= +github.com/Laisky/go-chaining v0.0.0-20180507092046-43dcdc5a21be/go.mod h1:1mdzaETo0kjvCQICPSePsoaatJN4l7JvEA1200lyevo= +github.com/Laisky/go-utils v1.5.2 h1:hK/BEzR0jgTbUE+DF4J9dW7Zde+bQEx9RXfAyotBHJc= +github.com/Laisky/go-utils v1.5.2/go.mod h1:MpydOPP7RWH/cINQIgI1exzT8/9wumQ49iw91Y/lDOk= +github.com/Laisky/graphql v1.0.1 h1:OFVxoRVsT9tGmxNF2zxZGpIQ2xOux1b2ova+sEO4Dbw= +github.com/Laisky/graphql v1.0.1/go.mod h1:5ZcjUzEYy4ai2tmwmdwSYgxdd3YHThzy0f+ycPFgQQw= +github.com/Laisky/graphql v1.0.2-0.20191218072838-59d5ff744ff0 h1:5UbdojDd32lg67ZVTiFVE/4vz2DGxGt6YTwFBU0AuP4= +github.com/Laisky/graphql v1.0.2-0.20191218072838-59d5ff744ff0/go.mod h1:5ZcjUzEYy4ai2tmwmdwSYgxdd3YHThzy0f+ycPFgQQw= +github.com/Laisky/graphql v1.0.2-0.20191218075226-918c0e702027 h1:pRhxlxbgdZ3EI7MxHK822zifj2x/OvpTWx9k2BZXRt0= +github.com/Laisky/graphql v1.0.2-0.20191218075226-918c0e702027/go.mod h1:5ZcjUzEYy4ai2tmwmdwSYgxdd3YHThzy0f+ycPFgQQw= +github.com/Laisky/graphql v1.0.2-0.20191218083044-5f7478f5bfe7 h1:IS7yAjV10/kML+9oeFGuoqDEmVsPb/HYF6HHTQfgF6s= +github.com/Laisky/graphql v1.0.2-0.20191218083044-5f7478f5bfe7/go.mod h1:5ZcjUzEYy4ai2tmwmdwSYgxdd3YHThzy0f+ycPFgQQw= +github.com/Laisky/graphql v1.0.2-0.20191218101312-b0ad68952627 h1:kfGy7eqRmR8N8Rype2GvJgStFmczVClbrOE254lICwE= +github.com/Laisky/graphql v1.0.2-0.20191218101312-b0ad68952627/go.mod h1:5ZcjUzEYy4ai2tmwmdwSYgxdd3YHThzy0f+ycPFgQQw= +github.com/Laisky/graphql v1.0.2-0.20191218101618-083073e0f56a h1:WIFXSAO+QJ+oCgJzjX4GhZNekel0JjVm0xHVBnM/IHI= +github.com/Laisky/graphql v1.0.2-0.20191218101618-083073e0f56a/go.mod h1:5ZcjUzEYy4ai2tmwmdwSYgxdd3YHThzy0f+ycPFgQQw= +github.com/Laisky/graphql v1.0.2-0.20191219034634-6bcf149d0dc6 h1:jVLog5Sqixi4AFfRYDQDqVibDWqscjfEInmjvfVtz+w= +github.com/Laisky/graphql v1.0.2-0.20191219034634-6bcf149d0dc6/go.mod h1:5ZcjUzEYy4ai2tmwmdwSYgxdd3YHThzy0f+ycPFgQQw= +github.com/Laisky/graphql v1.0.4-0.20191219072120-f743add4d25b h1:AvO0JnaYxdDDztAcTSyYKdtXKgWnCfNbQ8pvodT5zN4= +github.com/Laisky/graphql v1.0.4-0.20191219072120-f743add4d25b/go.mod h1:8nTxZuOwua8Ga6EFL1HuF9rNiJtvSEnwGXGLnW+9i9k= +github.com/Laisky/zap v1.9.2 h1:7dTtABboHk8DnT0d6Dc8A9Opu2cyIEaMlL9JO11zvag= +github.com/Laisky/zap v1.9.2/go.mod h1:CQdLb2wEfqBvoNLmfOp7wnKTOMvhc4DQRc3xfshL4EQ= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= +github.com/OwnLocal/goes v1.0.0/go.mod h1:8rIFjBGTue3lCU0wplczcUgt9Gxgrkkrw7etMIcn8TM= +github.com/RoaringBitmap/roaring v0.4.18/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrXIr8KVNvRsDi1NI= +github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398 h1:WDC6ySpJzbxGWFh4aMxFFC28wwGp5pEuoTtvA4q/qQ4= +github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/Shopify/sarama v1.22.1/go.mod h1:FRzlvRpMFO/639zY1SDxUxkqH97Y0ndM5CbGj6oG3As= +github.com/Shopify/sarama v1.23.1/go.mod h1:XLH1GYJnLVE0XCr6KdJGVJRTwY30moWNJ4sERjXX6fs= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/appleboy/gofight/v2 v2.0.0+incompatible/go.mod h1:6E7pthKhmwss84j/zEixBNim8Q6ahhHcYOtmW5ts5vA= +github.com/appleboy/gofight/v2 v2.1.1/go.mod h1:6E7pthKhmwss84j/zEixBNim8Q6ahhHcYOtmW5ts5vA= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/astaxie/beego v1.11.1/go.mod h1:i69hVzgauOPSw5qeyF4GVZhn7Od0yG5bbCGzmhbWxgQ= +github.com/astaxie/beego v1.12.0 h1:MRhVoeeye5N+Flul5PoVfD9CslfdoH+xqC/xvSQ5u2Y= +github.com/astaxie/beego v1.12.0/go.mod h1:fysx+LZNZKnvh4GED/xND7jWtjCR6HzydR2Hh2Im57o= +github.com/aymerick/raymond v2.0.2+incompatible h1:VEp3GpgdAnv9B2GFyTvqgcKvY+mfKMjPOA3SbKLtnU0= +github.com/aymerick/raymond v2.0.2+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ= +github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU= +github.com/belogik/goes v0.0.0-20151229125003-e54d722c3aff/go.mod h1:PhH1ZhyCzHKt4uAasyx+ljRCgoezetRNf59CUtwUkqY= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60= +github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= +github.com/bsm/sarama-cluster v2.1.15+incompatible/go.mod h1:r7ao+4tTNXvWm+VRpRJchr2kQhqxgmAp2iEX5W96gMM= +github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE= +github.com/casbin/casbin v1.9.1/go.mod h1:z8uPsfBJGUsnkagrt3G8QvjgTKFMBJ32UP8HpZllfog= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= +github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cfssl v0.0.0-20190911221928-1a911ca1b1d6 h1:A7RURps5t4yDU0zktlgrE3Bdmjfv35nVs+xJdoWgIgY= +github.com/cloudflare/cfssl v0.0.0-20190911221928-1a911ca1b1d6/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= +github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/couchbase/go-couchbase v0.0.0-20181122212707-3e9b6e1258bb/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U= +github.com/couchbase/go-couchbase v0.0.0-20190708161019-23e7ca2ce2b7/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U= +github.com/couchbase/gomemcached v0.0.0-20181122193126-5125a94a666c/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= +github.com/couchbase/gomemcached v0.0.0-20190515232915-c4b4ca0eb21d/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= +github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= +github.com/couchbase/goutils v0.0.0-20190315194238-f9d42b11473b/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= +github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY= +github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= +github.com/daaku/go.zipexe v1.0.1 h1:wV4zMsDOI2SZ2m7Tdz1Ps96Zrx+TzaK15VbUaGozw0M= +github.com/daaku/go.zipexe v1.0.1/go.mod h1:5xWogtqlYnfBXkSB1o9xysukNP9GTvaNkqzUZbt3Bw8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc h1:8WFBn63wegobsYAX0YjD+8suexZDga5CctH4CCTx2+8= +github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dvyukov/go-fuzz v0.0.0-20190516070045-5cc3605ccbb6 h1:JQBgIQumUT/1PnZs9cWQzx/xH+djYh+oGDLO8H68SWE= github.com/dvyukov/go-fuzz v0.0.0-20190516070045-5cc3605ccbb6/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/dvyukov/go-fuzz-corpus v0.0.0-20190304103735-86a5af9d6842 h1:7ffpoBeHy8ml49lQ3VkaNmUW6I6+bp6CekgTpHgp8JM= github.com/dvyukov/go-fuzz-corpus v0.0.0-20190304103735-86a5af9d6842/go.mod h1:aSQy4yPbyjNrXv8ANgj9BQacfss3bbmXTon1mFcwc1k= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= +github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/flosch/pongo2 v0.0.0-20190505152737-8914e1cf9164/go.mod h1:tbAXHifHQWNSpWbiJHpJTZH5fi3XHhDMdP//vuz9WS4= +github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4 h1:GY1+t5Dr9OKADM64SYnQjw/w99HMYvQ0A8/JoUkxVmc= +github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/gavv/monotime v0.0.0-20190418164738-30dba4353424 h1:Vh7rylVZRZCj6W41lRlP17xPk4Nq260H4Xo/DDYmEZk= +github.com/gavv/monotime v0.0.0-20190418164738-30dba4353424/go.mod h1:vmp8DIyckQMXOPl0AQVHt+7n5h7Gb7hS6CUydiV8QeA= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.4.0 h1:3tMoCCfM7ppqsR0ptz/wi1impNpT7/9wQtMZ8lr1mCQ= +github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= +github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/go-check/check v1.0.0-20180628173108-788fd7840127 h1:3dbHpVjNKf7Myfit4Xmw4BA0JbCt47OJPhMQ5w8O3E8= +github.com/go-check/check v1.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-redis/redis v6.15.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomarkdown/markdown v0.0.0-20190222000725-ee6a7931a1e4 h1:vELsocEzlhM4lk2nhxolEaQrMp25u7/i9IX8s9uLads= github.com/gomarkdown/markdown v0.0.0-20190222000725-ee6a7931a1e4/go.mod h1:gmFANS06wAVmF0B9yi65QKsRmPQ97tze7FRLswua+OY= +github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/certificate-transparency-go v1.0.21 h1:Yf1aXowfZ2nuboBsg7iYGLmwsOARdV86pfH3g95wXmE= +github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRidnzC1Oq86fpX1q/iEv2KJdrCtttYjT4= +github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= +github.com/gorilla/pat v1.0.1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/graphql-go/graphql v0.7.8 h1:769CR/2JNAhLG9+aa8pfLkKdR0H+r5lsQqling5WwpU= +github.com/graphql-go/graphql v0.7.8/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= +github.com/iris-contrib/blackfriday v2.0.0+incompatible h1:o5sHQHHm0ToHUlAJSTjW9UWicjJSDDauOOQ2AHuIVp4= +github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= +github.com/iris-contrib/formBinder v0.0.0-20190104093907-fbd5963f41e1 h1:7GsNnSLoVceNylMpwcfy5aFNz/S5/TV25crb34I5PEo= +github.com/iris-contrib/formBinder v0.0.0-20190104093907-fbd5963f41e1/go.mod h1:i8kTYUOEstd/S8TG0ChTXQdf4ermA/e8vJX0+QruD9w= +github.com/iris-contrib/go.uuid v2.0.0+incompatible h1:XZubAYg61/JwnJNbZilGjf3b3pB80+OQg2qf6c8BfWE= +github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= +github.com/iris-contrib/httpexpect v0.0.0-20180314041918-ebe99fcebbce h1:q8Ka/exfHNgK7izJE+aUOZd7KZXJ7oQbnJWiZakEiMo= +github.com/iris-contrib/httpexpect v0.0.0-20180314041918-ebe99fcebbce/go.mod h1:VER17o2JZqquOx41avolD/wMGQSFEFBKWmhag9/RQRY= +github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4= +github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548/go.mod h1:hGT6jSUVzF6no3QaDSMLGLEHtHSBSefs+MgcDWnmhmo= +github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= +github.com/juju/errors v0.0.0-20190207033735-e65537c515d7 h1:dMIPRDg6gi7CUp0Kj2+HxqJ5kTr1iAdzsXYIrLCNSmU= +github.com/juju/errors v0.0.0-20190207033735-e65537c515d7/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= +github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= +github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8 h1:UUHMLvzt/31azWTN/ifGWef4WUqvXk0iRqdhdy/2uzI= +github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= +github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/juju/testing v0.0.0-20190613124551-e81189438503 h1:ZUgTbk8oHgP0jpMieifGC9Lv47mHn8Pb3mFX3/Ew4iY= +github.com/juju/testing v0.0.0-20190613124551-e81189438503/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/kataras/golog v0.0.0-20180321173939-03be10146386/go.mod h1:PcaEvfvhGsqwXZ6S3CgCbmjcp+4UDUh2MIfF2ZEul8M= +github.com/kataras/golog v0.0.0-20190624001437-99c81de45f40 h1:Q/QxpyNBtfkhXE68tnEA4yyqm77eh/3YOjOw875VbBY= +github.com/kataras/golog v0.0.0-20190624001437-99c81de45f40/go.mod h1:PcaEvfvhGsqwXZ6S3CgCbmjcp+4UDUh2MIfF2ZEul8M= +github.com/kataras/iris v11.1.1+incompatible h1:c2iRKvKLpTYMXKdVB8YP/+A67NtZFt9kFFy+ZwBhWD0= +github.com/kataras/iris v11.1.1+incompatible/go.mod h1:ki9XPua5SyAJbIxDdsssxevgGrbpBmmvoQmo/A0IodY= +github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d h1:V5Rs9ztEWdp58oayPq/ulmlqJJZeJP6pP79uP3qjcao= +github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kisielk/sqlstruct v0.0.0-20150923205031-648daed35d49 h1:o/c0aWEP/m6n61xlYW2QP4t9424qlJOsxugn5Zds2Rg= +github.com/kisielk/sqlstruct v0.0.0-20150923205031-648daed35d49/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE= +github.com/klauspost/compress v1.7.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.7.4 h1:4UqAIzZ1Ns2epCTyJ1d2xMWvxtX+FNSCYWeOFogK9nc= +github.com/klauspost/compress v1.7.4/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.3 h1:hkFELABwacUEgBfiguNeQydKv3M9pawBq8o24Ypw9+M= +github.com/klauspost/compress v1.9.3/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= +github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.2/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/pgzip v1.2.1 h1:oIPZROsWuPHpOdMVWLuJZXwgjhrW8r1yEX8UqMyeNHM= +github.com/klauspost/pgzip v1.2.1/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kubernetes/kubernetes v1.17.0 h1:NmJcE3Wyc9DgUACMfoWIG71RX5ipEv62N33D2+eVuVw= +github.com/kubernetes/kubernetes v1.17.3 h1:R48XdHaBsm98Dx97znpvyOTovPfROuSmmyQLwDurbts= +github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= +github.com/labstack/gommon v0.2.8/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4= +github.com/labstack/gommon v0.2.9/go.mod h1:E8ZTmW9vw5az5/ZyHWCp0Lw4OH2ecsaBP1C/NKavGG4= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/libp2p/go-reuseport v0.0.1 h1:7PhkfH73VXfPJYKQ6JwS5I/eVcoyYi9IMNGc6FWpFLw= +github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.11.0 h1:LDdKkqtYlom37fkvqs8rMPFKAMe8+SgjbwZ6ex1/A/Q= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/microcosm-cc/bluemonday v1.0.2 h1:5lPfLTTAvAbtS0VqT+94yOtFnGfUWYyx0+iToC3Os3s= +github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs= +github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mreiferson/go-httpclient v0.0.0-20160630210159-31f0106b4474/go.mod h1:OQA4XLvDbMgS8P0CevmM4m9Q3Jq4phKUzcocxuGJ5m8= +github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= +github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0 h1:u3Z1r+oOXJIkxqw34zVhyPgjBsm6X2wn21NWs/HfSeg= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/profile v1.3.0/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v0.9.4/go.mod h1:oCXIBxdI62A4cR6aTRJCgetEjecSIYzOEaeAn4iYEpM= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181120120127-aeab699e26f4/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/tsdb v0.9.1/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20190706150252-9beb055b7962/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/ryanuber/columnize v2.1.0+incompatible h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo= +github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg= +github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f h1:tygelZueB1EtXkPI6mQ4o9DQ0+FKW41hTbunoXZCTqk= +github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw= +github.com/siddontang/ledisdb v0.0.0-20181029004158-becf5f38d373/go.mod h1:mF1DpOSOUiJRMR+FDqaqu3EBqrybQtrDDszLUZ6oxPg= +github.com/siddontang/ledisdb v0.0.0-20190202134119-8ceb77e66a92/go.mod h1:mF1DpOSOUiJRMR+FDqaqu3EBqrybQtrDDszLUZ6oxPg= +github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= +github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= +github.com/smartystreets/goconvey v0.0.0-20190306220146-200a235640ff/go.mod h1:KSQcGKpxUMHk3nbYzs/tIBAM2iDooCn0BmttHOJEbLs= +github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945 h1:N8Bg45zpk/UcpNGnfJt2y/3lRWASHNTUET8owPYCgYI= +github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE= github.com/stephens2424/writerset v1.0.2 h1:znRLgU6g8RS5euYRcy004XeE4W+Tu44kALzy7ghPif8= github.com/stephens2424/writerset v1.0.2/go.mod h1:aS2JhsMn6eA7e82oNmW4rfsgAOp9COBTTl8mzkwADnc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= +github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= +github.com/tidwall/gjson v1.2.1/go.mod h1:c/nTNbUr0E0OrXEhq1pwa8iEgc2DOt4ZZqAt1HtCkPA= +github.com/tidwall/gjson v1.3.2/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= +github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= +github.com/tidwall/pretty v0.0.0-20190325153808-1166b9ac2b65/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU= +github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.5-pre/go.mod h1:FwP/aQVg39TXzItUBMwnWp9T9gPQnXw4Poh4/oBQZ/0= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.5-pre/go.mod h1:tULtS6Gy1AE1yCENaw4Vb//HLH5njI2tfCQDUqRd8fI= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc= +github.com/wendal/errors v0.0.0-20181209125328-7f31f4b264ec/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc= +github.com/weppos/publicsuffix-go v0.4.0 h1:YSnfg3V65LcCFKtIGKGoBhkyKolEd0hlipcXaOjdnQw= +github.com/weppos/publicsuffix-go v0.4.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k= +github.com/weppos/publicsuffix-go v0.10.0 h1:u6FEJZ3kGCsIVns99k49dV9y4cE7dLpdaWscDllWOzQ= +github.com/weppos/publicsuffix-go v0.10.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k= +github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.1.0 h1:ngVtJC9TY/lg0AA/1k48FYhBrhRoFlEmWzsehpNAaZg= +github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= +github.com/zmap/rc2 v0.0.0-20131011165748-24b9757f5521/go.mod h1:3YZ9o3WnatTIZhuOtot4IcUfzoKVjUHqu6WALIyI0nE= +github.com/zmap/zcertificate v0.0.0-20180516150559-0e3d58b1bac4/go.mod h1:5iU54tB79AMBcySS0R2XIyZBAVmeHranShAFELYx7is= +github.com/zmap/zcrypto v0.0.0-20190729165852-9051775e6a2e h1:mvOa4+/DXStR4ZXOks/UsjeFdn5O5JpLUtzqk9U8xXw= +github.com/zmap/zcrypto v0.0.0-20190729165852-9051775e6a2e/go.mod h1:w7kd3qXHh8FNaczNjslXqvFQiv5mMWRXlL9klTUAHc8= +github.com/zmap/zlint v1.0.2 h1:07+WuC/prlXVlWa1CJx2lCpuCd8biIeBAVnwTN2CPaA= +github.com/zmap/zlint v1.0.2/go.mod h1:29UiAJNsiVdvTBFCJW8e3q6dcDbOoPkhMgttOSCIMMY= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 h1:1wopBVtVdWnn03fZelqdXTqk7U7zPQCb+T4rbU9ZEoU= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc h1:c0o/qxkaO2LF5t6fQrT4b5hzyggAkLLlCUjqfRxd8Q4= +golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190718202018-cfdd5522f6f6/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190703141733-d6a02ce849c9/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191009170851-d66e71096ffb h1:TR699M2v0qoKTOHxeLgp6zPqaQNs74f01a/ob9W0qko= +golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 h1:N66aaryRB3Ax92gH0v3hp1QYZ3zWWCCUR/j8Ifh45Ss= +golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed h1:uPxWBzB3+mlnjy9W58qY1j/cjyFjutgw/Vhan2zLy/A= +golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 h1:LepdCS8Gf/MVejFIt8lsiexZATdoGVyp5bcyS+rYoUI= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190525145741-7be61e1b0e51 h1:RhYYBLDB5MoVkvoNGMNk+DSj7WoGhySvIvtEjTyiP74= golang.org/x/tools v0.0.0-20190525145741-7be61e1b0e51/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190716221150-e98af2309876 h1:XskQVJACjxHVCFlm4GsSEh6ZLclQPLobzuvB4DQYHtw= +golang.org/x/tools v0.0.0-20190716221150-e98af2309876/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20190723021737-8bb11ff117ca/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610 h1:Ygq9/SRJX9+dU0WCIICM8RkWvDw03lvB77hrhJnpxfU= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.0 h1:J0UbZOIrCAl+fpTOf8YLs4dJo8L/owV4LYVtAXQoPkw= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk= +gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v8 v8.18.2 h1:lFB4DoMU6B626w8ny76MV7VX6W2VHct2GVOI3xgiMrQ= +gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= +gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE= +gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= +gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= +gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/gokrb5.v7 v7.3.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= +gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce h1:xcEWjVhvbDy+nHP67nPDDpbYrY+ILlfndk4bRioVHaU= +gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/golang/.env b/golang/.env index 79fc6976..b5bad617 100644 --- a/golang/.env +++ b/golang/.env @@ -2,4 +2,4 @@ export GOROOT=/usr/local/opt/go/libexec/ export GOPATH=/Users/laisky/repo/laisky/HelloWorld/golang export PATH=/Users/laisky/repo/laisky/HelloWorld/golang/bin:$PATH -export GO111MODULE=off +export GO111MODULE=on diff --git a/golang/cpuprofile b/golang/cpuprofile deleted file mode 100644 index 81632c92..00000000 Binary files a/golang/cpuprofile and /dev/null differ diff --git a/golang/graphql/helloworld.go b/golang/graphql/graphqlgo_test.go similarity index 93% rename from golang/graphql/helloworld.go rename to golang/graphql/graphqlgo_test.go index d014e942..5bdec3dd 100644 --- a/golang/graphql/helloworld.go +++ b/golang/graphql/graphqlgo_test.go @@ -1,14 +1,15 @@ -package main +package main_test import ( "encoding/json" "fmt" "log" + "testing" "github.com/graphql-go/graphql" ) -func main() { +func TestGraphqlgo(t *testing.T) { // Schema fields := graphql.Fields{ "hello": &graphql.Field{ diff --git a/golang/graphql/shurcool_test.go b/golang/graphql/shurcool_test.go new file mode 100644 index 00000000..57fcec7b --- /dev/null +++ b/golang/graphql/shurcool_test.go @@ -0,0 +1,48 @@ +package main_test + +import ( + "context" + "testing" + + "github.com/shurcooL/graphql" +) + +var client = graphql.NewClient("http://127.0.0.1:8080/query/", nil) + +// var client = graphql.NewClient("https://blog.laisky.com/graphql/query/", nil) + +type QueryHello struct { + Hello graphql.String `graphql:"Hello"` +} + +func TestShurCli(t *testing.T) { + + ctx := context.Background() + query := new(QueryHello) + if err := client.Query(ctx, query, nil); err != nil { + t.Fatalf("got error: %+v", err) + } + + t.Logf("got: %v", query.Hello) + t.Error("all done") +} + +type alertMutation struct { + TelegramMonitorAlert struct { + Name graphql.String + } `graphql:"TelegramMonitorAlert(type: $type, token: $token, msg: $msg)"` +} + +func TestShurMutation(t *testing.T) { + query := new(alertMutation) + vars := map[string]interface{}{ + "type": graphql.String("hello"), + "token": graphql.String("123"), + "msg": graphql.String("321"), + } + + ctx := context.Background() + if err := client.Mutate(ctx, query, vars); err != nil { + t.Fatalf("%+v", err) + } +} diff --git a/golang/memory.pprof b/golang/memory.pprof deleted file mode 100644 index cbd82f74..00000000 Binary files a/golang/memory.pprof and /dev/null differ diff --git a/golang/src/demo/gocache-demo/main_test.go b/golang/src/demo/gocache-demo/main_test.go new file mode 100644 index 00000000..38e1a343 --- /dev/null +++ b/golang/src/demo/gocache-demo/main_test.go @@ -0,0 +1,104 @@ +/* +BenchmarkKVS/go-cache_insert-4 1000000 25018 ns/op 343 B/op 5 allocs/op +BenchmarkKVS/go-cache_get-4 2000000 8069 ns/op 64 B/op 2 allocs/op +BenchmarkKVS/go-cache_count-4 50000000 302 ns/op 0 B/op 0 allocs/op +BenchmarkKVS/sync.map_insert-4 1000000 17755 ns/op 322 B/op 9 allocs/op +BenchmarkKVS/sync.map_get-4 2000000 9097 ns/op 64 B/op 2 allocs/op +BenchmarkKVS/sync.map_count-4 50 552671238 ns/op 172 B/op 5 allocs/op + +BenchmarkInt64KVS/go-cache_insert-4 1000000 19597 ns/op 84 B/op 4 allocs/op +BenchmarkInt64KVS/go-cache_get-4 10000000 1848 ns/op 0 B/op 0 allocs/op +BenchmarkInt64KVS/go-cache_count-4 30000000 384 ns/op 0 B/op 0 allocs/op +BenchmarkInt64KVS/sync.map_insert-4 1000000 14937 ns/op 250 B/op 7 allocs/op +BenchmarkInt64KVS/sync.map_get-4 10000000 1135 ns/op 0 B/op 0 allocs/op +BenchmarkInt64KVS/sync.map_count-4 50 330416714 ns/op 103 B/op 3 allocs/op +*/ + +package main_test + +import ( + "math/rand" + "sync" + "testing" + "time" + + utils "github.com/Laisky/go-utils" + + "github.com/patrickmn/go-cache" +) + +func BenchmarkKVS(b *testing.B) { + goCache := cache.New(5*time.Minute, 10*time.Minute) + b.Run("go-cache insert", func(b *testing.B) { + for i := 0; i < b.N; i++ { + goCache.Set(utils.RandomStringWithLength(10), utils.RandomStringWithLength(10), cache.DefaultExpiration) + } + }) + b.Run("go-cache get", func(b *testing.B) { + for i := 0; i < b.N; i++ { + goCache.Get(utils.RandomStringWithLength(10)) + } + }) + b.Run("go-cache count", func(b *testing.B) { + for i := 0; i < b.N; i++ { + goCache.ItemCount() + } + }) + + syncMap := sync.Map{} + b.Run("sync.map insert", func(b *testing.B) { + for i := 0; i < b.N; i++ { + syncMap.Store(utils.RandomStringWithLength(10), utils.RandomStringWithLength(10)) + } + }) + b.Run("sync.map get", func(b *testing.B) { + for i := 0; i < b.N; i++ { + syncMap.Load(utils.RandomStringWithLength(10)) + } + }) + b.Run("sync.map count", func(b *testing.B) { + for i := 0; i < b.N; i++ { + syncMap.Range(func(k, v interface{}) bool { + return true + }) + } + }) +} + +func BenchmarkInt64KVS(b *testing.B) { + goCache := cache.New(5*time.Minute, 10*time.Minute) + b.Run("go-cache insert", func(b *testing.B) { + for i := 0; i < b.N; i++ { + goCache.Set(string(rand.Int63()), utils.RandomStringWithLength(10), cache.DefaultExpiration) + } + }) + b.Run("go-cache get", func(b *testing.B) { + for i := 0; i < b.N; i++ { + goCache.Get(string(rand.Int63())) + } + }) + b.Run("go-cache count", func(b *testing.B) { + for i := 0; i < b.N; i++ { + goCache.ItemCount() + } + }) + + syncMap := sync.Map{} + b.Run("sync.map insert", func(b *testing.B) { + for i := 0; i < b.N; i++ { + syncMap.Store(rand.Int63(), utils.RandomStringWithLength(10)) + } + }) + b.Run("sync.map get", func(b *testing.B) { + for i := 0; i < b.N; i++ { + syncMap.Load(rand.Int63()) + } + }) + b.Run("sync.map count", func(b *testing.B) { + for i := 0; i < b.N; i++ { + syncMap.Range(func(k, v interface{}) bool { + return true + }) + } + }) +} diff --git a/golang/src/demo/perf_demo/bounds_test.go b/golang/src/demo/perf_demo/bounds_test.go new file mode 100644 index 00000000..d5c59af4 --- /dev/null +++ b/golang/src/demo/perf_demo/bounds_test.go @@ -0,0 +1,44 @@ +package test + +import "testing" + +/* +BenchmarkBound/normal-4 200000000 7.69 ns/op 0 B/op 0 allocs/op +BenchmarkBound/reorder-4 300000000 5.49 ns/op 0 B/op 0 allocs/op +*/ +func BenchmarkBound(b *testing.B) { + var ( + v = make([]int, 9) + A, B, C, D, E, F, G, H, I int + ) + b.ReportAllocs() + b.Run("normal", func(b *testing.B) { + for i := 0; i < b.N; i++ { + A = v[0] + B = v[1] + C = v[2] + D = v[3] + E = v[4] + F = v[5] + G = v[6] + H = v[7] + I = v[8] + } + }) + + b.Run("reorder", func(b *testing.B) { + for i := 0; i < b.N; i++ { + I = v[8] + A = v[0] + B = v[1] + C = v[2] + D = v[3] + E = v[4] + F = v[5] + G = v[6] + H = v[7] + } + }) + + b.Log(A, B, C, D, E, F, G, H, I) +} diff --git a/golang/src/demo/perf_demo/escape.go b/golang/src/demo/perf_demo/escape.go new file mode 100644 index 00000000..46ba2525 --- /dev/null +++ b/golang/src/demo/perf_demo/escape.go @@ -0,0 +1,20 @@ +/* + ✗ go build -gcflags="-m -m" escape.go + +# command-line-arguments +./escape.go:8:6: can inline foo as: func(*P) { p = new(P); p.X = 1; p.Y = 2 } +./escape.go:8:10: foo p does not escape +./escape.go:9:9: foo new(P) does not escape +*/ + +package test + +type P struct { + X, Y int +} + +func foo(p *P) { + p = new(P) + p.X = 1 + p.Y = 2 +} diff --git a/golang/src/demo/perf_demo/false_sharing_test.go b/golang/src/demo/perf_demo/false_sharing_test.go new file mode 100644 index 00000000..ecd678d6 --- /dev/null +++ b/golang/src/demo/perf_demo/false_sharing_test.go @@ -0,0 +1,101 @@ +package test + +import ( + "sync/atomic" + "testing" +) + +type noPadding struct { + a, b, c uint64 +} + +type padding struct { + a uint64 + _p1 [8]uint64 + b uint64 + _p2 [8]uint64 + c uint64 +} + +func BenchmarkFakeSharing(b *testing.B) { + const nFork = 4 + b.ResetTimer() + b.Run("no padding individual var", func(b *testing.B) { + noPaddingData := new(noPadding) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + atomic.AddUint64(&noPaddingData.a, 1) + atomic.AddUint64(&noPaddingData.a, 1) + atomic.AddUint64(&noPaddingData.a, 1) + } + }) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + atomic.AddUint64(&noPaddingData.b, 1) + atomic.AddUint64(&noPaddingData.b, 1) + atomic.AddUint64(&noPaddingData.b, 1) + } + }) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + atomic.AddUint64(&noPaddingData.c, 1) + atomic.AddUint64(&noPaddingData.c, 1) + atomic.AddUint64(&noPaddingData.c, 1) + } + }) + }) + + b.ResetTimer() + b.Run("no padding all vars", func(b *testing.B) { + noPaddingData := new(noPadding) + for i := 0; i < nFork; i++ { + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + atomic.AddUint64(&noPaddingData.a, 1) + atomic.AddUint64(&noPaddingData.b, 1) + atomic.AddUint64(&noPaddingData.c, 1) + } + }) + } + }) + + b.ResetTimer() + b.Run("padding individual var", func(b *testing.B) { + paddingData := new(padding) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + atomic.AddUint64(&paddingData.a, 1) + atomic.AddUint64(&paddingData.a, 1) + atomic.AddUint64(&paddingData.a, 1) + } + }) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + atomic.AddUint64(&paddingData.b, 1) + atomic.AddUint64(&paddingData.b, 1) + atomic.AddUint64(&paddingData.b, 1) + } + }) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + atomic.AddUint64(&paddingData.c, 1) + atomic.AddUint64(&paddingData.c, 1) + atomic.AddUint64(&paddingData.c, 1) + } + }) + }) + + b.ResetTimer() + b.Run("padding all vars", func(b *testing.B) { + paddingData := new(padding) + for i := 0; i < nFork; i++ { + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + atomic.AddUint64(&paddingData.a, 1) + atomic.AddUint64(&paddingData.b, 1) + atomic.AddUint64(&paddingData.c, 1) + } + }) + } + }) +} diff --git a/golang/src/demo/ssl/README.md b/golang/src/demo/ssl/README.md new file mode 100644 index 00000000..5a83e986 --- /dev/null +++ b/golang/src/demo/ssl/README.md @@ -0,0 +1 @@ +Details: diff --git a/golang/src/demo/ssl/ca.crt b/golang/src/demo/ssl/ca.crt new file mode 100644 index 00000000..cd21d052 --- /dev/null +++ b/golang/src/demo/ssl/ca.crt @@ -0,0 +1,33 @@ +-----BEGIN CERTIFICATE----- +MIIFtTCCA52gAwIBAgIJAOdAgEw9U786MA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV +BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX +aWRnaXRzIFB0eSBMdGQwHhcNMTkxMDEwMDE1MzE0WhcNMjAxMDA5MDE1MzE0WjBF +MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 +ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC +CgKCAgEAz+vS5dvX9qqcjuxLnsNvq1KU4EJaLOrjfC/+aO40205/qIYHaeXGw+n0 +NxrccXDyXPsHXAGs/806g3Lc8wCuS43rmnpVjqdYLRnFege4OyG+7xmGGjPVtqBh +5agW7cfu8VOcV9Iv0nW/P2MYfN1PjUO4AFy5jaEssZF8av9fsplRKU0ud4ZTGIo3 +gPLPWu2YZRXQHYiMmodS6mn4RYncKTiVSMCkrcOv9rWe0j0JfJC2dIO1aAr/tL2r +7AKS8YchT4+cj/oqR0xIEfVURiYv0o/+PVeENZ/VngBv57qI6b3nEQByL89LyaJh +J+gjSOq9MSQhQQ5YLSkoWsAbOdVahT0IYUy8+GKRY+/98tCCB9k1/Pgwaqd0rfkT +QTtpokxYEmqIQYe/Et/ktOkgud0+isCSL0euo8t4qNkvgCpilEQWDpALIWHVisXk +XruKGnios78I7PNjaVTjq69If0ULl8QhCyYNYHNNoisRIlObdWVWxy5XKgpLutOW +6i8rJvc2CruMr0KWsJ3U8T5Q40uXteUa2o5wH4uvaQkxt0G9XA/iWX+S44blAZYJ +iVCE9Fh6yyimykqIxw+X8qBFjR9ej9jdT/NvfWcx4mbvrRWdDrISgRCckTzO7Oeu +7kGcHCf+a/PAx9NuLMdumrBDMgnejMwe3yanVhyCJZ8MQIsPcIsCAwEAAaOBpzCB +pDAdBgNVHQ4EFgQUyCYrzeVnSsrA100NRLRLRGgthPYwdQYDVR0jBG4wbIAUyCYr +zeVnSsrA100NRLRLRGgthPahSaRHMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpT +b21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGSCCQDn +QIBMPVO/OjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4ICAQDB4MnxGmYF +aPq0atZiqzJMtCC/y/WwsqHkU5Z3p7QC+S11VPI19F3RVpbMDoho/Z5Ds/PWAt6s +AZMoQAmdrst2at47/HQaLeIIGc68vHuBw3Lzzb5gg/USXihBzx9ugABlOb8h1S+T +YXT0TMXwJVgUQmW+2YNjKrd2O/s4PNw5CC3UXkBVdFs/+UG7xA6LSYK8tmX0n0py +pfZqiq0pS8k8JSCsTTmWAD1j3XbVPP+HIzNsKDmNjrrmXSWD7/BKz0Kt9UtmO/Fg +J0QB3zXVznR4rXpM4iQJ0U05Xpq8Km5n13xA8bof+go6nj0GrjA8nucnxH4AsDr6 +yZThU7dV/t2yQskE6eiwAAeN2xOzwQe9dysykTgnznqli7tiYy5U4hdeWR8Yz9DA +GcyJ7D1ultBKZ5hdoa9e+EQOtuMn8+2COHYbPErw7SBlk6ZtQ5kO/rvzYIrVJMbE +CWQCIdDWXNE2IrSchVVrLbcw97tk5FBoFSBUhBEq78zyDgRBiF+ygnT6n+v3YrT7 +/4Qp1sy58pwqnbmbHRPm9q94LGPN//nAbF6KxRe+o3VFOiNDTMD+3PRlICE6P+/Z +I0SAtTOxgZANGPKoRTslIWb/PDA7sHaGZoAIadKQlzJHtDOR1EFwJ6ABFQYz0bVJ +xD7xsZEsYPG8IDIHfH+zEivH7eb8eRbt/Q== +-----END CERTIFICATE----- diff --git a/golang/src/demo/ssl/ca.key b/golang/src/demo/ssl/ca.key new file mode 100644 index 00000000..1eab09e8 --- /dev/null +++ b/golang/src/demo/ssl/ca.key @@ -0,0 +1,54 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,50CDE54058CE3E87 + +K0CinPsBqwB1S7Wbdt2pJL3J2mCCeye8e7DGwCl+NmzvcJlae8PclAhjDIRQPh4/ +3rWlFty5hY9p1xQvrV4hnVG2fPK/9RwY3hReAY5fZyHJ5RFlfo8pQMvNUVEx5zcW +Td+AkTdFqGL4OARLrhBFz92YOuAMpodvHNzHTA07m8ywQ1zT/HJTs4A+AJAGwxk6 +6hApOYt/InkaZwnQdhy0MfCxdRKF3QM+52AtHMyc7pNLL3UETEkbW0jw3EmLyn8l +XLLFmwfZJJ458ZY4rtULSzmTvjWYmFGrHIXoZJu/71RWVRKMXuTHMAkXWzg2YzTi +ck5MkwcZ5/yKgF5QZCVIP1Su1C/Xx248aCQteL6wbgVzRa8ldMksePYzkDewdbOj +0InCJ3BAQSnTZpAr0kgsaOovWWD2T+9nRnROWmGry6qWxEL1TTriJB/VnbTa4I7Q +O15nlIH1Lq8gf8YY+UoxCYa4gML6E3OMri2Bvs/4vbybfWRqdJ9UMguBS/N1LYSS +WB+J0f/0fnOhv7T05emBeysSUev9IwLzhNTFwq/JF6owKlw2DqaApq/0ecUtYYoA +BH7lQR7mR9flEmvMODbP1xbR31QpmA0wI44+rSPxjfacr/E3abccUXCljqUyYWuC ++0Of1Hiq8T1hzMZjVmIeBx31TTp/Z7lnO16bqLX48KZHRXiqpWu/s0/On6s3h5f4 +WigSQuSRvAuuFBHI2XDrpspFiJVirkEoTtp1P52v/8qKjTYm+9ji/3ijuoFGrfnb +PZXdFCWqQVPgokGtFNJjA1vfs9LsDwmT7E8qAPmm4BeVStaNKfpfQqVEmhg6tYLi +pv4EqUbPX8Xp2ZRM4A2nU/vRZ/l27uIEWVzEeIXI+U/ernCUfr1hgZ02BLW09M1E +s3qxJr17rUi4fxTzMuwBwwCleB3RdM2qP8jkHi6dHRPW4oC2w+39szOM/4RjEIch +Lf0mmE5xKmEYF75tF9b0pXCW0ogM5fv6FyZJwDI4fdDglbIdtLUoqj+8apJORSKB +DhmJcioEKuRKMGN15xIgk5B0alb4PzvM1tQ6vwFjOXlMJm+9uzfIB7Cw9KZlQKyR +RxIVZ3iLAKcDadFrz8g3ZXdKocXiZulkQYUUQUTNcivlRv8eyggLLkSd0NM7lZYW +1N7BU10fvQRp9Oiub2Ye+ICINvojAuVbcbYmBFx8SkIxJpN0ccPIqSiJOMkO4zd3 +Xhqq/kubRctb+sWyXPtbFpHlOnrZqUuQI1zEZls71kX6Zxx2wc1w4jTc03VxqcgR +H43Tuxs9zJ5BmMr0Y91/aD78TSJyk3/+DwjMSNB1sb7rYujt/WshtHaMoA3wvaj3 +Fwke2IwOQjZNyEjCMIi0fmTW92sB04DYlsO9ySC8iPoamGV5Zb9RgKDtzih6y51B +awjrIiXPIKRw896FrMzZNBG3jYr2xgzAlXNrW0yQLBv1DwagOOs6myo5kGJFU2JT +gRcfoHliQpE62l9ZEQpQYAZMZvrgf9Ik78TRQRSA1vdyJopvJ+dxR0tijXmFGU5x +kr5Kdb3uOgWpbIgItaSS2wC1JhytZnQhd/1TlwJBdJRlm/M+Eqptr/jOLHNe/qkc +GIBnZI5nwSO6PsKyPObxPKOKT86wNY4j2JAXE51o0HAvyIVqDkRtCXvr905r3Sj3 +j4fK9OXthYDKEgmM1vQVxoHetPzIJojJ8RsIoxWOyUC9ohw2K7M9K6eRKs+AjKos +vf/B9HL3ARJmlbE2yFO3b15shbvwbeOif7WueCOAQtdg8XvT8ca1FLSnPD/eSA5A +xn5pPpZaViRKlArmCUjred3HZb1ool/XjHv5+G8rwcSuCYH9uI3rQzZ5eaV6M5un +tc6vICsI4eRvwtYwyQyB/PKV7pJ+/X812qyLcL5lMDPB34J+7h99wWgekk7FLHYa +yCZDwzllGGEVK5nQSd2mEpAaFcN6dO1dqilkjQEdZ8kCyzWIsPRyuiJUdC5S3z1y +Koq4Te/xCse/YLF/LtF5EVEr2wqtUggyXMRHEYSj0qcbwGcVPIhE/XCSfKIDA0IQ +n4IQ1wnd7a3AItVvbs2SMnxLDxmb/pyhk1kuNtTjgzFzWi4BOByh0t4U4UbNgS6Q +nEUKFI8NGDMGVRskRu1M97+TU/AXLL7gvFHxJqZOtXEzbQ3GYljbp6WmpjW8S2dX +b4TFnk2h/3Uqyylp+dba3rTs5ce3F5PACdzymDBpypBtNSCbmcrhvalXShqeIFPs +7Fy/O5wuU9darMMXRGi88Yf/BSSEr75K5ctUMPVl7hOuStNlEFCyAfLK0/l5pWC8 +twSiAaQrCWbDZgd5TMqu51/AeGWccUib6zEPzh2vXzMLC8Ce1mKmI8mK01RVAYtw +0Koed36u1kmf4Ft1+ei5TAGGE0F8oDYnpe82hhlBl/6/5nbyvEX7ubMyHwWkWYd3 +fjPw1iB/uojQwORzmyQvliLr2coMgcPLRpU8+44qY+HPeg5m7ZLU+/xPvlfgxoYG ++Jimj4YwUjBPc3enknl7GHJBcAW1PStpmBVVDhHo5CZYsXLzO2NRt/E0Gf1Lf1J7 +BFBCk1smOFpQKAO3mA4P7ym0s15+ilFE66Nv7oPhcmTWHGtfJeqXlKw0JMnqhiD0 +TwZzFFirogc47NJYQQA8ZTXOV2SocpL3xgoVUI8NBs5lJf/ZP0PXX0bgcD3fNQBW +SmqphspBXyxHSeuaPTLZAxjzCSsXFGn4iaynzR43k9pKCTf6/VIet29C4HzJFs0T +nz4UxCv9oeRVKZK9EMLiCM0Ayxb21Ali8Kku6KpHOG3jfw1npSVKORvFaeuVAKVb +O9z+qkBnjW0V16cFpZWpw3Z+puTBm7BNp5IID68Ysqs67AtU90LAZtBqIQDjVoGn +TG9//+UUDQVkUFOD/wRSHWmV/0EBPVfxwS5JYJ6g+pSfIZ+CXMuj7ekeOOOlpuH1 +dNoNV8ZNrXeFEMVEwsWSfqSv6sFj+pLShGPgYtF5DR0zZLhkomEdGL03obw0LmPx +tUJnn3uGtEvhN6RSrQUXRxUqWTZ1QekI/sw/rxbQaryJ7rW7fk6ziDbOr+73HMoZ +Jxjkv6ylp6ghfcQ3KEOW0WtuAUjJGZZARO2QftVE6tj9aVQ6M41oh+XY9P17ij5e +-----END RSA PRIVATE KEY----- diff --git a/golang/src/demo/ssl/ca.key.text b/golang/src/demo/ssl/ca.key.text new file mode 100644 index 00000000..cf742648 --- /dev/null +++ b/golang/src/demo/ssl/ca.key.text @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEAz+vS5dvX9qqcjuxLnsNvq1KU4EJaLOrjfC/+aO40205/qIYH +aeXGw+n0NxrccXDyXPsHXAGs/806g3Lc8wCuS43rmnpVjqdYLRnFege4OyG+7xmG +GjPVtqBh5agW7cfu8VOcV9Iv0nW/P2MYfN1PjUO4AFy5jaEssZF8av9fsplRKU0u +d4ZTGIo3gPLPWu2YZRXQHYiMmodS6mn4RYncKTiVSMCkrcOv9rWe0j0JfJC2dIO1 +aAr/tL2r7AKS8YchT4+cj/oqR0xIEfVURiYv0o/+PVeENZ/VngBv57qI6b3nEQBy +L89LyaJhJ+gjSOq9MSQhQQ5YLSkoWsAbOdVahT0IYUy8+GKRY+/98tCCB9k1/Pgw +aqd0rfkTQTtpokxYEmqIQYe/Et/ktOkgud0+isCSL0euo8t4qNkvgCpilEQWDpAL +IWHVisXkXruKGnios78I7PNjaVTjq69If0ULl8QhCyYNYHNNoisRIlObdWVWxy5X +KgpLutOW6i8rJvc2CruMr0KWsJ3U8T5Q40uXteUa2o5wH4uvaQkxt0G9XA/iWX+S +44blAZYJiVCE9Fh6yyimykqIxw+X8qBFjR9ej9jdT/NvfWcx4mbvrRWdDrISgRCc +kTzO7Oeu7kGcHCf+a/PAx9NuLMdumrBDMgnejMwe3yanVhyCJZ8MQIsPcIsCAwEA +AQKCAgEAjAs8+9F9vwjfdmy16nOcjXqMCBjpAAQdwRHae/al52kSFwJfj/ZSULcN +5OfUvxviQrpaFKCUU5953/vH0m0M+JrYrC3l3rXccFRBbJYygrGSFx3L824ibmXM +SpFTEElwKV+1mHlb+JeSfzFR1xiBcpbAIo5R9JEwt1FUygTEAlm+DuGLgLoa0haW +l+XzwDz0PnHYwWutuI+ZS4ag0MWwYptYAa6vvNJnfPaLyPOPpjUaj5P+5dsyrBxs +5gQ90SzBRQNn4poPTAKXMHFbl/w0jdCq38pIpI3JpiiJNz2u5jEgp5TzVDx9wYv7 +gJOc4IorcCPzugvdXF2ybp2iOOv5kTkFI+RjXTTzm8nMpx8Zh4fbh4QPuLzeVBvh +dDrfsds2C6LVOMIwUZapGCClD4zqi+HhFEw3CJYBw7WdN4rwpVJ2LjvRYomXb4js +ml4qtdQWPLB1Eds1XXY4XAXzlvAFFn5j8WUl6wq3gadsQL1A3tgB0+qn78kEaW4H +wItzu59/aTQlAbPLkT6sDGVC6Uc9cBqNIXnD3Cw2drYfcwhVVPWUa0SMrqSQW/29 +vXl0hPQxksqPbvX+21gVqHd2yghyauc0GBi6N3Ax09n67HVlNG7ekSrzeCxktZfz +xetkWtzl1UmAc5vZKHEJcz3rd8eTQNEn/EEPpGjb9wQ3q5TbxJECggEBAPi0QpPv +LNg6UeJlpC+VB07hI4yjSTKivDJ9MQgWpsZ79KA12TgSHuhcjfLEeZtwEbkHLN0I +EEpGyndfZAMTgF4eO3ZwIc1qLMrA1BGhcgzFTH0yQzWCZfB95mpmG7w+GHAGAR/r +o91+P4+iVuDXP4kYZJYdX1Z6zMsZm6oep3rtUzXfBI7eq+KK6Rf5vyGC5AYdX0iA +BNW8YHWqV4t9G4SpIeP1kqbv9zhKx6c3fxCo41XU3Olj1eeZNyljHsZiKgQpbS74 +vA7rx4LfC+QRBHFnMxG5J/KjzHGOOPA6R2jEQvmDbg3fdKsOcsteDgihh7qJcSGX +o5fY+Wx3RZdPUy8CggEBANYFSdOFQfmpdBRAC6hnQE2gyoeLPz0sgNL589++IRMx +gLZmzP5Nh6aCZQGsjJzqYwMhPN4iLmzw55tZj+vr2OxE6DXIDuJ6+QWWsy+XgwWY +0VZEAR1mkjBjk7R90ifY3IF6ZSxycOATKsyf2H0FrJfvBpPXmrNT7PC3ZwVyhw1t +VKTU9wG50mcG7QMkQ+Xu9vbpXmvkueTf+5ILD7oZhwN/FZIsW84ui3YyfsNsY93N +ewxHotAxitMzeCwoKq8SEX9LQYOrokHedOxCyuDU/5HPOfGjfqHutUKh1wSDss0e +YSqkvLJ++k4IAJnAypUnTehYSJtuMme1LaKB9Y46kWUCggEAVqIMMxX0jBm8nl2D +lOOX2R1J0dqrS80uO3QqmUOysp9JNmmrkgGV7KEY/UD9j2y5b7eVJCWD7yu7qVt8 +Lioj5CUp13b1/2UF11bWSJHxdYtgupfAm6ohsmVY1yVccfU7dAJTb/gYa7Znk7Qc +CVRRmIL7vuLaa/h40CLKe7cT5hk3jCN0pgPg4hg7XBOuRZEftxWSNGILzRxCiZpd +xoQ9CrgTyyGnBSm/90btR01ooLgEAMkWbuJNB9DySyNw+/AD7NE1bFBOye/N3sOt +k7Nt1cb6HileRgJS3BeLs/rJFzCOl/X1ZzW4oUF2MWtA/jauXgc0dlwpK2L0d5kQ +j8WdFwKCAQBTI9zJGcRGa2iXkUW2Ft4pCeSDgTmA1y/4RXdSnLaWkS1yLj9GLvIa +Yh9A5jn9nyP1jEzr8hVc5rziYYmCWa18I0ydz+jQXHsui5tySoZwfywbOfHA7R6v +Q4+WlyYzqpAGkHiLKq3kri17LkFYWALzRrykZCZJsbmizWxs9k+2jJlMKxsFhZ1R +vqQGC2mBAjLYOlIe0czRN52v3zIt1krXtd+4WBkV4Ij20qjh29Jz0KYTYCTEgepv +H1h4tuXV+svnSmHZ96vhsLx1J4FOlA/wIbNdxmikGWo6x0oTC+JCwqF2gmZ3ZNJx +y7QIBpfsF0exkdIq50UXeo+OyLOOm/vtAoIBAA/ylkFY557Q1y26qsuTH9XZdKCd +uJXdE+u79wl1H3Mqs/QzGFYVtDfeUAdrOj3YobO8h9HwesgdvOA8hojXdAYe+9hl +hD2cEZueKJKjrntaLEkC2we5hSimipOiyNXGTGy0mKtbFFOQfC5KtOJrshkTfRau +M1KHvk6eCxHbiYM6uqt1mFlrH2HWwuUO7HpzzYWoh3dCwLgHQm+W/1RFh/QDIgNv +0q+xv84s2yrf02xVnwaQOwOUL7lbl2ydcFxS8xY9r25BGxg1bbQ2mKYmrLcPFHyM +w5gTV8nloEjpPXC+lcnrBpTq9WG9gUdcVMVGyQCI9xYUJtiK3S53nGniITU= +-----END RSA PRIVATE KEY----- diff --git a/golang/src/demo/ssl/client.crt b/golang/src/demo/ssl/client.crt new file mode 100644 index 00000000..bda710c9 --- /dev/null +++ b/golang/src/demo/ssl/client.crt @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDpDCCAYwCAQEwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQVUxEzARBgNV +BAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 +ZDAeFw0xOTEwMTAwNzI0MjBaFw0yMDEwMDkwNzI0MjBaMG8xCzAJBgNVBAYTAmNu +MQ4wDAYDVQQIEwVzdGF0ZTEPMA0GA1UEBxMGbGFpc2t5MQ4wDAYDVQQKEwVwYXRl +bzENMAsGA1UECxMEcGFhczEMMAoGA1UEAxMDY3poMRIwEAYJKoZIhvcNAQkBFgNs +bGwwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKbKFqIibZ6yyQ6uPQDj1JmB +yV1T9SPy5lvzrVf4J6Or9wryjLRdLiE/HghEcaqfUYGJ+scA+f3Ihh4MxbJUeDQv +P6Ah/+33tM9HKKN+hSdMhcOmN/Wv1/hNY/g6ylcdV+OBv4avGZZgJLriNX2hkn+3 +fD+WCp/EWfkSA6qi32NxAgMBAAEwDQYJKoZIhvcNAQEFBQADggIBAGC9h+fuSkWA +hAKZhbQ7fGaDBKiN6yIZ0eAQZjRw28nM7SzfIyHFiiHXAf9NWgykk2vSqNLeXkkR ++nBYv1bIOhnnWjiKlSWnew1H/ix14EHigK0rZHCOPqV9E6bmbXA+MChk/B+ryVsL +rMRtM3MARrKbPZOMyyLTBKrOFGwxyLPtkIafwWj4/ibQ5wt1j2VEoCEyZpXhIRAk +3U1yIUKmQ/3OxWoTsCzolwEWfrVNw1RClVFyHrS4xaK6SkeiT3goz44CyV37opCN +iXeyC2VARmHcGhTH0fiJjbhUnuMhaJyTq0fVo4hgdH48lBMMptEt8ElIlSpOQyVP +7YnwS0gDpZK8JxoghMeGbMKoZKtAWJYMTOcD0l4HoKqYLYrTuhIzokJ6DrmFA+rX +Z/Z0IAXXVD/vPTVOrrRsWHQPKqkiIhvQe0dSX7m62SsuFOb5Efrk6s1vtRrfNeCf +WByFeqdBWsmWd8VZTL+BEzrBcB/NkuVdo1+crQWyw/e3tyHW6r06MWJS+alWp2uS +JhT2fzBigx+ipDRs+RRnaMmd69ddV3zfE2Ch7Jst1uYZQsC9sYyXxv5NHKAhgBuY +HOwD1SbspdXlPMgph54dL0JPQZAsWvT5SQSZ9ER4tiO/U+f3U3ixGDZhiTOwALp6 +eWApK+Slh2Q3gGS3k32I4A7P45QN/+kb +-----END CERTIFICATE----- diff --git a/golang/src/demo/ssl/client.csr b/golang/src/demo/ssl/client.csr new file mode 100644 index 00000000..f497de63 --- /dev/null +++ b/golang/src/demo/ssl/client.csr @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIBrzCCARgCAQAwbzELMAkGA1UEBhMCY24xDjAMBgNVBAgTBXN0YXRlMQ8wDQYD +VQQHEwZsYWlza3kxDjAMBgNVBAoTBXBhdGVvMQ0wCwYDVQQLEwRwYWFzMQwwCgYD +VQQDEwNjemgxEjAQBgkqhkiG9w0BCQEWA2xsbDCBnzANBgkqhkiG9w0BAQEFAAOB +jQAwgYkCgYEApsoWoiJtnrLJDq49AOPUmYHJXVP1I/LmW/OtV/gno6v3CvKMtF0u +IT8eCERxqp9RgYn6xwD5/ciGHgzFslR4NC8/oCH/7fe0z0coo36FJ0yFw6Y39a/X ++E1j+DrKVx1X44G/hq8ZlmAkuuI1faGSf7d8P5YKn8RZ+RIDqqLfY3ECAwEAAaAA +MA0GCSqGSIb3DQEBBQUAA4GBAJnGij+wkG9IN5gAsI+UNVc4Ls8iwsvRSFB2751U +ciEtxGlYurTsHgP0LYHDRDuus01yxkD38UdJFwt2lCr+pyc3gDa5MnZ1R1E5m7Jx +u8pen03AmC5jEeA+3tW23RcPj7Cdq2hf7oguR/htJTA9LFcCBmrROi8VTIdI07fU +le5b +-----END CERTIFICATE REQUEST----- diff --git a/golang/src/demo/ssl/client.key b/golang/src/demo/ssl/client.key new file mode 100644 index 00000000..91e586e6 --- /dev/null +++ b/golang/src/demo/ssl/client.key @@ -0,0 +1,18 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,F8AE9065E5E0E8A3 + +LlKvrxNOWjlVneIf+3bV0krkeNyz+Pf/UmfbL7JMtWq/wiu0lHOBTicNo+8SC3IQ +P1Lv95iLFpxWcwKsunV1LsfROciZzD+J3IRzow4gNjzAKVIT1gQQdukECmjxRYHm +aHfuvgDdLSi/7ERGxVDj4qBMQ+vCLKkrL0/ZTDVtECDdDJxEqP1sehMNeo7u1EZg +jHLkubb/uJPo7iygNZDZ2BvF9qnLuY7Tkd8jQmSFIsmIIXvHMVkfFDFeBo/7RuG3 +/RIUc+wpf8rN0J1EAumh6oZrH5K35/V5GLxdsGYNZ5DzS/lp3txw++zad3CjA/Qa +xxTZviIJEk4t/0choKvmIFgOw7vb9ZoFTpkSS4yDzCivN4o26qum+KCEuCnOJ/D/ +k4qidrM2vPRXnAw11nSu9eZvRXrr0bWEDMBDIorKLgUcG5vxmptjOzdbo4wK1N+A +ZCeViX2vH38YfmYY9Bt28HWtwQkuNP6uG6hc35DtxUzX1ffrl8QC3QwkT00O6FQI +S1V0/9XzeDXI7EYOVCUto/5Dk9OgmoJOQVnnuawRo+TYegwYOBCDPKQ//F0oLG6+ +ffXkbL5a9+8FdvsAMOa8T42ZOMlF33oiwYD+I2SUVvdJ9C2pWQa/lENpphUaY2yN +JwwmaOiRmkEhsZPQibv7Y5xiKzktJtM1/hnKXKwg4yQFoY1/pxGai+RnKwSnK5cu +gIJmGmyXUq8Kq5eYGjfr69ht54+4bkEXhQM+XlzfW+gcAG8RCd5T2Oz4F3bY9koG +5tOpzBLUuBxbm23ClsH+wBJ/nLJoNBt9qWTrfUfiScRxmukl/7gKCQ== +-----END RSA PRIVATE KEY----- diff --git a/golang/src/demo/ssl/client.key.text b/golang/src/demo/ssl/client.key.text new file mode 100644 index 00000000..f01a01ce --- /dev/null +++ b/golang/src/demo/ssl/client.key.text @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQCmyhaiIm2esskOrj0A49SZgcldU/Uj8uZb861X+Cejq/cK8oy0 +XS4hPx4IRHGqn1GBifrHAPn9yIYeDMWyVHg0Lz+gIf/t97TPRyijfoUnTIXDpjf1 +r9f4TWP4OspXHVfjgb+GrxmWYCS64jV9oZJ/t3w/lgqfxFn5EgOqot9jcQIDAQAB +AoGAEqBpDKxZn6qJx6jvySSofog/C7wvmVcsIMLC7hsZmi6/RSq3SgFKAI6C9Rtn +sk1eld/p8MWMJap6R+rXPUYvsj4YCBhzaYppQ2zQdkp6ehA20Foy3gLVrSc9LktX +vyiAZ0Gk1U4plN+0K6q/IPLQ7iGP/ZhEfJOFPW+whqgV8O0CQQDRoGETMNXX9GPT +nXJlYhIKo6XY2vdo/4GLi2D5qED4R0zPVnu2FrhI+786meVqi3NgwbCWckr+VO9N +d2q/Y7ljAkEAy6+/wgz4OxNtTWwX2Ld5MuHaDOjcW+m1TMPLqtVl/ViCwhO8EE9l +nj3RDhlQcXGyQS2p9P54hS2LJt7slfyyGwJBAIRvSmURaUhyAc9jnS4n8zX9hX2n +eL9BDNrYR3/yqHkysngbLzUuzWZuhbXEHIhfaZkrRSEHPBHKHxVV6H7ZxfkCQEjD +fAligLr58a4a01oEETPwIulBtpbPIolN2NAqc8jRecTDMAfTlUW2Z5xVxrsAFuHZ +4kE3Nu68ml1EfdgG8ckCQQDJjHw2lZQbJGyrg7V0o3tOSPiyA6KPGwES8IJRuL7o +wYWUbvrJmhZ9RNQUgeIFE6npESMvKj3nX/RROzrG9s1j +-----END RSA PRIVATE KEY----- diff --git a/golang/src/demo/ssl/client/client.go b/golang/src/demo/ssl/client/client.go new file mode 100644 index 00000000..6e9dbff4 --- /dev/null +++ b/golang/src/demo/ssl/client/client.go @@ -0,0 +1,126 @@ +package main + +import ( + "bufio" + "crypto/tls" + "crypto/x509" + "time" + + "github.com/Laisky/go-utils" + "github.com/Laisky/zap" +) + +var ( + clientKey = []byte(`-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQCmyhaiIm2esskOrj0A49SZgcldU/Uj8uZb861X+Cejq/cK8oy0 +XS4hPx4IRHGqn1GBifrHAPn9yIYeDMWyVHg0Lz+gIf/t97TPRyijfoUnTIXDpjf1 +r9f4TWP4OspXHVfjgb+GrxmWYCS64jV9oZJ/t3w/lgqfxFn5EgOqot9jcQIDAQAB +AoGAEqBpDKxZn6qJx6jvySSofog/C7wvmVcsIMLC7hsZmi6/RSq3SgFKAI6C9Rtn +sk1eld/p8MWMJap6R+rXPUYvsj4YCBhzaYppQ2zQdkp6ehA20Foy3gLVrSc9LktX +vyiAZ0Gk1U4plN+0K6q/IPLQ7iGP/ZhEfJOFPW+whqgV8O0CQQDRoGETMNXX9GPT +nXJlYhIKo6XY2vdo/4GLi2D5qED4R0zPVnu2FrhI+786meVqi3NgwbCWckr+VO9N +d2q/Y7ljAkEAy6+/wgz4OxNtTWwX2Ld5MuHaDOjcW+m1TMPLqtVl/ViCwhO8EE9l +nj3RDhlQcXGyQS2p9P54hS2LJt7slfyyGwJBAIRvSmURaUhyAc9jnS4n8zX9hX2n +eL9BDNrYR3/yqHkysngbLzUuzWZuhbXEHIhfaZkrRSEHPBHKHxVV6H7ZxfkCQEjD +fAligLr58a4a01oEETPwIulBtpbPIolN2NAqc8jRecTDMAfTlUW2Z5xVxrsAFuHZ +4kE3Nu68ml1EfdgG8ckCQQDJjHw2lZQbJGyrg7V0o3tOSPiyA6KPGwES8IJRuL7o +wYWUbvrJmhZ9RNQUgeIFE6npESMvKj3nX/RROzrG9s1j +-----END RSA PRIVATE KEY-----`) + clientCrt = []byte(`-----BEGIN CERTIFICATE----- +MIIDpDCCAYwCAQEwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQVUxEzARBgNV +BAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 +ZDAeFw0xOTEwMTAwNzI0MjBaFw0yMDEwMDkwNzI0MjBaMG8xCzAJBgNVBAYTAmNu +MQ4wDAYDVQQIEwVzdGF0ZTEPMA0GA1UEBxMGbGFpc2t5MQ4wDAYDVQQKEwVwYXRl +bzENMAsGA1UECxMEcGFhczEMMAoGA1UEAxMDY3poMRIwEAYJKoZIhvcNAQkBFgNs +bGwwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKbKFqIibZ6yyQ6uPQDj1JmB +yV1T9SPy5lvzrVf4J6Or9wryjLRdLiE/HghEcaqfUYGJ+scA+f3Ihh4MxbJUeDQv +P6Ah/+33tM9HKKN+hSdMhcOmN/Wv1/hNY/g6ylcdV+OBv4avGZZgJLriNX2hkn+3 +fD+WCp/EWfkSA6qi32NxAgMBAAEwDQYJKoZIhvcNAQEFBQADggIBAGC9h+fuSkWA +hAKZhbQ7fGaDBKiN6yIZ0eAQZjRw28nM7SzfIyHFiiHXAf9NWgykk2vSqNLeXkkR ++nBYv1bIOhnnWjiKlSWnew1H/ix14EHigK0rZHCOPqV9E6bmbXA+MChk/B+ryVsL +rMRtM3MARrKbPZOMyyLTBKrOFGwxyLPtkIafwWj4/ibQ5wt1j2VEoCEyZpXhIRAk +3U1yIUKmQ/3OxWoTsCzolwEWfrVNw1RClVFyHrS4xaK6SkeiT3goz44CyV37opCN +iXeyC2VARmHcGhTH0fiJjbhUnuMhaJyTq0fVo4hgdH48lBMMptEt8ElIlSpOQyVP +7YnwS0gDpZK8JxoghMeGbMKoZKtAWJYMTOcD0l4HoKqYLYrTuhIzokJ6DrmFA+rX +Z/Z0IAXXVD/vPTVOrrRsWHQPKqkiIhvQe0dSX7m62SsuFOb5Efrk6s1vtRrfNeCf +WByFeqdBWsmWd8VZTL+BEzrBcB/NkuVdo1+crQWyw/e3tyHW6r06MWJS+alWp2uS +JhT2fzBigx+ipDRs+RRnaMmd69ddV3zfE2Ch7Jst1uYZQsC9sYyXxv5NHKAhgBuY +HOwD1SbspdXlPMgph54dL0JPQZAsWvT5SQSZ9ER4tiO/U+f3U3ixGDZhiTOwALp6 +eWApK+Slh2Q3gGS3k32I4A7P45QN/+kb +-----END CERTIFICATE-----`) + caCrt = []byte(`-----BEGIN CERTIFICATE----- +MIIFtTCCA52gAwIBAgIJAOdAgEw9U786MA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV +BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX +aWRnaXRzIFB0eSBMdGQwHhcNMTkxMDEwMDE1MzE0WhcNMjAxMDA5MDE1MzE0WjBF +MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 +ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC +CgKCAgEAz+vS5dvX9qqcjuxLnsNvq1KU4EJaLOrjfC/+aO40205/qIYHaeXGw+n0 +NxrccXDyXPsHXAGs/806g3Lc8wCuS43rmnpVjqdYLRnFege4OyG+7xmGGjPVtqBh +5agW7cfu8VOcV9Iv0nW/P2MYfN1PjUO4AFy5jaEssZF8av9fsplRKU0ud4ZTGIo3 +gPLPWu2YZRXQHYiMmodS6mn4RYncKTiVSMCkrcOv9rWe0j0JfJC2dIO1aAr/tL2r +7AKS8YchT4+cj/oqR0xIEfVURiYv0o/+PVeENZ/VngBv57qI6b3nEQByL89LyaJh +J+gjSOq9MSQhQQ5YLSkoWsAbOdVahT0IYUy8+GKRY+/98tCCB9k1/Pgwaqd0rfkT +QTtpokxYEmqIQYe/Et/ktOkgud0+isCSL0euo8t4qNkvgCpilEQWDpALIWHVisXk +XruKGnios78I7PNjaVTjq69If0ULl8QhCyYNYHNNoisRIlObdWVWxy5XKgpLutOW +6i8rJvc2CruMr0KWsJ3U8T5Q40uXteUa2o5wH4uvaQkxt0G9XA/iWX+S44blAZYJ +iVCE9Fh6yyimykqIxw+X8qBFjR9ej9jdT/NvfWcx4mbvrRWdDrISgRCckTzO7Oeu +7kGcHCf+a/PAx9NuLMdumrBDMgnejMwe3yanVhyCJZ8MQIsPcIsCAwEAAaOBpzCB +pDAdBgNVHQ4EFgQUyCYrzeVnSsrA100NRLRLRGgthPYwdQYDVR0jBG4wbIAUyCYr +zeVnSsrA100NRLRLRGgthPahSaRHMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpT +b21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGSCCQDn +QIBMPVO/OjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4ICAQDB4MnxGmYF +aPq0atZiqzJMtCC/y/WwsqHkU5Z3p7QC+S11VPI19F3RVpbMDoho/Z5Ds/PWAt6s +AZMoQAmdrst2at47/HQaLeIIGc68vHuBw3Lzzb5gg/USXihBzx9ugABlOb8h1S+T +YXT0TMXwJVgUQmW+2YNjKrd2O/s4PNw5CC3UXkBVdFs/+UG7xA6LSYK8tmX0n0py +pfZqiq0pS8k8JSCsTTmWAD1j3XbVPP+HIzNsKDmNjrrmXSWD7/BKz0Kt9UtmO/Fg +J0QB3zXVznR4rXpM4iQJ0U05Xpq8Km5n13xA8bof+go6nj0GrjA8nucnxH4AsDr6 +yZThU7dV/t2yQskE6eiwAAeN2xOzwQe9dysykTgnznqli7tiYy5U4hdeWR8Yz9DA +GcyJ7D1ultBKZ5hdoa9e+EQOtuMn8+2COHYbPErw7SBlk6ZtQ5kO/rvzYIrVJMbE +CWQCIdDWXNE2IrSchVVrLbcw97tk5FBoFSBUhBEq78zyDgRBiF+ygnT6n+v3YrT7 +/4Qp1sy58pwqnbmbHRPm9q94LGPN//nAbF6KxRe+o3VFOiNDTMD+3PRlICE6P+/Z +I0SAtTOxgZANGPKoRTslIWb/PDA7sHaGZoAIadKQlzJHtDOR1EFwJ6ABFQYz0bVJ +xD7xsZEsYPG8IDIHfH+zEivH7eb8eRbt/Q== +-----END CERTIFICATE-----`) +) + +const ( + addr = "127.0.0.1:24444" +) + +func main() { + cliCrt, err := tls.X509KeyPair(clientCrt, clientKey) + if err != nil { + utils.Logger.Panic("try to load key & crt got error", zap.Error(err)) + } + + // load ca + caCertPool := x509.NewCertPool() + caCertPool.AppendCertsFromPEM(caCrt) + + // https tls config + tlsConfig := &tls.Config{ + Certificates: []tls.Certificate{cliCrt}, + RootCAs: caCertPool, + InsecureSkipVerify: true, + } + tlsConfig.BuildNameToCertificate() + + conn, err := tls.Dial("tcp", addr, tlsConfig) + if err != nil { + utils.Logger.Panic("try to dial tcp got error", zap.Error(err)) + } + defer conn.Close() + + writer := bufio.NewWriter(conn) + utils.Logger.Info("start writing") + for { + utils.Logger.Info("sending...") + if _, err = writer.WriteString("hello, world\n"); err != nil { + utils.Logger.Panic("try to write got error", zap.Error(err)) + } + if err = writer.Flush(); err != nil { + utils.Logger.Panic("try to flush got error", zap.Error(err)) + } + time.Sleep(1 * time.Second) + } +} diff --git a/golang/src/demo/ssl/csr.json b/golang/src/demo/ssl/csr.json new file mode 100644 index 00000000..ca0cb1a3 --- /dev/null +++ b/golang/src/demo/ssl/csr.json @@ -0,0 +1,12 @@ +{ + "CN": "127.0.0.1:24444", + "names": [ + { + "C": "US", + "L": "San Francisco", + "O": "Internet Widgets, Inc.", + "OU": "WWW", + "ST": "California" + } + ] +} diff --git a/golang/src/demo/ssl/server.crt b/golang/src/demo/ssl/server.crt new file mode 100644 index 00000000..8012352a --- /dev/null +++ b/golang/src/demo/ssl/server.crt @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDnjCCAYYCAQEwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQVUxEzARBgNV +BAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 +ZDAeFw0xOTEwMTAwNzEyMjdaFw0yMDEwMDkwNzEyMjdaMGkxCzAJBgNVBAYTAmNu +MRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRz +IFB0eSBMdGQxIjAgBgNVBAMTGTEyNy4wLjAuMToyNDQ0NCwxMjcuMC4wLjEwgZ8w +DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALOC5Y1g6gSBk2knkxj6wcKJK801bHzh +ig38nBuxeR1+dWfwC6u59Spd301VUGbbgn0NJtz6RyIhtB6uq5Wkep2396Ry5UEO +e1rkvmbgN0L3GNio1x+dw6nRzGSULFikFperIpX89khUWRqQOO7M+winCu4XNWnW +BdNhB+2ITR4ZAgMBAAEwDQYJKoZIhvcNAQEFBQADggIBAGoP0P6zIQpXUzZrFalI +J97f1hzkW+BwqZ0XtYWF+8Tb2aWHfr6CmU20XezoJ84eE5cAc5XcWB2ez5ETznq4 +7NXA31lN/khjJJUxKkJhE1Ct9E+e6gGMn4DR0ZdlfvPp72KqTBhe24bnSSGcS34d +AGtkN1EpexIONXYGARCANWTMe4cQgmaKN09raTxEuVM+jrGDiMfaSm0st2zO/l/S +EcQ2UQ1XLoUOqCrjFM038vxKvFvEkdDaz5VdoPCDGb0pVxYCj70ClD7VOWGIl70a +37Tih9K5FH3VKMQQwZjeB/2Mxn5JkGthRCi/G2H7CCw1gAXphhvPWYar/lVDDGNv +7BlmNwwHDnsG/i/EB9ieUhSdGdbJ8rBZ6gSGx4cWFSRPhIsDO+GZClvjgs8LXN7m +1mfCwF4RmuBSzcPY/QQCnpSH6mYqn7fOaKMCKwQL3x5V7aif2UfG94CTJL2LnRkw +dB3rgzHqbwKiS4iXvaNSehIm0mzw0aNN81kmStCB5NmHv66YIFlznss0iH+QUf6y +/hdqWwd1FW1drzj4OKY23V3e64+AkEzRyWk6SVpLCZuxqAys4ooiYH+bj0GDsrLc +fxpOUjHiuboitqxZ8fE+pVGbGXQWHrtwRg02l9ga5Rainyo4gAj+Zoiy/acbuMDV +bd2si0VgwJ2KiU68GiRJr1ck +-----END CERTIFICATE----- diff --git a/golang/src/demo/ssl/server.csr b/golang/src/demo/ssl/server.csr new file mode 100644 index 00000000..07f320a9 --- /dev/null +++ b/golang/src/demo/ssl/server.csr @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIBqTCCARICAQAwaTELMAkGA1UEBhMCY24xEzARBgNVBAgTClNvbWUtU3RhdGUx +ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEiMCAGA1UEAxMZMTI3 +LjAuMC4xOjI0NDQ0LDEyNy4wLjAuMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC +gYEAs4LljWDqBIGTaSeTGPrBwokrzTVsfOGKDfycG7F5HX51Z/ALq7n1Kl3fTVVQ +ZtuCfQ0m3PpHIiG0Hq6rlaR6nbf3pHLlQQ57WuS+ZuA3QvcY2KjXH53DqdHMZJQs +WKQWl6silfz2SFRZGpA47sz7CKcK7hc1adYF02EH7YhNHhkCAwEAAaAAMA0GCSqG +SIb3DQEBBQUAA4GBABax4w7wgn7Llgp457NkCtJgFs1bizX4ySoX/GIoZI8VuYYW +XE2ov0FbFfV8G7SG+2yY6Z9yYbDUT59V/5v73MSNLnkcc6HQybQr4v6t1MJMzRIT +6KLMWqXdeluHTW3A5csAtIYDPPcuj/T2rmmndeh52NJCLPmEqtGO2FVzX7lE +-----END CERTIFICATE REQUEST----- diff --git a/golang/src/demo/ssl/server.key b/golang/src/demo/ssl/server.key new file mode 100644 index 00000000..61674a61 --- /dev/null +++ b/golang/src/demo/ssl/server.key @@ -0,0 +1,18 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,CD504D99958AE6B8 + +rgMkaV8OwDQdUr0nhHQKjKtZVUahAX17EM60oDwa7+gfPEHl+m/e339mW3/x0BoC +9cw4s3FVOC3YztAswTJ53uiEumFF4Bd0zI6Jo/UjkEN0fdMa4SqhMK5fZ7sanJlY +b0HvxgSM5bjLnEOkZcYHt/2cA30moK9QIAvh65I4MBlkLrz/i7M7QraXy/ccEoJH +xtZbYbFBSNQB01GzkPJBP0L36AI5jUurL+9qzRZzhVZtEmi9WmvVr9hBnHGLLmJD +OpPl7vhd6T04cIdT30DkgEK0OPdG2JkCav1bmDSL4E33QuX9D0VmpCyftKkh2N/w +nRBFT9vQbJ45O+qPy2sOOW22GHCji3bcbYzS2IE1siOMJuI+Rgvwy9ELPjE5Yfjv +Q+G1yxgYBmwSTWJRBXAEFGJRGdv43lJzwOXppytHVHoYg2tjQvC4cuOJaciXssrP +Yp6S/YKhMfuCJ3DvWnBA5SZ8yihrnJEzbOnkJOZDoK4nyXfdlgaBEWq2AN7MvJjn +1+Lz5weZAttFpU7NWcBtUY8TqCnrMhs/+AlJ5pqchpU0vxtcjGKFtiEB0dfJS8mD +CCanmotPKRl0suaq2c6Q3bIi+DaYoMy7pYzlbaVYMneJaSnHPlx/aka+WgKl3Dfk +NzPpbTsO95KoWaXb3ocCltl9fv7J3++TAabRYsZBn0k/CSuG42wcwgVNy30rgDrq +wuPeYi1ab5MseyA1U/yueE06eKsYycISAFva2/Agqa8gyOjWMYibI6xRthMXzQc/ +0Vvj2Q2U03Hu/9Zn0V86l2KQ5Y1j2bhy8vO6FdKwZc/q3VfnhhNy4w== +-----END RSA PRIVATE KEY----- diff --git a/golang/src/demo/ssl/server.key.text b/golang/src/demo/ssl/server.key.text new file mode 100644 index 00000000..6d733eb2 --- /dev/null +++ b/golang/src/demo/ssl/server.key.text @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXwIBAAKBgQCzguWNYOoEgZNpJ5MY+sHCiSvNNWx84YoN/JwbsXkdfnVn8Aur +ufUqXd9NVVBm24J9DSbc+kciIbQerquVpHqdt/ekcuVBDnta5L5m4DdC9xjYqNcf +ncOp0cxklCxYpBaXqyKV/PZIVFkakDjuzPsIpwruFzVp1gXTYQftiE0eGQIDAQAB +AoGBAKj++CDrNiTb3+1FJoSDvdnozWW5f9LpedDFGiowIDeWD+2z3SjkPlyOV2U0 +hibvTJ9xvD6ZGFKXrDyecEbGu+8fldTGZOKzve9fhNNPK6pVE8FT6lyEmGfZhOoH +uO2L0rjrI0Sb4GzSb/GW43IBTA8JHRTNN/DyNrHn/+PS2r2hAkEA3lGRPDOikBA+ +WkPCiNicQzZmX/68wv0Lx76MevcFqBjQQ1BvO1JQN5t6urqfqQ1H1RZss73IvE// +p/gnuBqGDQJBAM61FeSjyg7q1DBOkLUDnE00/4JyQ1/c9pv880X7otiKAPCFZlWs +Q8hXiUiUr7tNF9dsXn3+lj7QdNXKtIQhoT0CQQCPBWhqk0lEZr7GMQtIIBm+/5My +tF1ZD5Nxh7s2LA4+iuAIPgmg3x5t958n24F1Lu8EPa3mn/QweUKeG33p6V5NAkEA +nAwC2hd4G6jVxR4aijyOi46d8ZlXGZCTL5FXChb8ieIs8WaTqcuhZCYJQpzUyV5a +yEtMTmuaexMdkKQ1gKZutQJBAKMNnhMLAspV49zjW43y7MpKtx9UcwhRWBJk+Qgq +U/bp2jv5RlBg1cCmdZn1rAnYbV+kubJ93X+NnQc2sKtsuYA= +-----END RSA PRIVATE KEY----- diff --git a/golang/src/demo/ssl/server/server.go b/golang/src/demo/ssl/server/server.go new file mode 100644 index 00000000..7bf878c5 --- /dev/null +++ b/golang/src/demo/ssl/server/server.go @@ -0,0 +1,174 @@ +package main + +import ( + "bufio" + "crypto/tls" + "crypto/x509" + "fmt" + "net" + + "github.com/Laisky/go-utils" + "github.com/Laisky/zap" +) + +var ( + serverKey = []byte(`-----BEGIN RSA PRIVATE KEY----- +MIICXwIBAAKBgQCzguWNYOoEgZNpJ5MY+sHCiSvNNWx84YoN/JwbsXkdfnVn8Aur +ufUqXd9NVVBm24J9DSbc+kciIbQerquVpHqdt/ekcuVBDnta5L5m4DdC9xjYqNcf +ncOp0cxklCxYpBaXqyKV/PZIVFkakDjuzPsIpwruFzVp1gXTYQftiE0eGQIDAQAB +AoGBAKj++CDrNiTb3+1FJoSDvdnozWW5f9LpedDFGiowIDeWD+2z3SjkPlyOV2U0 +hibvTJ9xvD6ZGFKXrDyecEbGu+8fldTGZOKzve9fhNNPK6pVE8FT6lyEmGfZhOoH +uO2L0rjrI0Sb4GzSb/GW43IBTA8JHRTNN/DyNrHn/+PS2r2hAkEA3lGRPDOikBA+ +WkPCiNicQzZmX/68wv0Lx76MevcFqBjQQ1BvO1JQN5t6urqfqQ1H1RZss73IvE// +p/gnuBqGDQJBAM61FeSjyg7q1DBOkLUDnE00/4JyQ1/c9pv880X7otiKAPCFZlWs +Q8hXiUiUr7tNF9dsXn3+lj7QdNXKtIQhoT0CQQCPBWhqk0lEZr7GMQtIIBm+/5My +tF1ZD5Nxh7s2LA4+iuAIPgmg3x5t958n24F1Lu8EPa3mn/QweUKeG33p6V5NAkEA +nAwC2hd4G6jVxR4aijyOi46d8ZlXGZCTL5FXChb8ieIs8WaTqcuhZCYJQpzUyV5a +yEtMTmuaexMdkKQ1gKZutQJBAKMNnhMLAspV49zjW43y7MpKtx9UcwhRWBJk+Qgq +U/bp2jv5RlBg1cCmdZn1rAnYbV+kubJ93X+NnQc2sKtsuYA= +-----END RSA PRIVATE KEY-----`) + serverCrt = []byte(`-----BEGIN CERTIFICATE----- +MIIDnjCCAYYCAQEwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQVUxEzARBgNV +BAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 +ZDAeFw0xOTEwMTAwNzEyMjdaFw0yMDEwMDkwNzEyMjdaMGkxCzAJBgNVBAYTAmNu +MRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRz +IFB0eSBMdGQxIjAgBgNVBAMTGTEyNy4wLjAuMToyNDQ0NCwxMjcuMC4wLjEwgZ8w +DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALOC5Y1g6gSBk2knkxj6wcKJK801bHzh +ig38nBuxeR1+dWfwC6u59Spd301VUGbbgn0NJtz6RyIhtB6uq5Wkep2396Ry5UEO +e1rkvmbgN0L3GNio1x+dw6nRzGSULFikFperIpX89khUWRqQOO7M+winCu4XNWnW +BdNhB+2ITR4ZAgMBAAEwDQYJKoZIhvcNAQEFBQADggIBAGoP0P6zIQpXUzZrFalI +J97f1hzkW+BwqZ0XtYWF+8Tb2aWHfr6CmU20XezoJ84eE5cAc5XcWB2ez5ETznq4 +7NXA31lN/khjJJUxKkJhE1Ct9E+e6gGMn4DR0ZdlfvPp72KqTBhe24bnSSGcS34d +AGtkN1EpexIONXYGARCANWTMe4cQgmaKN09raTxEuVM+jrGDiMfaSm0st2zO/l/S +EcQ2UQ1XLoUOqCrjFM038vxKvFvEkdDaz5VdoPCDGb0pVxYCj70ClD7VOWGIl70a +37Tih9K5FH3VKMQQwZjeB/2Mxn5JkGthRCi/G2H7CCw1gAXphhvPWYar/lVDDGNv +7BlmNwwHDnsG/i/EB9ieUhSdGdbJ8rBZ6gSGx4cWFSRPhIsDO+GZClvjgs8LXN7m +1mfCwF4RmuBSzcPY/QQCnpSH6mYqn7fOaKMCKwQL3x5V7aif2UfG94CTJL2LnRkw +dB3rgzHqbwKiS4iXvaNSehIm0mzw0aNN81kmStCB5NmHv66YIFlznss0iH+QUf6y +/hdqWwd1FW1drzj4OKY23V3e64+AkEzRyWk6SVpLCZuxqAys4ooiYH+bj0GDsrLc +fxpOUjHiuboitqxZ8fE+pVGbGXQWHrtwRg02l9ga5Rainyo4gAj+Zoiy/acbuMDV +bd2si0VgwJ2KiU68GiRJr1ck +-----END CERTIFICATE-----`) + caCrt = []byte(`-----BEGIN CERTIFICATE----- +MIIFtTCCA52gAwIBAgIJAOdAgEw9U786MA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV +BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX +aWRnaXRzIFB0eSBMdGQwHhcNMTkxMDEwMDE1MzE0WhcNMjAxMDA5MDE1MzE0WjBF +MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 +ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC +CgKCAgEAz+vS5dvX9qqcjuxLnsNvq1KU4EJaLOrjfC/+aO40205/qIYHaeXGw+n0 +NxrccXDyXPsHXAGs/806g3Lc8wCuS43rmnpVjqdYLRnFege4OyG+7xmGGjPVtqBh +5agW7cfu8VOcV9Iv0nW/P2MYfN1PjUO4AFy5jaEssZF8av9fsplRKU0ud4ZTGIo3 +gPLPWu2YZRXQHYiMmodS6mn4RYncKTiVSMCkrcOv9rWe0j0JfJC2dIO1aAr/tL2r +7AKS8YchT4+cj/oqR0xIEfVURiYv0o/+PVeENZ/VngBv57qI6b3nEQByL89LyaJh +J+gjSOq9MSQhQQ5YLSkoWsAbOdVahT0IYUy8+GKRY+/98tCCB9k1/Pgwaqd0rfkT +QTtpokxYEmqIQYe/Et/ktOkgud0+isCSL0euo8t4qNkvgCpilEQWDpALIWHVisXk +XruKGnios78I7PNjaVTjq69If0ULl8QhCyYNYHNNoisRIlObdWVWxy5XKgpLutOW +6i8rJvc2CruMr0KWsJ3U8T5Q40uXteUa2o5wH4uvaQkxt0G9XA/iWX+S44blAZYJ +iVCE9Fh6yyimykqIxw+X8qBFjR9ej9jdT/NvfWcx4mbvrRWdDrISgRCckTzO7Oeu +7kGcHCf+a/PAx9NuLMdumrBDMgnejMwe3yanVhyCJZ8MQIsPcIsCAwEAAaOBpzCB +pDAdBgNVHQ4EFgQUyCYrzeVnSsrA100NRLRLRGgthPYwdQYDVR0jBG4wbIAUyCYr +zeVnSsrA100NRLRLRGgthPahSaRHMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpT +b21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGSCCQDn +QIBMPVO/OjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4ICAQDB4MnxGmYF +aPq0atZiqzJMtCC/y/WwsqHkU5Z3p7QC+S11VPI19F3RVpbMDoho/Z5Ds/PWAt6s +AZMoQAmdrst2at47/HQaLeIIGc68vHuBw3Lzzb5gg/USXihBzx9ugABlOb8h1S+T +YXT0TMXwJVgUQmW+2YNjKrd2O/s4PNw5CC3UXkBVdFs/+UG7xA6LSYK8tmX0n0py +pfZqiq0pS8k8JSCsTTmWAD1j3XbVPP+HIzNsKDmNjrrmXSWD7/BKz0Kt9UtmO/Fg +J0QB3zXVznR4rXpM4iQJ0U05Xpq8Km5n13xA8bof+go6nj0GrjA8nucnxH4AsDr6 +yZThU7dV/t2yQskE6eiwAAeN2xOzwQe9dysykTgnznqli7tiYy5U4hdeWR8Yz9DA +GcyJ7D1ultBKZ5hdoa9e+EQOtuMn8+2COHYbPErw7SBlk6ZtQ5kO/rvzYIrVJMbE +CWQCIdDWXNE2IrSchVVrLbcw97tk5FBoFSBUhBEq78zyDgRBiF+ygnT6n+v3YrT7 +/4Qp1sy58pwqnbmbHRPm9q94LGPN//nAbF6KxRe+o3VFOiNDTMD+3PRlICE6P+/Z +I0SAtTOxgZANGPKoRTslIWb/PDA7sHaGZoAIadKQlzJHtDOR1EFwJ6ABFQYz0bVJ +xD7xsZEsYPG8IDIHfH+zEivH7eb8eRbt/Q== +-----END CERTIFICATE-----`) +) + +const ( + addr = "127.0.0.1:24444" +) + +func main() { + srvCert, err := tls.X509KeyPair(serverCrt, serverKey) + if err != nil { + utils.Logger.Panic("try to load key & crt got error", zap.Error(err)) + } + + // load ca + caCertPool := x509.NewCertPool() + caCertPool.AppendCertsFromPEM(caCrt) + + // https tls config + tlsConfig := &tls.Config{ + Certificates: []tls.Certificate{srvCert}, + // RootCAs: caCertPool, + ClientCAs: caCertPool, + InsecureSkipVerify: false, + ClientAuth: tls.RequireAndVerifyClientCert, + } + tlsConfig.BuildNameToCertificate() + +LISTEN_LOOP: + for { + // tlsConfig.BuildNameToCertificate() + ln, err := tls.Listen("tcp", addr, tlsConfig) + if err != nil { + utils.Logger.Error("try to listen tcp got error", zap.Error(err)) + break LISTEN_LOOP + } + utils.Logger.Info("listening...", zap.String("addr", addr)) + + var ( + tlsConn *tls.Conn + ok bool + ) + ACCEPT_LOOP: + for { + conn, err := ln.Accept() + if err != nil { + utils.Logger.Error("accept conn got error", zap.Error(err)) + break ACCEPT_LOOP + } + if tlsConn, ok = conn.(*tls.Conn); !ok { + utils.Logger.Info("refuse connection since tls error") + continue ACCEPT_LOOP + } + + state := tlsConn.ConnectionState() + fmt.Printf(">> Version: %x\n", state.Version) + fmt.Printf(">> HandshakeComplete: %t\n", state.HandshakeComplete) + fmt.Printf(">> DidResume: %t\n", state.DidResume) + fmt.Printf(">> CipherSuite: %x\n", state.CipherSuite) + fmt.Printf(">> NegotiatedProtocol: %s\n", state.NegotiatedProtocol) + fmt.Printf(">> NegotiatedProtocolIsMutual: %t\n", state.NegotiatedProtocolIsMutual) + for i, cert := range state.PeerCertificates { + subject := cert.Subject + issuer := cert.Issuer + fmt.Printf(">> %d s:/C=%v/ST=%v/L=%v/O=%v/OU=%v/CN=%s\n", i, subject.Country, subject.Province, subject.Locality, subject.Organization, subject.OrganizationalUnit, subject.CommonName) + fmt.Printf(">> i:/C=%v/ST=%v/L=%v/O=%v/OU=%v/CN=%s\n", issuer.Country, issuer.Province, issuer.Locality, issuer.Organization, issuer.OrganizationalUnit, issuer.CommonName) + } + + go handle(tlsConn) + } + ln.Close() + } +} + +func handle(conn net.Conn) { + utils.Logger.Info("got connection", zap.String("remote", conn.RemoteAddr().String())) + defer utils.Logger.Info("close connection", zap.String("remote", conn.RemoteAddr().String())) + defer conn.Close() + reader := bufio.NewReader(conn) + var ( + err error + content string + ) + for { + if content, err = reader.ReadString('\n'); err != nil { + utils.Logger.Error("try to read got error", zap.Error(err)) + break + } + + utils.Logger.Info("got", zap.String("cnt", content)) + } +} diff --git a/golang/src/demo/test_graphql/query_test.go b/golang/src/demo/test_graphql/query_test.go new file mode 100644 index 00000000..a849fddc --- /dev/null +++ b/golang/src/demo/test_graphql/query_test.go @@ -0,0 +1,33 @@ +package test + +import ( + "context" + "net/http" + "testing" + + "github.com/Laisky/graphql" +) + +type gcpLockQuery struct { + Lock struct { + Name graphql.String `graphql:"name"` + ExpiresAt graphql.String `graphql:"expires_at"` + } `graphql:"Lock(name: $name)"` +} + +func TestQueryWithHTTPGet(t *testing.T) { + ctx := context.Background() + httpClient := http.DefaultClient + query := new(gcpLockQuery) + vars := map[string]interface{}{ + "name": graphql.String("laisky.123"), + } + gracli := graphql.NewClient( + "https://blog.laisky.com/graphql/query/", + httpClient, + ) + if err := gracli.Query(ctx, query, vars); err != nil { + t.Fatalf("%+v", err) + } + +} diff --git a/golang/src/demo/test_gzip/main.go b/golang/src/demo/test_gzip/main.go deleted file mode 100644 index 5f26a7e2..00000000 --- a/golang/src/demo/test_gzip/main.go +++ /dev/null @@ -1,56 +0,0 @@ -package main - -import ( - "bufio" - "compress/gzip" - "io" - "os" - - "github.com/Laisky/go-utils" - "go.uber.org/zap" -) - -func main() { - // Write - fp, err := os.OpenFile("/Users/laisky/Downloads/test.txt.gz", os.O_CREATE|os.O_RDWR, 0666) - if err != nil { - utils.Logger.Panic("open file got error", zap.Error(err)) - } - - fpb := bufio.NewWriter(fp) - gwriter := gzip.NewWriter(fpb) - for i := 0; i < 100; i++ { - if _, err = gwriter.Write([]byte("1234567890")); err != nil { - utils.Logger.Panic("write date got error", zap.Error(err)) - } - - gwriter.Flush() - } - - gwriter.Close() - fpb.Flush() - fp.Seek(0, 0) - - // Read - fpc := bufio.NewReader(fp) - greader, err := gzip.NewReader(fpc) - if err != nil { - utils.Logger.Panic("create gzip reader got error", zap.Error(err)) - } - - cnt := make([]byte, 10) - for { - n, err := greader.Read(cnt) - if err == io.EOF { - utils.Logger.Info("all done") - break - } - if err != nil { - utils.Logger.Panic("try to load file got error", zap.Error(err)) - } - - utils.Logger.Info("read bytes", zap.Int("n", n), zap.ByteString("cnt", cnt)) - - } - -} diff --git a/golang/src/demo/test_gzip/pgz_test.go b/golang/src/demo/test_gzip/pgz_test.go new file mode 100644 index 00000000..3b842c2b --- /dev/null +++ b/golang/src/demo/test_gzip/pgz_test.go @@ -0,0 +1,452 @@ +package test + +import ( + "bytes" + "compress/gzip" + "github.com/klauspost/pgzip" + "io/ioutil" + "os" + "testing" + + "github.com/Laisky/go-utils" +) + +/* +goos: darwin +goarch: amd64 +pkg: github.com/Laisky/HelloWorld/golang/src/demo/test_gzip +BenchmarkGZCompressor/gz_write_1kB-4 10000 225748 ns/op 0 B/op 0 allocs/op +BenchmarkGZCompressor/gz_write_10kB-4 2613 1014270 ns/op 0 B/op 0 allocs/op +BenchmarkGZCompressor/gz_write_50kB-4 364 4494456 ns/op 1 B/op 0 allocs/op +BenchmarkGZCompressor/gz_write_100kB-4 231 6200921 ns/op 1 B/op 0 allocs/op +BenchmarkGZCompressor/normal_write_1KB-4 29948092 52.4 ns/op 0 B/op 0 allocs/op +BenchmarkGZCompressor/normal_write_10KB-4 4443848 233 ns/op 0 B/op 0 allocs/op +BenchmarkGZCompressor/normal_write_50KB-4 470455 3163 ns/op 0 B/op 0 allocs/op +BenchmarkGZCompressor/normal_write_100KB-4 186914 7632 ns/op 0 B/op 0 allocs/op +BenchmarkGZCompressor/gz_write_50kB_best_compression-4 603 3108414 ns/op 0 B/op 0 allocs/op +BenchmarkGZCompressor/gz_write_50kB_best_speed-4 3037 520604 ns/op 0 B/op 0 allocs/op +BenchmarkGZCompressor/gz_write_50kB_HuffmanOnly-4 3652 323248 ns/op 0 B/op 0 allocs/op +BenchmarkGZCompressor/normal_write_50KB_to_file-4 10000 102742 ns/op 0 B/op 0 allocs/op +BenchmarkGZCompressor/gz_write_50KB_to_file-4 175 6240226 ns/op 2 B/op 0 allocs/op +BenchmarkGZCompressor/gz_write_50KB_to_file_best_speed-4 2668 585101 ns/op 95866 B/op 0 allocs/op +BenchmarkGZCompressor/gz_write_50KB_to_file_BestCompression-4 417 4713929 ns/op 633083 B/op 0 allocs/op +PASS +ok github.com/Laisky/HelloWorld/golang/src/demo/test_gzip 27.592s +Success: Benchmarks passed. +*/ +func BenchmarkGZCompressor(b *testing.B) { + fp, err := ioutil.TempFile("", "gz-test") + if err != nil { + b.Fatalf("%+v", err) + } + defer fp.Close() + defer os.Remove(fp.Name()) + b.Logf("create file name: %v", fp.Name()) + + payload1K := []byte(utils.RandomStringWithLength(1024)) + payload10K := []byte(utils.RandomStringWithLength(10240)) + payload50K := []byte(utils.RandomStringWithLength(10240 * 5)) + payload100K := []byte(utils.RandomStringWithLength(102400)) + buf := &bytes.Buffer{} + gzWriter := gzip.NewWriter(buf) + b.Run("gz write 1kB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload1K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + b.Run("gz write 10kB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload10K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + b.Run("gz write 50kB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + b.Run("gz write 100kB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload100K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + b.Run("normal write 1KB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + buf.Write(payload1K) + buf.Reset() + } + }) + buf.Reset() + b.Run("normal write 10KB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + buf.Write(payload10K) + buf.Reset() + } + }) + buf.Reset() + b.Run("normal write 50KB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + buf.Write(payload50K) + buf.Reset() + } + }) + buf.Reset() + b.Run("normal write 100KB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + buf.Write(payload100K) + buf.Reset() + } + }) + if gzWriter, err = gzip.NewWriterLevel(buf, gzip.BestCompression); err != nil { + b.Fatalf("got error: %+v", err) + } + b.Run("gz write 50kB best compression", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + if gzWriter, err = gzip.NewWriterLevel(buf, gzip.BestSpeed); err != nil { + b.Fatalf("got error: %+v", err) + } + b.Run("gz write 50kB best speed", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + if gzWriter, err = gzip.NewWriterLevel(buf, gzip.HuffmanOnly); err != nil { + b.Fatalf("got error: %+v", err) + } + b.Run("gz write 50kB HuffmanOnly", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + + b.Run("normal write 50KB to file", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = fp.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + } + }) + if _, err = fp.Seek(0, 0); err != nil { + b.Fatalf("seek: %+v", err) + } + + gzWriter = gzip.NewWriter(fp) + b.Run("gz write 50KB to file", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + } + }) + if _, err = fp.Seek(0, 0); err != nil { + b.Fatalf("seek: %+v", err) + } + + if gzWriter, err = gzip.NewWriterLevel(buf, gzip.BestSpeed); err != nil { + b.Fatalf("got error: %+v", err) + } + b.Run("gz write 50KB to file best speed", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + } + }) + if _, err = fp.Seek(0, 0); err != nil { + b.Fatalf("seek: %+v", err) + } + + if gzWriter, err = gzip.NewWriterLevel(buf, gzip.BestCompression); err != nil { + b.Fatalf("got error: %+v", err) + } + b.Run("gz write 50KB to file BestCompression", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + } + }) +} + +/* +goos: darwin +goarch: amd64 +pkg: github.com/Laisky/HelloWorld/golang/src/demo/test_gzip +BenchmarkPGZCompressor/gz_write_1kB-4 7909 142196 ns/op 692997 B/op 11 allocs/op +BenchmarkPGZCompressor/gz_write_10kB-4 8539 151424 ns/op 691951 B/op 11 allocs/op +BenchmarkPGZCompressor/gz_write_50kB-4 6038 178688 ns/op 696439 B/op 12 allocs/op +BenchmarkPGZCompressor/gz_write_100kB-4 5464 214991 ns/op 675344 B/op 11 allocs/op +BenchmarkPGZCompressor/normal_write_1KB-4 38609056 31.7 ns/op 0 B/op 0 allocs/op +BenchmarkPGZCompressor/normal_write_10KB-4 8489320 140 ns/op 0 B/op 0 allocs/op +BenchmarkPGZCompressor/normal_write_50KB-4 486973 2410 ns/op 0 B/op 0 allocs/op +BenchmarkPGZCompressor/normal_write_100KB-4 263452 4764 ns/op 0 B/op 0 allocs/op +BenchmarkPGZCompressor/gz_write_50kB_best_compression-4 1614 737059 ns/op 581633 B/op 12 allocs/op +BenchmarkPGZCompressor/gz_write_50kB_best_speed-4 6607 166990 ns/op 659595 B/op 12 allocs/op +BenchmarkPGZCompressor/gz_write_50kB_HuffmanOnly-4 2769 420641 ns/op 547038 B/op 12 allocs/op +BenchmarkPGZCompressor/normal_write_50KB_to_file-4 14587 85377 ns/op 0 B/op 0 allocs/op +BenchmarkPGZCompressor/gz_write_50KB_to_file-4 19995 87519 ns/op 66030 B/op 3 allocs/op +BenchmarkPGZCompressor/gz_write_50KB_to_file_best_speed-4 10000 159127 ns/op 199775 B/op 3 allocs/op +BenchmarkPGZCompressor/gz_write_50KB_to_file_BestCompression-4 4347 335686 ns/op 55145 B/op 3 allocs/op +PASS +ok github.com/Laisky/HelloWorld/golang/src/demo/test_gzip 22.745s +Success: Benchmarks passed. + +*/ +func BenchmarkPGZCompressor(b *testing.B) { + fp, err := ioutil.TempFile("", "gz-test") + if err != nil { + b.Fatalf("%+v", err) + } + defer fp.Close() + defer os.Remove(fp.Name()) + b.Logf("create file name: %v", fp.Name()) + + payload1K := []byte(utils.RandomStringWithLength(1024)) + payload10K := []byte(utils.RandomStringWithLength(10240)) + payload50K := []byte(utils.RandomStringWithLength(10240 * 5)) + payload100K := []byte(utils.RandomStringWithLength(102400)) + buf := &bytes.Buffer{} + + gzWriter := pgzip.NewWriter(buf) + gzWriter.SetConcurrency(100000, 4) + // gzWriter := gzip.NewWriter(buf) + b.Run("gz write 1kB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload1K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + b.Run("gz write 10kB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload10K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + b.Run("gz write 50kB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + b.Run("gz write 100kB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload100K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + b.Run("normal write 1KB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + buf.Write(payload1K) + buf.Reset() + } + }) + buf.Reset() + b.Run("normal write 10KB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + buf.Write(payload10K) + buf.Reset() + } + }) + buf.Reset() + b.Run("normal write 50KB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + buf.Write(payload50K) + buf.Reset() + } + }) + buf.Reset() + b.Run("normal write 100KB", func(b *testing.B) { + for i := 0; i < b.N; i++ { + buf.Write(payload100K) + buf.Reset() + } + }) + if gzWriter, err = pgzip.NewWriterLevel(buf, pgzip.BestCompression); err != nil { + b.Fatalf("got error: %+v", err) + } + gzWriter.SetConcurrency(100000, 4) + b.Run("gz write 50kB best compression", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + if gzWriter, err = pgzip.NewWriterLevel(buf, pgzip.BestSpeed); err != nil { + b.Fatalf("got error: %+v", err) + } + gzWriter.SetConcurrency(100000, 4) + b.Run("gz write 50kB best speed", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + if gzWriter, err = pgzip.NewWriterLevel(buf, pgzip.HuffmanOnly); err != nil { + b.Fatalf("got error: %+v", err) + } + gzWriter.SetConcurrency(100000, 4) + b.Run("gz write 50kB HuffmanOnly", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + if err = gzWriter.Close(); err != nil { + b.Fatalf("close: %+v", err) + } + gzWriter.Reset(buf) + buf.Reset() + } + }) + buf.Reset() + + b.Run("normal write 50KB to file", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = fp.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + } + }) + if _, err = fp.Seek(0, 0); err != nil { + b.Fatalf("seek: %+v", err) + } + + gzWriter = pgzip.NewWriter(fp) + gzWriter.SetConcurrency(100000, 4) + b.Run("gz write 50KB to file", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + } + }) + if _, err = fp.Seek(0, 0); err != nil { + b.Fatalf("seek: %+v", err) + } + + if gzWriter, err = pgzip.NewWriterLevel(buf, pgzip.BestSpeed); err != nil { + b.Fatalf("got error: %+v", err) + } + gzWriter.SetConcurrency(100000, 4) + b.Run("gz write 50KB to file best speed", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + } + }) + if _, err = fp.Seek(0, 0); err != nil { + b.Fatalf("seek: %+v", err) + } + + if gzWriter, err = pgzip.NewWriterLevel(buf, pgzip.BestCompression); err != nil { + b.Fatalf("got error: %+v", err) + } + gzWriter.SetConcurrency(100000, 4) + b.Run("gz write 50KB to file BestCompression", func(b *testing.B) { + for i := 0; i < b.N; i++ { + if _, err = gzWriter.Write(payload50K); err != nil { + b.Fatalf("write: %+v", err) + } + } + }) +} diff --git a/golang/src/demo/test_io/read_by_bufio.go b/golang/src/demo/test_io/read_by_bufio.go deleted file mode 100644 index 37d4cece..00000000 --- a/golang/src/demo/test_io/read_by_bufio.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "bufio" - "fmt" - "io" - "os" -) - -func main() { - inputFile, inputError := os.Open("data.txt") - if inputError != nil { - fmt.Printf("An error occurred on opening the inputfile\n" + - "Does the file exist?\n" + - "Have you got acces to it?\n") - return // exit the function on error - } - defer inputFile.Close() - - // 用 bufio 封装 Reader - // 会自动将数据读入缓存区,减少 IO 的使用 - inputReader := bufio.NewReader(inputFile) - for { - inputString, readerError := inputReader.ReadString('\n') - if readerError == io.EOF { - return - } - fmt.Printf("The input was: %s", inputString) - } -} diff --git a/golang/src/demo/test_regexp/regexp_test.go b/golang/src/demo/test_regexp/regexp_test.go new file mode 100644 index 00000000..41bf77ee --- /dev/null +++ b/golang/src/demo/test_regexp/regexp_test.go @@ -0,0 +1,39 @@ +package main_test + +import ( + "regexp" + "testing" +) + +/* +BenchmarkRegexp/normal_matched-4 1000000 1189 ns/op 0 B/op 0 allocs/op +BenchmarkRegexp/normal_unmatched-4 5000000 316 ns/op 0 B/op 0 allocs/op +BenchmarkRegexp/with_+_matched-4 1000000 1399 ns/op 0 B/op 0 allocs/op +BenchmarkRegexp/with_+_unmatched-4 1000000 1430 ns/op 0 B/op 0 allocs/op +*/ +func BenchmarkRegexp(b *testing.B) { + regexp1 := regexp.MustCompile(`^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).*`) + regexp2 := regexp.MustCompile(`^((\d{1,3})+\.(\d{1,3})+\.(\d{1,3})+\.(\d{1,3})+).*`) + text1 := `107.21.20.1 - - [07/Dec/2012:18:55:53 -0500] "GET /" 200 2144` + text2 := `9.21.2015 non matching text that kind of matches` + b.Run("normal matched", func(b *testing.B) { + for i := 0; i < b.N; i++ { + regexp1.MatchString(text1) + } + }) + b.Run("normal unmatched", func(b *testing.B) { + for i := 0; i < b.N; i++ { + regexp1.MatchString(text2) + } + }) + b.Run("with + matched", func(b *testing.B) { + for i := 0; i < b.N; i++ { + regexp2.MatchString(text1) + } + }) + b.Run("with + unmatched", func(b *testing.B) { + for i := 0; i < b.N; i++ { + regexp2.MatchString(text1) + } + }) +} diff --git a/golang/src/demo/test_uber_guide/channel_test.go b/golang/src/demo/test_uber_guide/channel_test.go new file mode 100644 index 00000000..7cd4b6b5 --- /dev/null +++ b/golang/src/demo/test_uber_guide/channel_test.go @@ -0,0 +1,69 @@ +package test_uber + +import ( + "context" + "testing" +) + +/* +BenchmarkChannel/size_0-4 1102160 1348 ns/op 0 B/op 0 allocs/op +BenchmarkChannel/size_1-4 1000000 1195 ns/op 0 B/op 0 allocs/op +BenchmarkChannel/size_100-4 2956615 431 ns/op 0 B/op 0 allocs/op +BenchmarkChannel/size_1000-4 4134514 278 ns/op 0 B/op 0 allocs/op +PASS +*/ +func BenchmarkChannel(b *testing.B) { + c0 := make(chan int) + ctx, cancel := context.WithCancel(context.Background()) + runConsumer(ctx, c0) + b.Run("size 0", func(b *testing.B) { + for i := 0; i < b.N; i++ { + c0 <- i + } + }) + cancel() + + c1 := make(chan int, 1) + ctx, cancel = context.WithCancel(context.Background()) + runConsumer(ctx, c1) + b.Run("size 1", func(b *testing.B) { + for i := 0; i < b.N; i++ { + c1 <- i + } + }) + cancel() + + c100 := make(chan int, 100) + ctx, cancel = context.WithCancel(context.Background()) + runConsumer(ctx, c100) + b.Run("size 100", func(b *testing.B) { + for i := 0; i < b.N; i++ { + c100 <- i + } + }) + cancel() + + c1000 := make(chan int, 1000) + ctx, cancel = context.WithCancel(context.Background()) + runConsumer(ctx, c1000) + b.Run("size 1000", func(b *testing.B) { + for i := 0; i < b.N; i++ { + c1000 <- i + } + }) + cancel() +} + +func runConsumer(ctx context.Context, c chan int) { + for i := 0; i < 100; i++ { + go func() { + for { + select { + case <-ctx.Done(): + return + case <-c: + } + } + }() + } +} diff --git a/golang/src/demo/test_uber_guide/mutex_test.go b/golang/src/demo/test_uber_guide/mutex_test.go new file mode 100644 index 00000000..2fe02921 --- /dev/null +++ b/golang/src/demo/test_uber_guide/mutex_test.go @@ -0,0 +1,32 @@ +package test_uber + +import ( + "sync" + "testing" + "time" + + "github.com/Laisky/go-utils" +) + +func TestMutex(t *testing.T) { + var ( + l sync.Mutex + wg = new(sync.WaitGroup) + ) + for i := 0; i < 10; i++ { + wg.Add(1) + go foo(wg, l) + } + + wg.Wait() + t.Error("done") +} + +func foo(wg *sync.WaitGroup, l sync.Mutex) { + l.Lock() + defer wg.Done() + defer l.Unlock() + defer utils.Logger.Info("release lock") + utils.Logger.Info("acquired lock") + time.Sleep(3 * time.Second) +} diff --git a/golang/src/demo/test_unsafe/README.md b/golang/src/demo/test_unsafe/README.md deleted file mode 100644 index 86279f0e..00000000 --- a/golang/src/demo/test_unsafe/README.md +++ /dev/null @@ -1,8 +0,0 @@ -Go Unsafe -=== - -> Golang 指针的各种黑科技玩法 - -## Reference - - - [golang: 利用unsafe操作未导出变量](http://studygolang.com/articles/685) diff --git a/golang/src/demo/test_unsafe/bytes2string_test.go b/golang/src/demo/test_unsafe/bytes2string_test.go deleted file mode 100644 index 0b50d618..00000000 --- a/golang/src/demo/test_unsafe/bytes2string_test.go +++ /dev/null @@ -1,30 +0,0 @@ -// -// $ go test -test.bench=".*" -package main - -import "testing" -import "unsafe" - -func Test_ByteString(t *testing.T) { - var x = []byte("Hello World!") - var y = *(*string)(unsafe.Pointer(&x)) - var z = string(x) - - if y != z { - t.Fail() - } -} - -func Benchmark_Normal(b *testing.B) { - var x = []byte("Hello World!") - for i := 0; i < b.N; i++ { - _ = string(x) - } -} - -func Benchmark_ByteString(b *testing.B) { - var x = []byte("Hello World!") - for i := 0; i < b.N; i++ { - _ = *(*string)(unsafe.Pointer(&x)) - } -} diff --git a/golang/src/demo/test_unsafe/main.go b/golang/src/demo/test_unsafe/main.go deleted file mode 100644 index 7938a151..00000000 --- a/golang/src/demo/test_unsafe/main.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "test_unsafe/p" - "unsafe" -) - -func main() { - // 分配空间,创建新对象 - var v *p.V = new(p.V) - - // 将 v 的指针转换为 int32 的指针 - var i *int32 = (*int32)(unsafe.Pointer(v)) - // 赋值,相当于给 V.i 赋值 - *i = int32(98) - - // 获取 V.j 的指针 - // 方法是 i 的指针加上一个 int32 的长度,因为结构体内的内存是连续的 - var j *int64 = (*int64)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + uintptr(unsafe.Sizeof(int32(0))))) - *j = int64(763) - - // 输出,会发现私有变量的值都被改变了 - v.PutI() - v.PutJ() -} diff --git a/golang/src/demo/test_unsafe/p/default.go b/golang/src/demo/test_unsafe/p/default.go deleted file mode 100644 index 1f536311..00000000 --- a/golang/src/demo/test_unsafe/p/default.go +++ /dev/null @@ -1,18 +0,0 @@ -package p - -import ( - "fmt" -) - -type V struct { - i int32 - j int64 -} - -func (this V) PutI() { - fmt.Printf("i=%d\n", this.i) -} - -func (this V) PutJ() { - fmt.Printf("j=%d\n", this.j) -} diff --git a/golang/syntax/buf_test.go b/golang/syntax/buf_test.go new file mode 100644 index 00000000..f3442680 --- /dev/null +++ b/golang/syntax/buf_test.go @@ -0,0 +1,18 @@ +package test + +import ( + "bytes" + "testing" +) + +func TestBytesBuffer(t *testing.T) { + buf := bytes.NewBuffer([]byte{}) + + for i := 0; i < 1000; i++ { + buf.Write([]byte("1")) + } + + t.Logf("len: %d", buf.Len()) + t.Logf("len: %d", buf.Len()) + t.Error() +} diff --git a/py36/nlp/README.md b/golang/syntax/certs/README.md similarity index 100% rename from py36/nlp/README.md rename to golang/syntax/certs/README.md diff --git a/golang/syntax/certs/ca-config.json b/golang/syntax/certs/ca-config.json new file mode 100644 index 00000000..77c1772e --- /dev/null +++ b/golang/syntax/certs/ca-config.json @@ -0,0 +1,34 @@ +{ + "signing": { + "default": { + "expiry": "168h" + }, + "profiles": { + "www": { + "expiry": "8760h", + "usages": [ + "signing", + "key encipherment", + "server auth" + ] + }, + "server": { + "expiry": "8760h", + "usages": [ + "signing", + "key encipherment", + "server auth" + ] + }, + "client": { + "expiry": "8760h", + "usages": [ + "signing", + "key encipherment", + "client auth" + ] + } + } + } +} + diff --git a/golang/syntax/certs/ca-csr.json b/golang/syntax/certs/ca-csr.json new file mode 100644 index 00000000..9c24890b --- /dev/null +++ b/golang/syntax/certs/ca-csr.json @@ -0,0 +1,20 @@ +{ + "CN": "example.net", + "hosts": [ + "example.net", + "www.example.net", + "localhost" + ], + "key": { + "algo": "ecdsa", + "size": 256 + }, + "names": [ + { + "C": "US", + "ST": "CA", + "L": "San Francisco" + } + ] +} + diff --git a/golang/syntax/certs/self-ca-key.pem b/golang/syntax/certs/self-ca-key.pem new file mode 100644 index 00000000..2c162a45 --- /dev/null +++ b/golang/syntax/certs/self-ca-key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIOocbtOXVafsZbp6j3DBkU5YeiDOPcWKLPrKs6Q5yzPMoAoGCCqGSM49 +AwEHoUQDQgAE849ur0RR2ZS05WS6uTgpouo8vi7jm0KQPiaxV12ithVGDOebLzRk +RKAa3VTQclUcZi6A1y5w/vlFs8x+k6w+jg== +-----END EC PRIVATE KEY----- diff --git a/golang/syntax/certs/self-ca.csr b/golang/syntax/certs/self-ca.csr new file mode 100644 index 00000000..8dc74188 --- /dev/null +++ b/golang/syntax/certs/self-ca.csr @@ -0,0 +1,9 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIBSTCB7wIBADBIMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcT +DVNhbiBGcmFuY2lzY28xFDASBgNVBAMTC2V4YW1wbGUubmV0MFkwEwYHKoZIzj0C +AQYIKoZIzj0DAQcDQgAE849ur0RR2ZS05WS6uTgpouo8vi7jm0KQPiaxV12ithVG +DOebLzRkRKAa3VTQclUcZi6A1y5w/vlFs8x+k6w+jqBFMEMGCSqGSIb3DQEJDjE2 +MDQwMgYDVR0RBCswKYILZXhhbXBsZS5uZXSCD3d3dy5leGFtcGxlLm5ldIIJbG9j +YWxob3N0MAoGCCqGSM49BAMCA0kAMEYCIQDBfeWTi3wmJNJuKYRaEiECZMvlbZx9 +Vh4YShOZfZrgdQIhANtIcdGAFfyDYVa5weZXaCbmUS5evQciaSIwSTKp66oZ +-----END CERTIFICATE REQUEST----- diff --git a/golang/syntax/certs/self-ca.pem b/golang/syntax/certs/self-ca.pem new file mode 100644 index 00000000..d51c8de4 --- /dev/null +++ b/golang/syntax/certs/self-ca.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIB1TCCAXqgAwIBAgIUaO+mfo2HHbdSE6uC7G9U5z8mna0wCgYIKoZIzj0EAwIw +SDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1TYW4gRnJhbmNp +c2NvMRQwEgYDVQQDEwtleGFtcGxlLm5ldDAeFw0yMDAzMjIwNzE2MDBaFw0yNTAz +MjEwNzE2MDBaMEgxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEUMBIGA1UEAxMLZXhhbXBsZS5uZXQwWTATBgcqhkjOPQIB +BggqhkjOPQMBBwNCAATzj26vRFHZlLTlZLq5OCmi6jy+LuObQpA+JrFXXaK2FUYM +55svNGREoBrdVNByVRxmLoDXLnD++UWzzH6TrD6Oo0IwQDAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUkPpLdWHk7zn7jzeP0y435+66 +qnAwCgYIKoZIzj0EAwIDSQAwRgIhALjsW3NVSWcpF3puIVHLwNo1h3SG94LokEhJ +tLu/FwZiAiEAkzVXK1RtfWbBq04oI4GVUaPCSnS/yLagroXkK1/Hykk= +-----END CERTIFICATE----- diff --git a/golang/syntax/chan_test.go b/golang/syntax/chan_test.go new file mode 100644 index 00000000..55a0b742 --- /dev/null +++ b/golang/syntax/chan_test.go @@ -0,0 +1,83 @@ +package test + +import ( + "runtime" + "sync" + "testing" + "time" +) + +func TestClocsChan(t *testing.T) { + + intChan := make(chan int, 100) + n := 123 + close(intChan) + <-intChan + <-intChan + <-intChan + + n = <-intChan + if n != 0 { + t.Fatalf("got n: %v", n) + } + + mapChan := make(chan map[string]string, 10) + mm := map[string]string{"1": "123"} + close(mapChan) + + mm = <-mapChan + if mm != nil { + t.Fatalf("got n: %v", n) + } + +} + +/* + * 44: len chan1: 42 + * 45: len chan2: 58 + * 46: len chan3: 0 + */ +func TestSelectChan(t *testing.T) { + chan1 := make(chan int, 100000) + chan2 := make(chan int, 100000) + chan3 := make(chan int, 100000) + + for i := 0; i < 100; i++ { + select { + case chan1 <- i: + case chan2 <- i: + default: + chan3 <- i + } + } + + t.Logf("len chan1: %v", len(chan1)) + t.Logf("len chan2: %v", len(chan2)) + t.Logf("len chan3: %v", len(chan3)) + t.Error() +} + +func TestClosedChan(t *testing.T) { + c := make(chan int, 10) + var wg sync.WaitGroup + wg.Add(2) + + go func() { + defer wg.Done() + for i := 0; i < 10; i++ { + c <- i + } + close(c) + }() + go func() { + defer wg.Done() + for v := range c { + time.Sleep(100 * time.Millisecond) + t.Logf("got: %+v", v) + runtime.Gosched() + } + }() + + wg.Wait() + t.Error() +} diff --git a/golang/syntax/ctx_test.go b/golang/syntax/ctx_test.go new file mode 100644 index 00000000..b4441629 --- /dev/null +++ b/golang/syntax/ctx_test.go @@ -0,0 +1,27 @@ +package test + +import ( + "context" + "fmt" + "sync" + "testing" +) + +func TestContext(t *testing.T) { + ctx := context.Background() + wg := &sync.WaitGroup{} + + ctx2, cancel := context.WithCancel(ctx) + for i := 0; i < 10; i++ { + wg.Add(1) + go func(i int) { + <-ctx2.Done() + fmt.Println(i, "quit") + wg.Done() + }(i) + } + + cancel() + wg.Wait() + <-ctx2.Done() +} diff --git a/golang/src/demo/test_io/data.txt b/golang/syntax/data.txt similarity index 100% rename from golang/src/demo/test_io/data.txt rename to golang/syntax/data.txt diff --git a/golang/syntax/for_test.go b/golang/syntax/for_test.go new file mode 100644 index 00000000..c961a6f5 --- /dev/null +++ b/golang/syntax/for_test.go @@ -0,0 +1,44 @@ +package test + +import ( + "sync" + "testing" + + "golang.org/x/sync/errgroup" +) + +func TestFor(t *testing.T) { + wg := &sync.WaitGroup{} + z := 0 + for i := 0; i < 5; i++ { + z++ + wg.Add(1) + go func() { + defer wg.Done() + t.Log(i) + t.Log(z) + t.Log("----------------") + }() + } + + wg.Wait() + t.Error() +} + +func TestErrgroupInFor(t *testing.T) { + var pool errgroup.Group + for i := 0; i < 10; i++ { + j := i + pool.Go(func() error { + t.Logf("%v - %v", i, j) + return nil + }) + + } + + if err := pool.Wait(); err != nil { + t.Fatalf("%+v", err) + } + + t.Error("done") +} diff --git a/golang/syntax/go.mod b/golang/syntax/go.mod new file mode 100644 index 00000000..5785a256 --- /dev/null +++ b/golang/syntax/go.mod @@ -0,0 +1,8 @@ +module github.com/Laisky/test + +go 1.14 + +require ( + github.com/pkg/errors v0.9.1 + golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a +) diff --git a/golang/syntax/go.sum b/golang/syntax/go.sum new file mode 100644 index 00000000..854ec9ee --- /dev/null +++ b/golang/syntax/go.sum @@ -0,0 +1,4 @@ +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/golang/src/demo/test_io/read_by_bytes.go b/golang/syntax/io_read_test.go similarity index 53% rename from golang/src/demo/test_io/read_by_bytes.go rename to golang/syntax/io_read_test.go index 21f71c41..a97e0826 100644 --- a/golang/src/demo/test_io/read_by_bytes.go +++ b/golang/syntax/io_read_test.go @@ -1,9 +1,11 @@ -package main +package test import ( + "bufio" "fmt" "io" "os" + "testing" ) func ReadLine(reader io.Reader) (line []byte, err error) { @@ -23,7 +25,29 @@ func ReadLine(reader io.Reader) (line []byte, err error) { } } -func main() { +func TestBufio(t *testing.T) { + inputFile, inputError := os.Open("data.txt") + if inputError != nil { + fmt.Printf("An error occurred on opening the inputfile\n" + + "Does the file exist?\n" + + "Have you got acces to it?\n") + return // exit the function on error + } + defer inputFile.Close() + + // 用 bufio 封装 Reader + // 会自动将数据读入缓存区,减少 IO 的使用 + inputReader := bufio.NewReader(inputFile) + for { + inputString, readerError := inputReader.ReadString('\n') + if readerError == io.EOF { + return + } + fmt.Printf("The input was: %s", inputString) + } +} + +func TestReader(t *testing.T) { inputFile, inputError := os.Open("data.txt") if inputError != nil { fmt.Printf("An error occurred on opening the inputfile\n" + diff --git a/golang/syntax/os_test.go b/golang/syntax/os_test.go new file mode 100644 index 00000000..f418eaeb --- /dev/null +++ b/golang/syntax/os_test.go @@ -0,0 +1,37 @@ +package test + +import ( + "os" + "path/filepath" + "testing" + "time" +) + +func TestExit(t *testing.T) { + p, err := os.FindProcess(os.Getpid()) + if err != nil { + t.Fatalf("%+v", err) + } + + if err := p.Kill(); err != nil { + t.Fatalf("%+v", err) + } + time.Sleep(1 * time.Second) +} + +// func TestMove(t *testing.T) { +// dir, err := ioutil.TempDir("", "") +// if err != nil { +// t.Fatalf("%+v", err) +// } +// defer os.Remove(dir) + +// os.Makedir(filepath.Join(dir, "a")) +// os.MkDir(filepath.Join(dir, "b")) +// } + +func TestFilepath(t *testing.T) { + src := "/a/v/c/d.xxx" + t.Logf("%+v", filepath.Split(src)) + t.Error() +} diff --git a/golang/syntax/sign_and_verify_test.go b/golang/syntax/sign_and_verify_test.go new file mode 100644 index 00000000..2a950b25 --- /dev/null +++ b/golang/syntax/sign_and_verify_test.go @@ -0,0 +1,82 @@ +package test + +import ( + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" + "crypto/sha256" + "crypto/x509" + "encoding/pem" + "fmt" + "testing" + + "github.com/pkg/errors" +) + +func EncodeECDSAPrivateKey(privateKey *ecdsa.PrivateKey) ([]byte, error) { + x509Encoded, err := x509.MarshalECPrivateKey(privateKey) + if err != nil { + return nil, errors.Wrap(err, "marshal private key") + } + + return pem.EncodeToMemory(&pem.Block{Type: "PRIVATE KEY", Bytes: x509Encoded}), nil +} + +func EncodeECDSAPublicKey(publicKey *ecdsa.PublicKey) ([]byte, error) { + x509EncodedPub, err := x509.MarshalPKIXPublicKey(publicKey) + if err != nil { + return nil, errors.Wrap(err, "marshal public key") + } + return pem.EncodeToMemory(&pem.Block{Type: "PUBLIC KEY", Bytes: x509EncodedPub}), nil +} + +func DecodeECDSAPrivateKey(pemEncoded []byte) (*ecdsa.PrivateKey, error) { + block, _ := pem.Decode(pemEncoded) + privateKey, err := x509.ParseECPrivateKey(block.Bytes) + if err != nil { + return nil, errors.Wrap(err, "parse private key") + } + return privateKey, nil +} + +func DecodeECDSAPublicKey(pemEncodedPub []byte) (*ecdsa.PublicKey, error) { + blockPub, _ := pem.Decode(pemEncodedPub) + genericPublicKey, err := x509.ParsePKIXPublicKey(blockPub.Bytes) + if err != nil { + return nil, errors.Wrap(err, "parse public key") + } + + return genericPublicKey.(*ecdsa.PublicKey), nil +} + +func TestECDSASign(t *testing.T) { + privateKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + if err != nil { + t.Fatalf("%+v", err) + } + + if pubkey, err := EncodeECDSAPublicKey(&privateKey.PublicKey); err != nil { + t.Fatalf("%+v", err) + } else { + t.Logf("pub: %+v", pubkey) + } + if prikey, err := EncodeECDSAPrivateKey(privateKey); err != nil { + t.Fatalf("%+v", err) + } else { + t.Logf("pri: %+v", prikey) + } + + msg := "hello, world" + hash := sha256.Sum256([]byte(msg)) + + r, s, err := ecdsa.Sign(rand.Reader, privateKey, hash[:]) + if err != nil { + t.Fatalf("%+v", err) + } + + fmt.Printf("signature: (0x%x, 0x%x)\n", r, s) + + valid := ecdsa.Verify(&privateKey.PublicKey, hash[:], r, s) + fmt.Println("signature verified:", valid) + t.Error() +} diff --git a/golang/syntax/singleflight_test.go b/golang/syntax/singleflight_test.go new file mode 100644 index 00000000..80f6635a --- /dev/null +++ b/golang/syntax/singleflight_test.go @@ -0,0 +1,46 @@ +package test + +import ( + "testing" + + "golang.org/x/sync/singleflight" +) + +func TestSingleFlight(t *testing.T) { + g := singleflight.Group{} + const key = "1" + n := 0 + v, err, shared := g.Do(key, func() (interface{}, error) { + n++ + return n, nil + }) + if err != nil { + t.Fatalf("got error: %+v", err) + } + if v != 1 { + t.Logf("got v: %v, shared: %v", v, shared) + } + + v, err, shared = g.Do(key, func() (interface{}, error) { + n++ + return n, nil + }) + if err != nil { + t.Fatalf("got error: %+v", err) + } + if v != 1 { + t.Logf("got v: %v, shared: %v", v, shared) + } + + g.Forget(key) + v, err, shared = g.Do(key, func() (interface{}, error) { + n++ + return n, nil + }) + if err != nil { + t.Fatalf("got error: %+v", err) + } + if v != 2 { + t.Logf("got v: %v, shared: %v", v, shared) + } +} diff --git a/golang/syntax/structure_test.go b/golang/syntax/structure_test.go new file mode 100644 index 00000000..690ac5e7 --- /dev/null +++ b/golang/syntax/structure_test.go @@ -0,0 +1,30 @@ +package test + +import ( + "reflect" + "testing" +) + +type Foo struct { + A string + CS []string +} + +func TestStruct(t *testing.T) { + a := &Foo{ + A: "yo", + CS: []string{"a"}, + } + b := &Foo{ + A: "yo", + CS: []string{"a"}, + } + + if a == b { + t.Error("should not equal") + } + + if !reflect.DeepEqual(a, b) { + t.Error("should equal") + } +} diff --git a/golang/syntax/unsafe_test.go b/golang/syntax/unsafe_test.go new file mode 100644 index 00000000..28b1ec9a --- /dev/null +++ b/golang/syntax/unsafe_test.go @@ -0,0 +1,63 @@ +package test + +import ( + "fmt" + "testing" + "unsafe" +) + +func Test_ByteString(t *testing.T) { + var x = []byte("Hello World!") + var y = *(*string)(unsafe.Pointer(&x)) + var z = string(x) + + if y != z { + t.Fail() + } +} + +func Benchmark_Normal(b *testing.B) { + var x = []byte("Hello World!") + for i := 0; i < b.N; i++ { + _ = string(x) + } +} + +func Benchmark_ByteString(b *testing.B) { + var x = []byte("Hello World!") + for i := 0; i < b.N; i++ { + _ = *(*string)(unsafe.Pointer(&x)) + } +} + +type V struct { + i int32 + j int64 +} + +func (this V) PutI() { + fmt.Printf("i=%d\n", this.i) +} + +func (this V) PutJ() { + fmt.Printf("j=%d\n", this.j) +} + +func ExampleUnsafe() { + // 分配空间,创建新对象 + var v *V = new(V) + + // 将 v 的指针转换为 int32 的指针 + var i *int32 = (*int32)(unsafe.Pointer(v)) + // 赋值,相当于给 V.i 赋值 + *i = int32(98) + + // 获取 V.j 的指针 + // 方法是 i 的指针加上一个 int32 的长度,因为结构体内的内存是连续的 + var j *int64 = (*int64)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + uintptr(unsafe.Sizeof(int32(0))))) + *j = int64(763) + + // 输出,会发现私有变量的值都被改变了 + v.PutI() + v.PutJ() +} diff --git a/golang/templates/simple-login.html b/golang/templates/simple-login.html deleted file mode 100644 index e7a8c451..00000000 --- a/golang/templates/simple-login.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - Simple Login - - - -
- - - -
- - \ No newline at end of file diff --git a/kibana/plugins/demo/yarn.lock b/kibana/plugins/demo/yarn.lock index 32dd28a0..50d9e0c5 100644 --- a/kibana/plugins/demo/yarn.lock +++ b/kibana/plugins/demo/yarn.lock @@ -1,6 +1,8 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 -"@babel/code-frame@^7.0.0-beta.40", "@babel/code-frame@7.0.0-beta.40": + + +"@babel/code-frame@7.0.0-beta.40", "@babel/code-frame@^7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6" dependencies: @@ -61,7 +63,7 @@ invariant "^2.2.0" lodash "^4.2.0" -"@babel/types@^7.0.0-beta.40", "@babel/types@7.0.0-beta.40": +"@babel/types@7.0.0-beta.40", "@babel/types@^7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.40.tgz#25c3d7aae14126abe05fcb098c65a66b6d6b8c14" dependencies: @@ -118,14 +120,14 @@ acorn-jsx@^3.0.0: dependencies: acorn "^3.0.4" +acorn@4.X, acorn@^4.0.3: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" -acorn@^4.0.3, acorn@4.X: - version "4.0.13" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" - acorn@^5.0.0, acorn@^5.4.0: version "5.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" @@ -298,14 +300,14 @@ asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" -assert-plus@^1.0.0, assert-plus@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - assert@^1.1.1: version "1.4.1" resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" @@ -357,7 +359,7 @@ babel-eslint@^8.0.2: eslint-scope "~3.7.1" eslint-visitor-keys "^1.0.0" -babylon@^7.0.0-beta.40, babylon@7.0.0-beta.40: +babylon@7.0.0-beta.40, babylon@^7.0.0-beta.40: version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.40.tgz#91fc8cd56d5eb98b28e6fde41045f2957779940a" @@ -390,8 +392,8 @@ block-stream@*: inherits "~2.0.0" bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" boom@2.x.x: version "2.10.1" @@ -697,7 +699,7 @@ core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" -core-util-is@~1.0.0, core-util-is@1.0.2: +core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -791,7 +793,7 @@ debug-fabulous@0.0.X: lazy-debug-legacy "0.0.X" object-assign "4.1.0" -debug@^2.2.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9, debug@2.X: +debug@2.X, debug@^2.2.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -865,12 +867,6 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" -doctrine@^2.0.2, doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - dependencies: - esutils "^2.0.2" - doctrine@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" @@ -878,6 +874,12 @@ doctrine@1.5.0: esutils "^2.0.2" isarray "^1.0.0" +doctrine@^2.0.2, doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + dependencies: + esutils "^2.0.2" + domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" @@ -898,8 +900,8 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" elliptic@^6.0.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" dependencies: bn.js "^4.4.0" brorand "^1.0.1" @@ -1008,7 +1010,7 @@ es6-set@~0.1.5: es6-symbol "3.1.1" event-emitter "~0.3.5" -es6-symbol@^3.1.1, es6-symbol@~3.1.1, es6-symbol@3.1.1: +es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: @@ -1282,14 +1284,14 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + fast-deep-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" @@ -1543,7 +1545,7 @@ globby@^5.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -graceful-fs@^4.0.0, graceful-fs@^4.1.2, graceful-fs@4.X: +graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.2: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -1626,13 +1628,13 @@ hash-base@^3.0.0: safe-buffer "^5.0.1" hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" dependencies: inherits "^2.0.3" - minimalistic-assert "^1.0.0" + minimalistic-assert "^1.0.1" -hawk@~3.1.3, hawk@3.1.3: +hawk@3.1.3, hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" dependencies: @@ -1696,9 +1698,9 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3, inherits@2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" inherits@2.0.1: version "2.0.1" @@ -1925,14 +1927,14 @@ is-windows@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" -isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -2204,20 +2206,24 @@ mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" -minimalistic-assert@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, "minimatch@2 || 3": +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: brace-expansion "^1.1.7" +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + minimist@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" @@ -2226,11 +2232,7 @@ minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0: +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -2352,14 +2354,14 @@ oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - object-assign@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" +object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + object-keys@^1.0.8: version "1.0.11" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" @@ -2629,14 +2631,14 @@ public-encrypt@^4.0.0: parse-asn1 "^5.0.0" randombytes "^2.0.1" -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" @@ -2697,6 +2699,15 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" +"readable-stream@>=1.0.33-1 <1.1.0-0": + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071" @@ -2709,15 +2720,6 @@ readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable string_decoder "~1.0.3" util-deprecate "~1.0.1" -"readable-stream@>=1.0.33-1 <1.1.0-0": - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - readdirp@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" @@ -2745,14 +2747,14 @@ repeat-string@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" -replace-ext@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" - replace-ext@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" +replace-ext@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" + request@2.81.0: version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" @@ -2829,7 +2831,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1, rimraf@2: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: @@ -2866,7 +2868,7 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" -semver@^5.3.0, "semver@2 || 3 || 4 || 5": +"semver@2 || 3 || 4 || 5", semver@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" @@ -3006,16 +3008,6 @@ stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" -string_decoder@^1.0.0, string_decoder@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -3031,6 +3023,16 @@ string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string_decoder@^1.0.0, string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -3054,7 +3056,7 @@ strip-bom-stream@^1.0.0: first-chunk-stream "^1.0.0" strip-bom "^2.0.0" -strip-bom@^2.0.0, strip-bom@2.X: +strip-bom@2.X, strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" dependencies: @@ -3132,10 +3134,6 @@ text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - through2-filter@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec" @@ -3150,6 +3148,13 @@ through2-map@^3.0.0: through2 "~2.0.0" xtend "^4.0.0" +through2@2.X, through2@^2.0.0, through2@^2.0.1, through2@^2.0.3, through2@~2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + through2@^0.6.0: version "0.6.5" resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" @@ -3157,12 +3162,9 @@ through2@^0.6.0: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" -through2@^2.0.0, through2@^2.0.1, through2@^2.0.3, through2@~2.0.0, through2@2.X: - version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" - dependencies: - readable-stream "^2.1.5" - xtend "~4.0.1" +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" timers-browserify@^2.0.4: version "2.0.6" @@ -3285,7 +3287,7 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -util@^0.10.3, util@0.10.3: +util@0.10.3, util@^0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" dependencies: @@ -3330,7 +3332,7 @@ vinyl-fs@2.3.1: through2-filter "^2.0.0" vinyl "^1.0.0" -vinyl@^1.0.0, vinyl@1.X: +vinyl@1.X, vinyl@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" dependencies: @@ -3421,14 +3423,14 @@ window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -3446,7 +3448,7 @@ write@^0.2.1: dependencies: mkdirp "^0.5.1" -xtend@^4.0.0, "xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.0, xtend@~4.0.1: +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -3502,4 +3504,3 @@ yazl@^2.1.0: resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.4.3.tgz#ec26e5cc87d5601b9df8432dbdd3cd2e5173a071" dependencies: buffer-crc32 "~0.2.3" - diff --git a/leetcode/python/Lesson 1~10.ipynb b/leetcode/python/Lesson 1~10.ipynb index f7dbfb88..bec9ac40 100644 --- a/leetcode/python/Lesson 1~10.ipynb +++ b/leetcode/python/Lesson 1~10.ipynb @@ -539,7 +539,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.2" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/py27/README.md b/py2/README.md similarity index 100% rename from py27/README.md rename to py2/README.md diff --git a/py27/builtins.ipynb b/py2/builtins.ipynb similarity index 100% rename from py27/builtins.ipynb rename to py2/builtins.ipynb diff --git a/py27/cython/Rectangle.cpp b/py2/cython/Rectangle.cpp similarity index 100% rename from py27/cython/Rectangle.cpp rename to py2/cython/Rectangle.cpp diff --git a/py27/cython/Rectangle.h b/py2/cython/Rectangle.h similarity index 100% rename from py27/cython/Rectangle.h rename to py2/cython/Rectangle.h diff --git a/py27/cython/helloworld.pyx b/py2/cython/helloworld.pyx similarity index 100% rename from py27/cython/helloworld.pyx rename to py2/cython/helloworld.pyx diff --git a/py27/cython/rect.cpp b/py2/cython/rect.cpp similarity index 100% rename from py27/cython/rect.cpp rename to py2/cython/rect.cpp diff --git a/py27/cython/rect.pyx b/py2/cython/rect.pyx similarity index 100% rename from py27/cython/rect.pyx rename to py2/cython/rect.pyx diff --git a/py27/cython/setup.py b/py2/cython/setup.py similarity index 100% rename from py27/cython/setup.py rename to py2/cython/setup.py diff --git a/py27/django/README.md b/py2/django/README.md similarity index 100% rename from py27/django/README.md rename to py2/django/README.md diff --git a/py27/django/mysite/app/__init__.py b/py2/django/mysite/app/__init__.py similarity index 100% rename from py27/django/mysite/app/__init__.py rename to py2/django/mysite/app/__init__.py diff --git a/py27/django/mysite/app/models.py b/py2/django/mysite/app/models.py similarity index 100% rename from py27/django/mysite/app/models.py rename to py2/django/mysite/app/models.py diff --git a/py27/django/mysite/app/templatetags/__init__.py b/py2/django/mysite/app/templatetags/__init__.py similarity index 100% rename from py27/django/mysite/app/templatetags/__init__.py rename to py2/django/mysite/app/templatetags/__init__.py diff --git a/py27/django/mysite/app/templatetags/my_filter.py b/py2/django/mysite/app/templatetags/my_filter.py similarity index 100% rename from py27/django/mysite/app/templatetags/my_filter.py rename to py2/django/mysite/app/templatetags/my_filter.py diff --git a/py27/django/mysite/app/templatetags/my_tags.py b/py2/django/mysite/app/templatetags/my_tags.py similarity index 100% rename from py27/django/mysite/app/templatetags/my_tags.py rename to py2/django/mysite/app/templatetags/my_tags.py diff --git a/py27/django/mysite/app/urls.py b/py2/django/mysite/app/urls.py similarity index 100% rename from py27/django/mysite/app/urls.py rename to py2/django/mysite/app/urls.py diff --git a/py27/django/mysite/app/views.py b/py2/django/mysite/app/views.py similarity index 100% rename from py27/django/mysite/app/views.py rename to py2/django/mysite/app/views.py diff --git a/py27/django/mysite/db.sqlite3 b/py2/django/mysite/db.sqlite3 similarity index 100% rename from py27/django/mysite/db.sqlite3 rename to py2/django/mysite/db.sqlite3 diff --git a/py27/django/mysite/manage.py b/py2/django/mysite/manage.py similarity index 100% rename from py27/django/mysite/manage.py rename to py2/django/mysite/manage.py diff --git a/py27/django/mysite/mysite/__init__.py b/py2/django/mysite/mysite/__init__.py similarity index 100% rename from py27/django/mysite/mysite/__init__.py rename to py2/django/mysite/mysite/__init__.py diff --git a/py27/django/mysite/mysite/db.sqlite3 b/py2/django/mysite/mysite/db.sqlite3 similarity index 100% rename from py27/django/mysite/mysite/db.sqlite3 rename to py2/django/mysite/mysite/db.sqlite3 diff --git a/py27/django/mysite/mysite/routers.py b/py2/django/mysite/mysite/routers.py similarity index 100% rename from py27/django/mysite/mysite/routers.py rename to py2/django/mysite/mysite/routers.py diff --git a/py27/django/mysite/mysite/settings.py b/py2/django/mysite/mysite/settings.py similarity index 100% rename from py27/django/mysite/mysite/settings.py rename to py2/django/mysite/mysite/settings.py diff --git a/py27/django/mysite/mysite/urls.py b/py2/django/mysite/mysite/urls.py similarity index 100% rename from py27/django/mysite/mysite/urls.py rename to py2/django/mysite/mysite/urls.py diff --git a/py27/django/mysite/mysite/views.py b/py2/django/mysite/mysite/views.py similarity index 100% rename from py27/django/mysite/mysite/views.py rename to py2/django/mysite/mysite/views.py diff --git a/py27/django/mysite/mysite/wsgi.py b/py2/django/mysite/mysite/wsgi.py similarity index 100% rename from py27/django/mysite/mysite/wsgi.py rename to py2/django/mysite/mysite/wsgi.py diff --git a/py27/django/mysite/nosql/__init__.py b/py2/django/mysite/nosql/__init__.py similarity index 100% rename from py27/django/mysite/nosql/__init__.py rename to py2/django/mysite/nosql/__init__.py diff --git a/py27/django/mysite/nosql/models.py b/py2/django/mysite/nosql/models.py similarity index 100% rename from py27/django/mysite/nosql/models.py rename to py2/django/mysite/nosql/models.py diff --git a/py27/django/mysite/nosql/urls.py b/py2/django/mysite/nosql/urls.py similarity index 100% rename from py27/django/mysite/nosql/urls.py rename to py2/django/mysite/nosql/urls.py diff --git a/py27/django/mysite/nosql/views.py b/py2/django/mysite/nosql/views.py similarity index 100% rename from py27/django/mysite/nosql/views.py rename to py2/django/mysite/nosql/views.py diff --git a/py27/django/mysite/notebook/nosql.ipynb b/py2/django/mysite/notebook/nosql.ipynb similarity index 100% rename from py27/django/mysite/notebook/nosql.ipynb rename to py2/django/mysite/notebook/nosql.ipynb diff --git a/py27/django/mysite/requirements.txt b/py2/django/mysite/requirements.txt similarity index 100% rename from py27/django/mysite/requirements.txt rename to py2/django/mysite/requirements.txt diff --git a/py27/django/mysite/rest/__init__.py b/py2/django/mysite/rest/__init__.py similarity index 100% rename from py27/django/mysite/rest/__init__.py rename to py2/django/mysite/rest/__init__.py diff --git a/py27/django/mysite/rest/apis.py b/py2/django/mysite/rest/apis.py similarity index 100% rename from py27/django/mysite/rest/apis.py rename to py2/django/mysite/rest/apis.py diff --git a/py27/django/mysite/rest/models.py b/py2/django/mysite/rest/models.py similarity index 100% rename from py27/django/mysite/rest/models.py rename to py2/django/mysite/rest/models.py diff --git a/py27/django/mysite/rest/urls.py b/py2/django/mysite/rest/urls.py similarity index 100% rename from py27/django/mysite/rest/urls.py rename to py2/django/mysite/rest/urls.py diff --git a/py27/django/mysite/rest/views.py b/py2/django/mysite/rest/views.py similarity index 100% rename from py27/django/mysite/rest/views.py rename to py2/django/mysite/rest/views.py diff --git a/py27/django/mysite/templates/demo.html b/py2/django/mysite/templates/demo.html similarity index 100% rename from py27/django/mysite/templates/demo.html rename to py2/django/mysite/templates/demo.html diff --git a/py27/django/mysite/templates/nosql/posts_list.html b/py2/django/mysite/templates/nosql/posts_list.html similarity index 100% rename from py27/django/mysite/templates/nosql/posts_list.html rename to py2/django/mysite/templates/nosql/posts_list.html diff --git a/py27/django/mysite/templates/user/authorized.html b/py2/django/mysite/templates/user/authorized.html similarity index 100% rename from py27/django/mysite/templates/user/authorized.html rename to py2/django/mysite/templates/user/authorized.html diff --git a/py27/django/mysite/templates/user/login.html b/py2/django/mysite/templates/user/login.html similarity index 100% rename from py27/django/mysite/templates/user/login.html rename to py2/django/mysite/templates/user/login.html diff --git a/py27/django/mysite/templates/user/register.html b/py2/django/mysite/templates/user/register.html similarity index 100% rename from py27/django/mysite/templates/user/register.html rename to py2/django/mysite/templates/user/register.html diff --git a/py27/django/mysite/user/__init__.py b/py2/django/mysite/user/__init__.py similarity index 100% rename from py27/django/mysite/user/__init__.py rename to py2/django/mysite/user/__init__.py diff --git a/py27/django/mysite/user/forms.py b/py2/django/mysite/user/forms.py similarity index 100% rename from py27/django/mysite/user/forms.py rename to py2/django/mysite/user/forms.py diff --git a/py27/django/mysite/user/urls.py b/py2/django/mysite/user/urls.py similarity index 100% rename from py27/django/mysite/user/urls.py rename to py2/django/mysite/user/urls.py diff --git a/py27/django/mysite/user/views.py b/py2/django/mysite/user/views.py similarity index 100% rename from py27/django/mysite/user/views.py rename to py2/django/mysite/user/views.py diff --git a/py27/django/rest/README.md b/py2/django/rest/README.md similarity index 100% rename from py27/django/rest/README.md rename to py2/django/rest/README.md diff --git a/py27/django/rest/apis/__init__.py b/py2/django/rest/apis/__init__.py similarity index 100% rename from py27/django/rest/apis/__init__.py rename to py2/django/rest/apis/__init__.py diff --git a/py27/django/rest/apis/models/__init__.py b/py2/django/rest/apis/models/__init__.py similarity index 100% rename from py27/django/rest/apis/models/__init__.py rename to py2/django/rest/apis/models/__init__.py diff --git a/py27/django/rest/apis/models/fields.py b/py2/django/rest/apis/models/fields.py similarity index 100% rename from py27/django/rest/apis/models/fields.py rename to py2/django/rest/apis/models/fields.py diff --git a/py27/django/rest/apis/serializers/__init__.py b/py2/django/rest/apis/serializers/__init__.py similarity index 100% rename from py27/django/rest/apis/serializers/__init__.py rename to py2/django/rest/apis/serializers/__init__.py diff --git a/py27/django/rest/apis/serializers/fields.py b/py2/django/rest/apis/serializers/fields.py similarity index 100% rename from py27/django/rest/apis/serializers/fields.py rename to py2/django/rest/apis/serializers/fields.py diff --git a/py27/django/rest/apis/urls.py b/py2/django/rest/apis/urls.py similarity index 100% rename from py27/django/rest/apis/urls.py rename to py2/django/rest/apis/urls.py diff --git a/py27/django/rest/apis/utils/__init__.py b/py2/django/rest/apis/utils/__init__.py similarity index 100% rename from py27/django/rest/apis/utils/__init__.py rename to py2/django/rest/apis/utils/__init__.py diff --git a/py27/django/rest/apis/utils/encrypt.py b/py2/django/rest/apis/utils/encrypt.py similarity index 100% rename from py27/django/rest/apis/utils/encrypt.py rename to py2/django/rest/apis/utils/encrypt.py diff --git a/py27/django/rest/apis/views.py b/py2/django/rest/apis/views.py similarity index 100% rename from py27/django/rest/apis/views.py rename to py2/django/rest/apis/views.py diff --git a/py27/django/rest/manage.py b/py2/django/rest/manage.py similarity index 100% rename from py27/django/rest/manage.py rename to py2/django/rest/manage.py diff --git a/py27/django/rest/quickstart/__init__.py b/py2/django/rest/quickstart/__init__.py similarity index 100% rename from py27/django/rest/quickstart/__init__.py rename to py2/django/rest/quickstart/__init__.py diff --git a/py27/django/rest/quickstart/serializers.py b/py2/django/rest/quickstart/serializers.py similarity index 100% rename from py27/django/rest/quickstart/serializers.py rename to py2/django/rest/quickstart/serializers.py diff --git a/py27/django/rest/quickstart/urls.py b/py2/django/rest/quickstart/urls.py similarity index 100% rename from py27/django/rest/quickstart/urls.py rename to py2/django/rest/quickstart/urls.py diff --git a/py27/django/rest/quickstart/views.py b/py2/django/rest/quickstart/views.py similarity index 100% rename from py27/django/rest/quickstart/views.py rename to py2/django/rest/quickstart/views.py diff --git a/py27/django/rest/requirements.txt b/py2/django/rest/requirements.txt similarity index 100% rename from py27/django/rest/requirements.txt rename to py2/django/rest/requirements.txt diff --git a/py27/django/rest/rest/__init__.py b/py2/django/rest/rest/__init__.py similarity index 100% rename from py27/django/rest/rest/__init__.py rename to py2/django/rest/rest/__init__.py diff --git a/py27/django/rest/rest/settings.py b/py2/django/rest/rest/settings.py similarity index 100% rename from py27/django/rest/rest/settings.py rename to py2/django/rest/rest/settings.py diff --git a/py27/django/rest/rest/urls.py b/py2/django/rest/rest/urls.py similarity index 100% rename from py27/django/rest/rest/urls.py rename to py2/django/rest/rest/urls.py diff --git a/py27/django/rest/rest/wsgi.py b/py2/django/rest/rest/wsgi.py similarity index 100% rename from py27/django/rest/rest/wsgi.py rename to py2/django/rest/rest/wsgi.py diff --git a/py27/django/rest/simple/__init__.py b/py2/django/rest/simple/__init__.py similarity index 100% rename from py27/django/rest/simple/__init__.py rename to py2/django/rest/simple/__init__.py diff --git a/py27/django/rest/simple/urls.py b/py2/django/rest/simple/urls.py similarity index 100% rename from py27/django/rest/simple/urls.py rename to py2/django/rest/simple/urls.py diff --git a/py27/ldap-demo/ldap.ipynb b/py2/ldap-demo/ldap.ipynb similarity index 100% rename from py27/ldap-demo/ldap.ipynb rename to py2/ldap-demo/ldap.ipynb diff --git a/py27/pygraphviz/README.md b/py2/pygraphviz/README.md similarity index 100% rename from py27/pygraphviz/README.md rename to py2/pygraphviz/README.md diff --git a/py27/pygraphviz/circo.jpg b/py2/pygraphviz/circo.jpg similarity index 100% rename from py27/pygraphviz/circo.jpg rename to py2/pygraphviz/circo.jpg diff --git a/py27/pygraphviz/demo.ipynb b/py2/pygraphviz/demo.ipynb similarity index 100% rename from py27/pygraphviz/demo.ipynb rename to py2/pygraphviz/demo.ipynb diff --git a/py27/pygraphviz/dot.jpg b/py2/pygraphviz/dot.jpg similarity index 100% rename from py27/pygraphviz/dot.jpg rename to py2/pygraphviz/dot.jpg diff --git a/py27/pygraphviz/edge.jpg b/py2/pygraphviz/edge.jpg similarity index 100% rename from py27/pygraphviz/edge.jpg rename to py2/pygraphviz/edge.jpg diff --git a/py27/pygraphviz/fdp.jpg b/py2/pygraphviz/fdp.jpg similarity index 100% rename from py27/pygraphviz/fdp.jpg rename to py2/pygraphviz/fdp.jpg diff --git a/py27/pygraphviz/g.jpg b/py2/pygraphviz/g.jpg similarity index 100% rename from py27/pygraphviz/g.jpg rename to py2/pygraphviz/g.jpg diff --git a/py27/pygraphviz/head.jpg b/py2/pygraphviz/head.jpg similarity index 100% rename from py27/pygraphviz/head.jpg rename to py2/pygraphviz/head.jpg diff --git a/py27/pygraphviz/html.jpg b/py2/pygraphviz/html.jpg similarity index 100% rename from py27/pygraphviz/html.jpg rename to py2/pygraphviz/html.jpg diff --git a/py27/pygraphviz/img/core-router.jpg b/py2/pygraphviz/img/core-router.jpg similarity index 100% rename from py27/pygraphviz/img/core-router.jpg rename to py2/pygraphviz/img/core-router.jpg diff --git a/py27/pygraphviz/img/firewall.jpg b/py2/pygraphviz/img/firewall.jpg similarity index 100% rename from py27/pygraphviz/img/firewall.jpg rename to py2/pygraphviz/img/firewall.jpg diff --git a/py27/pygraphviz/img/link_proof.jpg b/py2/pygraphviz/img/link_proof.jpg similarity index 100% rename from py27/pygraphviz/img/link_proof.jpg rename to py2/pygraphviz/img/link_proof.jpg diff --git a/py27/pygraphviz/img/network.jpg b/py2/pygraphviz/img/network.jpg similarity index 100% rename from py27/pygraphviz/img/network.jpg rename to py2/pygraphviz/img/network.jpg diff --git a/py27/pygraphviz/img/router.jpg b/py2/pygraphviz/img/router.jpg similarity index 100% rename from py27/pygraphviz/img/router.jpg rename to py2/pygraphviz/img/router.jpg diff --git a/py27/pygraphviz/img/s5700.jpg b/py2/pygraphviz/img/s5700.jpg similarity index 100% rename from py27/pygraphviz/img/s5700.jpg rename to py2/pygraphviz/img/s5700.jpg diff --git a/py27/pygraphviz/img/server.jpg b/py2/pygraphviz/img/server.jpg similarity index 100% rename from py27/pygraphviz/img/server.jpg rename to py2/pygraphviz/img/server.jpg diff --git a/py27/pygraphviz/img/switch.jpg b/py2/pygraphviz/img/switch.jpg similarity index 100% rename from py27/pygraphviz/img/switch.jpg rename to py2/pygraphviz/img/switch.jpg diff --git a/py27/pygraphviz/neato.jpg b/py2/pygraphviz/neato.jpg similarity index 100% rename from py27/pygraphviz/neato.jpg rename to py2/pygraphviz/neato.jpg diff --git a/py27/pygraphviz/node.jpg b/py2/pygraphviz/node.jpg similarity index 100% rename from py27/pygraphviz/node.jpg rename to py2/pygraphviz/node.jpg diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/.gitignore b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/.gitignore similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/.gitignore rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/.gitignore diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/INSTALL.txt b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/INSTALL.txt similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/INSTALL.txt rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/INSTALL.txt diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/MANIFEST.in b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/MANIFEST.in similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/MANIFEST.in rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/MANIFEST.in diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/Makefile b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/Makefile similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/Makefile rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/Makefile diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/README.txt b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/README.txt similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/README.txt rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/README.txt diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/Makefile b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/Makefile similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/Makefile rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/Makefile diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/gh-pages.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/gh-pages.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/gh-pages.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/gh-pages.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/conf.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/conf.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/conf.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/conf.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/download.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/download.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/download.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/download.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/examples.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/examples.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/examples.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/examples.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/index.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/index.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/index.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/index.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/install.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/install.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/install.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/install.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/agraph.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/agraph.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/agraph.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/agraph.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/api_notes.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/api_notes.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/api_notes.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/api_notes.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/credits.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/credits.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/credits.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/credits.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/faq.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/faq.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/faq.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/faq.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/history.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/history.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/history.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/history.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/index.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/index.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/index.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/index.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/legal.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/legal.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/legal.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/legal.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/news.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/news.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/news.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/news.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/related.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/related.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/related.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/reference/related.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/contents.png b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/contents.png similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/contents.png rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/contents.png diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/empty.txt b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/empty.txt similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/empty.txt rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/empty.txt diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/navigation.png b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/navigation.png similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/navigation.png rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/navigation.png diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/sphinxdoc.css b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/sphinxdoc.css similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/sphinxdoc.css rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/static/sphinxdoc.css diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/index.html b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/index.html similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/index.html rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/index.html diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/indexsidebar.html b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/indexsidebar.html similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/indexsidebar.html rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/indexsidebar.html diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/layout.html b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/layout.html similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/layout.html rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/templates/layout.html diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/tutorial.rst b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/tutorial.rst similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/tutorial.rst rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/source/tutorial.rst diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/sphinxext/only_directives.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/sphinxext/only_directives.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/sphinxext/only_directives.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/doc/sphinxext/only_directives.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/attributes.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/attributes.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/attributes.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/attributes.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/django_simple.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/django_simple.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/django_simple.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/django_simple.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/miles.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/miles.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/miles.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/miles.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/miles_dat.txt.gz b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/miles_dat.txt.gz similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/miles_dat.txt.gz rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/miles_dat.txt.gz diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/simple.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/simple.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/simple.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/simple.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/star.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/star.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/star.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/star.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/subgraph.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/subgraph.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/subgraph.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/subgraph.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/utf8_encoding.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/utf8_encoding.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/utf8_encoding.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/examples/utf8_encoding.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/__init__.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/__init__.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/__init__.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/__init__.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/agraph.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/agraph.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/agraph.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/agraph.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz.i b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz.i similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz.i rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz.i diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz_wrap.c b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz_wrap.c similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz_wrap.c rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/graphviz_wrap.c diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/release.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/release.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/release.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/release.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/__init__.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/__init__.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/__init__.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/__init__.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_attribute_defaults.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_attribute_defaults.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_attribute_defaults.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_attribute_defaults.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_attributes.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_attributes.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_attributes.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_attributes.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_drawing.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_drawing.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_drawing.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_drawing.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_edge_attributes.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_edge_attributes.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_edge_attributes.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_edge_attributes.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_graph.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_graph.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_graph.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_graph.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_html.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_html.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_html.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_html.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_layout.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_layout.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_layout.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_layout.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_node_attributes.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_node_attributes.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_node_attributes.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_node_attributes.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_readwrite.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_readwrite.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_readwrite.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_readwrite.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_string.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_string.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_string.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_string.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_subgraph.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_subgraph.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_subgraph.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_subgraph.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_unicode.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_unicode.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_unicode.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pygraphviz/tests/test_unicode.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pystrings.swg b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pystrings.swg similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pystrings.swg rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/pystrings.swg diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup.cfg b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup.cfg similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup.cfg rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup.cfg diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup_egg.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup_egg.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup_egg.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup_egg.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup_extra.py b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup_extra.py similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup_extra.py rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/setup_extra.py diff --git a/py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/tox.ini b/py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/tox.ini similarity index 100% rename from py27/pygraphviz/pygraphviz-pygraphviz-1.3rc2/tox.ini rename to py2/pygraphviz/pygraphviz-pygraphviz-1.3rc2/tox.ini diff --git a/py27/pygraphviz/pygraphviz.ipynb b/py2/pygraphviz/pygraphviz.ipynb similarity index 100% rename from py27/pygraphviz/pygraphviz.ipynb rename to py2/pygraphviz/pygraphviz.ipynb diff --git a/py27/pygraphviz/pytopo.ipynb b/py2/pygraphviz/pytopo.ipynb similarity index 100% rename from py27/pygraphviz/pytopo.ipynb rename to py2/pygraphviz/pytopo.ipynb diff --git a/py27/pygraphviz/pytopo.py b/py2/pygraphviz/pytopo.py similarity index 100% rename from py27/pygraphviz/pytopo.py rename to py2/pygraphviz/pytopo.py diff --git a/py27/pygraphviz/simple.jpg b/py2/pygraphviz/simple.jpg similarity index 100% rename from py27/pygraphviz/simple.jpg rename to py2/pygraphviz/simple.jpg diff --git a/py27/pygraphviz/subgraph.jpg b/py2/pygraphviz/subgraph.jpg similarity index 100% rename from py27/pygraphviz/subgraph.jpg rename to py2/pygraphviz/subgraph.jpg diff --git a/py27/pygraphviz/topo.jpg b/py2/pygraphviz/topo.jpg similarity index 100% rename from py27/pygraphviz/topo.jpg rename to py2/pygraphviz/topo.jpg diff --git a/py27/pygraphviz/twopi.jpg b/py2/pygraphviz/twopi.jpg similarity index 100% rename from py27/pygraphviz/twopi.jpg rename to py2/pygraphviz/twopi.jpg diff --git a/py27/queue.ipynb b/py2/queue.ipynb similarity index 100% rename from py27/queue.ipynb rename to py2/queue.ipynb diff --git a/py27/requirements.txt b/py2/requirements.txt similarity index 100% rename from py27/requirements.txt rename to py2/requirements.txt diff --git a/py27/sqlite.ipynb b/py2/sqlite.ipynb similarity index 100% rename from py27/sqlite.ipynb rename to py2/sqlite.ipynb diff --git a/py36/DFA.ipynb b/py3/DFA.ipynb similarity index 100% rename from py36/DFA.ipynb rename to py3/DFA.ipynb diff --git a/py3/README.md b/py3/README.md new file mode 100644 index 00000000..8cda8f8a --- /dev/null +++ b/py3/README.md @@ -0,0 +1,11 @@ +# Fun in Python3.x + + +Python 是门好语言 + +写过几篇介绍文: + +* +* +* + diff --git a/py3/Untitled.ipynb b/py3/Untitled.ipynb new file mode 100644 index 00000000..d72316b1 --- /dev/null +++ b/py3/Untitled.ipynb @@ -0,0 +1,130 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "import json\n", + "import gzip\n", + "import base64" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "22410" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "a = '''\n", + "{\\\"bodyEncryptAlg\\\":\\\"\\\",\\\"bodyPtlVersion\\\":\\\"32\\\",\\\"channelType\\\":\\\"NETTY_HTTP\\\",\\\"clientId\\\":\\\"P866793030084423\\\",\\\"clientType\\\":\\\"0\\\",\\\"colletionDataTime\\\":\\\"2019-08-22 13:51:50\\\",\\\"content\\\":\\\"7e107d014e2cdcca7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004bf7c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdccc7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c47c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdccd7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c17c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcce7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c27c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcd07d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004bf7c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcd17d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c27c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcd27d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c17c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcd47d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c27c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcd57d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c47c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcd67d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c27c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcd87d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c57c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcd97d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c47c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcdb7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c07c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcdc7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c37c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcde7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b77c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c07c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcdf7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b77c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004bf7c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdce07d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b77c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c17c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdce17d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b77c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c17c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdce37d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b77c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c47c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdce47d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b77c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004be7c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdce67d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b77c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c17c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdce77d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b77c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a010202010002010000000\\n07c9b007c9c007c9d0004c07c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdce87d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b77c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c27c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcea7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004bf7c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdceb7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c27c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdced7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c37c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcee7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c07c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcef7d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c57c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcf07d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004c27c9e00357c9f007ca1000100000000000000017ca2003c2800657d014e2cdcf17d027c05073d061801dbf83c7c08000000007c0900007c0b007c0e007c10177c11027c1202007c1301b87c1b000000007c1d007c240000007c270000007c2901044280007c3a00017c40000000007c57007c7000007c710000000000000000000000007c7242414e445f455f555452415f4f5045524154494e475f42414e445f337c737b013436307b0230337b0300007b04000031f07c74007c75000001007c7600000000007c77000000000000007c780000001e7c790000007c800000000064000064007c8100007c820000000000000000007c83007c84000000000000000000000000000000007c85000000007c86007c87007c88007c89d8d8d8d87c8a007c8b007c8c007c8d0000000000007c8e0000007c8f0000007c90007c91007c92007c93007c94007c95007c96007c97007c98007c99007c9a01020201000201000000007c9b007c9c007c9d0004bf7c9e00357c9f007ca1000100000000000000017ca2003c280065\\\",\\\"direction\\\":\\\"1\\\",\\\"errorMsg\\\":\\\"\\\",\\\"eventId\\\":\\\"50\\\",\\\"extra\\\":\\\"原始报文\\\",\\\"headerPtlVersion\\\":\\\"16\\\",\\\"isEncode\\\":\\\"0\\\",\\\"messageStatus\\\":\\\"2\\\",\\\"messageType\\\":\\\"42\\\",\\\"projectId\\\":\\\"\\\",\\\"receiveDataTime\\\":\\\"2019-08-22 13:51:54\\\",\\\"serviceType\\\":\\\"9\\\"}\n", + "'''\n", + "len(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2240" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(base64.b64encode(gzip.compress(a.encode('utf8'))).hex())" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "b'\\x1f\\x8b\\x08\\x00\\x19]^]\\x02\\xff\\x01x\\x03\\x87\\xfc\\x1f\\x8b\\x08\\x00\\x19]^]\\x02\\xff-\\x92\\xb7\\xba\\x83H\\x14\\x83\\x1f\\x88\\x02\\x18\\xc20\\xa5\\x01\\x13l\\xc0\\xe4\\xd4\\x01\\x83\\x8dM\\xce\\xe1\\xe9\\xf7\\xee~[\\xa9\\xd0\\x91\\xce_Hcg\\xfd&68n(\\x89$@\\xe1\\x819p\\\\Y\\x83d\\x1d\\xcckq\\'~\\x1d\\xee\\xd2\\xe5\\xe3\\xdc\\xd0s\\xbf\\xc7\\xfbC\\xb6\\xb1\\x15\\xa5\\xcd|,\\xed\\x01n\\xce\\xc5>%\\x97\\'\\xca\\xe3.D6\\xfb\\x0e\\x17\\xdf\\xccY\\xf2\\xb5\\x8bz\\xd6>\\x1a\\xd1\\'SD@\\x96\\xa8\\xf8\\xb2\\x0bv\\xbc\\xa43\\xc5\\xc5\\x0f~K\\xe2\\x90\\xa1\\x10Wl\\xa9P^\\xc0S\\x86\\x81dN5\\xf6\\xf2#\\x1e\\x95\\xb6\\xc9\\xfac\\xb2\\xf8%1\\x1a\\xf2\\xd5K\\x816\\x9c\\xe6 \\x90oR\\xd9\\xed\\x1fi\\xfd\\xb8\\xc4\\x88\\xec\\xc8\\xbe\\xafc\\xb7\\x8dCA\\xddu\\x83Mh\\xb7\\xdc0\\xf5\\x94\\xcasV\\xd8\\xb5/\\xcaQC.\\xb2C\\xa2Hi\\xea\\xa1&\\xfc\\xdd\\xa6\\x8d\\xb1[|-\\xac`\\x9e\\x17\\\\\\xf8\\x03\\xf1\\xb1:\\xe6\\x10\\x8b\\x86\\xf7\\xd1\\xfb\\xe1\\xa8\\x06\\xc4e\\xcf}_\\xeb\\xfa\\xb9\\xb6\\x8a\\x7fg&\\x1c\\xf8\\xd6\\x97P${\\xbf\\x98\\xea{\\xd4O6\\xa425X\\r.t\\x06\\xb5\\xaeT\\x96d\\xb81\\x9b}\\xab\\x1eM>\\x0b\\x01\\xd3\\x88\\x9e\\xae\\xca\\x02\\xe7{\\x16\\xe6\\xeb/\\x95\\x17\\x8d\\x11\\xac\\xd1U\\xd6\\x9d\\xe8\\x92\\xeb[J\\xcdy\\xfa\\x8c\\xfayL\\xb9\\n\\x16\\x9cd\\xdf}l\\xa3\\xef\\xe2\\x9c9{\\xdcb\\x93\\xa5\\xb5\\x94[\\x8a\\xec\\x04\\xbfP\\xcaFs2\\xb0\\xe8\\xbf^KJ\\x85\\xee\\xa5\\xf3\\x95\\x1cM\\x19\\xa7\\x04\\xd6\\x12ECP7$\\xe6\\xfb\\x18N!)\\x1b\\xf7\\xe1f\\xb3\\xd7\\x98\\xb7\\x83\\x92\\x06\\x991Vg9\\xfe\\x08\\x8bR\\xd7\\xd3\\xdd\\xaen\\xff]\\xe0\\x01\\x85\\xafG\\xda\\xbd\\x8d[\\x87\\xb4\\x13\\x9bL\\xfb\\x80hB\\xf4x,\\xc4\\xe8, \\xfe-|\\x12-\\x03\\xa9+\\x04\\xa2D$]\\xde31\\x1boe\\xb5L\\xc6\\xee*\\xa9\\xee\\xd4\\x19\\xd8\\xf4\\x0e8\\xd1=O\\x07_AB\\x9eQ\\xc7\\xc3\\xb7u\\x1d2\\xa7\\x8f|\\xcbq:\\xad)\\xc3DGq\\x06\\xc0\\xdc\\xb0\\xb9\\x7f\\xc2w\\xd2\\xad_\\xdb\\xbfb\\xd7nJ\\xaeG\\xa3\\x03ML\\x9b\\x08\\xf8C\\xd3m\\x9e\\x1c\\xec\\x0cu\\xd1\\xe9\\xba\\x84\\x04\\x96\\xde\"\\xfe\\xdb\\xd9\\x90\\xf1\\xb0\\x06\\x1e\\xdf\\x96\\xdc\\x97A\\xe0\\xc9G\\x19\\xef\\xd14\\xf3\\x10,\\xcaD\\x8c\\xb2M\\xf3B\\t4\\xd5\\xc0\\xfe\\xd7Jc\\xdb\\x12\\xf5\\x8a\\x16fi\\xa3\\xbf\\x08|P\\xe0b\\x06\\xb9\\xfe\\xeb\\xa5\\x99\\xf9\\x1c\\xddj\\x1d\\xba\\xf5\\xc4\\xfa\\x82F/\\xbf\\xb8?\\x03\\xbf\\x9a\\x88@\\x0fD\\xd3\\xc27\\xc6\\xa6\\x85L\\xf4\\xa7\\xcc\\xc98\\x17\\x93\\x85\\xc4\\xd7\\xf9\\x9f#\\xe6\\'\\xd1l\\xfe\\xfbI\\x8d \\xcd\\xc7\\x0c\\xd2\"-\\x9a\\xf7\\x7f\\x99\\x99\\x14\\xfb\\xef\\xd9\\x8b\\xdf\\xca\\xbf\\xb7G\\xc6\\x99\\x9ae[\\xf8N\\xdc`oB\\xe0\\xea\\xf7\\x8b\\xf9\\\\\\xcc\\x18\\x94\\xfd\\xae\\xbf\\x88B\\xfc\\xe3\\xdd\\xaa\\xcb\\xc1V\\xfb\\xe2N\\x06Q\\x85\\xd0k\\x83\\xb1e\\x1f)\\x96u\\x91\\xcf \\xd0\\xcd\\x96\\x92\\r\\xeck\\xe5@B\\xe8\\x14\\xf5\\xcd\\x1f\\xa6-\\xc1\\xf1\\xdb\\xb8\\x05 \\x81\\xb3\\x01|5\\xd3f\\xe8\\xf7\\xba\\x9d\\xe7\\x94\\xe1x\\x14\\x12i\\x9e\\x80G\\xdaW\\xa5\\xc4\\xe1\\x9f\\xa1\\xf4O\\xddY6b\\x84\\xeaaG\\x9d\\x81\\xdeo\\xbb\\x83\\xa4`\\xc7\\x90#\\x8b\\xbe\\xa3T\\xdc\\x1bs\\xc8\\x85i4J\\x02x\\xf0+\\xeb\\xb7\\xaf\\x1etv\\x92\\xbf\\xc6X0\\xbc\\x8d@e\\xae=s\\xe0V\\xb3\\x04\\x86~\\x8ec\\x7f\\n\\xd1\\xa7\\xc9\\xaa\\xc8\\x072\\x9d\\xc4\\xa6N\\xeeh\\xce.\\xa3\\x14a\\xa7\\xbb\\x077I\\xd0bD\\xf9\\xb4/X\\xf0^\\xb8\\xdfn\\xff\\x00\\xd9\\xd8}\\x03`\\x04\\x00\\x00\\x0f\\xa7\\xbd\\x83x\\x03\\x00\\x00'" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "gzip.compress(gzip.compress(base64.b64encode(gzip.compress(a.encode('utf8')))))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "ename": "JSONDecodeError", + "evalue": "Invalid control character at: line 2 column 16248 (char 16248)", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mJSONDecodeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mjson\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mloads\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m~/.pyenv/versions/3.7.4/lib/python3.7/json/__init__.py\u001b[0m in \u001b[0;36mloads\u001b[0;34m(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)\u001b[0m\n\u001b[1;32m 346\u001b[0m \u001b[0mparse_int\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mparse_float\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mand\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 347\u001b[0m parse_constant is None and object_pairs_hook is None and not kw):\n\u001b[0;32m--> 348\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m_default_decoder\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdecode\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 349\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcls\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 350\u001b[0m \u001b[0mcls\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mJSONDecoder\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.pyenv/versions/3.7.4/lib/python3.7/json/decoder.py\u001b[0m in \u001b[0;36mdecode\u001b[0;34m(self, s, _w)\u001b[0m\n\u001b[1;32m 335\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 336\u001b[0m \"\"\"\n\u001b[0;32m--> 337\u001b[0;31m \u001b[0mobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mend\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mraw_decode\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0midx\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0m_w\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 338\u001b[0m \u001b[0mend\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_w\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 339\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mend\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.pyenv/versions/3.7.4/lib/python3.7/json/decoder.py\u001b[0m in \u001b[0;36mraw_decode\u001b[0;34m(self, s, idx)\u001b[0m\n\u001b[1;32m 351\u001b[0m \"\"\"\n\u001b[1;32m 352\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 353\u001b[0;31m \u001b[0mobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mend\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscan_once\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0midx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 354\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mStopIteration\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0merr\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 355\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mJSONDecodeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Expecting value\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0ms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalue\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mJSONDecodeError\u001b[0m: Invalid control character at: line 2 column 16248 (char 16248)" + ] + } + ], + "source": [ + "json.loads(a)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/py36/aio-boto.ipynb b/py3/aio-boto.ipynb similarity index 100% rename from py36/aio-boto.ipynb rename to py3/aio-boto.ipynb diff --git a/py36/aio_ping_demo.py b/py3/aio_ping_demo.py similarity index 100% rename from py36/aio_ping_demo.py rename to py3/aio_ping_demo.py diff --git a/py36/aiofiles.ipynb b/py3/aiofiles.ipynb similarity index 100% rename from py36/aiofiles.ipynb rename to py3/aiofiles.ipynb diff --git a/py35/aiohttp.ipynb b/py3/aiohttp.ipynb similarity index 100% rename from py35/aiohttp.ipynb rename to py3/aiohttp.ipynb diff --git a/py36/aioping.ipynb b/py3/aioping.ipynb similarity index 100% rename from py36/aioping.ipynb rename to py3/aioping.ipynb diff --git a/py36/aioping_demo.py b/py3/aioping_demo.py similarity index 100% rename from py36/aioping_demo.py rename to py3/aioping_demo.py diff --git a/py35/airflow/.env b/py3/airflow/.env similarity index 100% rename from py35/airflow/.env rename to py3/airflow/.env diff --git a/py35/airflow/airflow.cfg b/py3/airflow/airflow.cfg similarity index 100% rename from py35/airflow/airflow.cfg rename to py3/airflow/airflow.cfg diff --git a/py35/airflow/airflow.db b/py3/airflow/airflow.db similarity index 100% rename from py35/airflow/airflow.db rename to py3/airflow/airflow.db diff --git a/py35/airflow/unittests.cfg b/py3/airflow/unittests.cfg similarity index 100% rename from py35/airflow/unittests.cfg rename to py3/airflow/unittests.cfg diff --git a/python-algorithms/DP.ipynb b/py3/algorithms/DP.ipynb similarity index 100% rename from python-algorithms/DP.ipynb rename to py3/algorithms/DP.ipynb diff --git a/python-algorithms/KMP.ipynb b/py3/algorithms/KMP.ipynb similarity index 100% rename from python-algorithms/KMP.ipynb rename to py3/algorithms/KMP.ipynb diff --git a/py3/algorithms/Untitled.ipynb b/py3/algorithms/Untitled.ipynb new file mode 100644 index 00000000..a2b90dcb --- /dev/null +++ b/py3/algorithms/Untitled.ipynb @@ -0,0 +1,62 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "tree(root=22, left=tree(root=5, left=tree(root=1, left=None, right=tree(root=2, left=None, right=None)), right=tree(root=8, left=tree(root=6, left=None, right=None), right=tree(root=12, left=None, right=None))), right=tree(root=56, left=tree(root=23, left=None, right=tree(root=54, left=None, right=None)), right=tree(root=89, left=tree(root=68, left=None, right=None), right=tree(root=976, left=None, right=None))))" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from collections import namedtuple\n", + "\n", + "\n", + "Tree = namedtuple('tree', ['root', 'left', 'right'])\n", + "\n", + "def build_obt(data, start, end):\n", + " if end < start:\n", + " return None\n", + "\n", + " mid = (end + start) // 2\n", + " left = build_obt(data, start, mid-1)\n", + " right = build_obt(data, mid+1, end)\n", + " return Tree(root=data[mid], left=left, right=right)\n", + "\n", + "\n", + "\n", + "s = sorted([1,2,6,8,5,22,68,976,23,54,89,12,56])\n", + "build_obt(s, 0, len(s)-1)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/python-algorithms/data-structure/Recursion.ipynb b/py3/algorithms/data-structure/Recursion.ipynb similarity index 100% rename from python-algorithms/data-structure/Recursion.ipynb rename to py3/algorithms/data-structure/Recursion.ipynb diff --git a/python-algorithms/data-structure/array.ipynb b/py3/algorithms/data-structure/array.ipynb similarity index 100% rename from python-algorithms/data-structure/array.ipynb rename to py3/algorithms/data-structure/array.ipynb diff --git a/python-algorithms/data-structure/heap.ipynb b/py3/algorithms/data-structure/heap.ipynb similarity index 100% rename from python-algorithms/data-structure/heap.ipynb rename to py3/algorithms/data-structure/heap.ipynb diff --git a/python-algorithms/data-structure/stack.ipynb b/py3/algorithms/data-structure/stack.ipynb similarity index 100% rename from python-algorithms/data-structure/stack.ipynb rename to py3/algorithms/data-structure/stack.ipynb diff --git a/python-algorithms/pybloof.ipynb b/py3/algorithms/pybloof.ipynb similarity index 100% rename from python-algorithms/pybloof.ipynb rename to py3/algorithms/pybloof.ipynb diff --git a/python-algorithms/sort.ipynb b/py3/algorithms/sort.ipynb similarity index 93% rename from python-algorithms/sort.ipynb rename to py3/algorithms/sort.ipynb index 61d697b6..ead780fd 100644 --- a/python-algorithms/sort.ipynb +++ b/py3/algorithms/sort.ipynb @@ -12,7 +12,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -58,26 +58,24 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "1 loops, best of 3: 646 ms per loop\n" + "603 ms ± 23.9 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n" ] } ], "source": [ "# 希尔排序\n", - "from math import floor\n", - "\n", "\n", "def shell_sort(numbers):\n", " step = 2\n", " n_numbers = len(numbers)\n", - " n_group = floor(n_numbers / 2)\n", + " n_group = n_numbers // 2\n", " while n_group > 0:\n", " for i in range(n_group):\n", " for j in range(i + n_group, n_numbers):\n", @@ -88,7 +86,7 @@ " numbers[k + n_group] = tmp\n", " numbers[k] = key\n", " \n", - " n_group = floor(n_group / step)\n", + " n_group = n_group // step\n", " \n", " return numbers\n", " \n", @@ -103,14 +101,14 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "10 loops, best of 3: 59.2 ms per loop\n" + "64.8 ms ± 4.98 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n" ] } ], @@ -118,13 +116,10 @@ "# 冒泡排序\n", "\n", "def bubble_sort(numbers):\n", - " for i, tmp1 in enumerate(numbers):\n", + " for i, tmp in enumerate(numbers):\n", " for j in range(i + 1, len(numbers)):\n", - " tmp2 = numbers[j]\n", - " if tmp1 > tmp2:\n", - " numbers[i] = tmp2\n", - " numbers[j] = tmp1\n", - " tmp1 = tmp2\n", + " if numbers[i] > numbers[j]:\n", + " numbers[i], numbers[j] = numbers[j], numbers[i]\n", " \n", " return numbers\n", "\n", @@ -295,21 +290,19 @@ "name": "stdout", "output_type": "stream", "text": [ - "100 loops, best of 3: 8.6 ms per loop\n" + "7.62 ms ± 752 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n" ] } ], "source": [ "# 归并排序\n", - "from math import floor\n", - "\n", "\n", "def merge_sort(numbers):\n", " size = len(numbers)\n", " if size <= 1:\n", " return numbers\n", " \n", - " threshold = floor(size / 2)\n", + " threshold = size // 2\n", " left = merge_sort(numbers[:threshold])\n", " right = merge_sort(numbers[threshold:])\n", " \n", @@ -399,7 +392,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.2" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/py35/arrow.ipynb b/py3/arrow.ipynb similarity index 100% rename from py35/arrow.ipynb rename to py3/arrow.ipynb diff --git a/py34/association-analysis/apriori.py b/py3/association-analysis/apriori.py similarity index 100% rename from py34/association-analysis/apriori.py rename to py3/association-analysis/apriori.py diff --git a/py34/association-analysis/notebook/apriori.ipynb b/py3/association-analysis/notebook/apriori.ipynb similarity index 100% rename from py34/association-analysis/notebook/apriori.ipynb rename to py3/association-analysis/notebook/apriori.ipynb diff --git a/py34/association-analysis/notebook/gen_dataset.ipynb b/py3/association-analysis/notebook/gen_dataset.ipynb similarity index 100% rename from py34/association-analysis/notebook/gen_dataset.ipynb rename to py3/association-analysis/notebook/gen_dataset.ipynb diff --git a/py35/async.ipynb b/py3/async.ipynb similarity index 100% rename from py35/async.ipynb rename to py3/async.ipynb diff --git a/py36/asyncio.ipynb b/py3/asyncio.ipynb similarity index 100% rename from py36/asyncio.ipynb rename to py3/asyncio.ipynb diff --git a/py36/asyncio_locks.py b/py3/asyncio_locks.py similarity index 100% rename from py36/asyncio_locks.py rename to py3/asyncio_locks.py diff --git a/py34/beauty/cpu usage .ipynb b/py3/beauty/cpu usage .ipynb similarity index 100% rename from py34/beauty/cpu usage .ipynb rename to py3/beauty/cpu usage .ipynb diff --git a/py34/beauty/cpu-usage.gif b/py3/beauty/cpu-usage.gif similarity index 100% rename from py34/beauty/cpu-usage.gif rename to py3/beauty/cpu-usage.gif diff --git a/py34/blinker/README.md b/py3/blinker/README.md similarity index 100% rename from py34/blinker/README.md rename to py3/blinker/README.md diff --git a/py34/blinker/blinker.html b/py3/blinker/blinker.html similarity index 100% rename from py34/blinker/blinker.html rename to py3/blinker/blinker.html diff --git a/py34/blinker/notebook/blinker.ipynb b/py3/blinker/notebook/blinker.ipynb similarity index 100% rename from py34/blinker/notebook/blinker.ipynb rename to py3/blinker/notebook/blinker.ipynb diff --git a/py35/celery/app.ipynb b/py3/celery/app.ipynb similarity index 100% rename from py35/celery/app.ipynb rename to py3/celery/app.ipynb diff --git a/py35/celery/tasks.py b/py3/celery/tasks.py similarity index 100% rename from py35/celery/tasks.py rename to py3/celery/tasks.py diff --git a/py3/charset.ipynb b/py3/charset.ipynb new file mode 100644 index 00000000..00e1aabc --- /dev/null +++ b/py3/charset.ipynb @@ -0,0 +1,75 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "\n" + ] + } + ], + "source": [ + "unicode_data = '123'\n", + "utf8_bytes = unicode_data.encode('utf8')\n", + "gbk_bytes = unicode_data.encode('gbk')\n", + "\n", + "print(type(unicode_data))\n", + "print(type(utf8_bytes))\n", + "print(type(gbk_bytes))\n", + "\n", + "# \n", + "# \n", + "# \n", + "\n", + "import tempfile\n", + "\n", + "with tempfile.TemporaryFile(mode='wb+') as utf_fp, \\\n", + " tempfile.TemporaryFile(mode='wb+') as gbk_fp:\n", + "\n", + " utf_fp.write(utf8_bytes)\n", + " gbk_fp.write(gbk_bytes)\n", + "\n", + " utf_fp.seek(0, 0)\n", + " gbk_fp.seek(0, 0)\n", + "\n", + "\n", + " utf8_bytes_2 = utf_fp.read()\n", + " gbk_bytes_2 = gbk_fp.read()\n", + "\n", + " assert utf8_bytes_2 == utf8_bytes\n", + " assert gbk_bytes_2 == gbk_bytes\n", + "\n", + " assert utf8_bytes_2.decode('utf8') == gbk_bytes_2.decode('gbk')\n", + "\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/py34/commandlineutils/argparse_demo.py b/py3/commandlineutils/argparse_demo.py similarity index 100% rename from py34/commandlineutils/argparse_demo.py rename to py3/commandlineutils/argparse_demo.py diff --git a/py34/commandlineutils/click_demo.py b/py3/commandlineutils/click_demo.py similarity index 100% rename from py34/commandlineutils/click_demo.py rename to py3/commandlineutils/click_demo.py diff --git a/py34/commandlineutils/tqdm_demo.py b/py3/commandlineutils/tqdm_demo.py similarity index 100% rename from py34/commandlineutils/tqdm_demo.py rename to py3/commandlineutils/tqdm_demo.py diff --git a/py34/commandlineutils/xtermcolor_demo.py b/py3/commandlineutils/xtermcolor_demo.py similarity index 100% rename from py34/commandlineutils/xtermcolor_demo.py rename to py3/commandlineutils/xtermcolor_demo.py diff --git a/py3/concurrent.ipynb b/py3/concurrent.ipynb new file mode 100644 index 00000000..e0516bd3 --- /dev/null +++ b/py3/concurrent.ipynb @@ -0,0 +1,364 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "worker 1 start\n", + "worker 0 start\n", + "worker 2 start\n", + "worker 3 start\n", + "worker 4 start\n", + "dealing with data 0...\n", + "dealing with data 1...\n", + "dealing with data 2...\n", + "dealing with data 3...\n", + "dealing with data 4...\n", + "all tas data submitted\n", + "dealing with data 5...\n", + "dealing with data 6...\n", + "dealing with data 7...\n", + "dealing with data 8...\n", + "dealing with data 9...\n", + "dealing with data 10...\n", + "dealing with data 11...\n", + "dealing with data 12...\n", + "dealing with data 13...\n", + "dealing with data 14...\n", + "dealing with data 15...\n", + "dealing with data 16...\n", + "dealing with data 17...\n", + "dealing with data 18...\n", + "dealing with data 19...\n", + "dealing with data 21...\n", + "dealing with data 20...\n", + "dealing with data 22...\n", + "dealing with data 23...\n", + "dealing with data 24...\n", + "dealing with data 26...\n", + "dealing with data 25...\n", + "dealing with data 27...\n", + "dealing with data 28...\n", + "dealing with data 29...\n", + "dealing with data 30...\n", + "dealing with data 31...\n", + "dealing with data 32...\n", + "dealing with data 33...\n", + "dealing with data 34...\n", + "dealing with data 35...\n", + "dealing with data 36...\n", + "dealing with data 37...\n", + "dealing with data 38...\n", + "dealing with data 39...\n", + "dealing with data 41...\n", + "dealing with data 40...\n", + "dealing with data 42...\n", + "dealing with data 43...\n", + "dealing with data 44...\n", + "dealing with data 46...\n", + "dealing with data 45...\n", + "dealing with data 47...\n", + "dealing with data 48...\n", + "dealing with data 49...\n", + "worker 2 exit\n", + "worker 4 exit\n", + "worker 3 exit\n", + "worker 1 exit\n", + "worker 0 exit\n", + "all done\n" + ] + } + ], + "source": [ + "from time import sleep\n", + "from concurrent.futures import ProcessPoolExecutor, wait\n", + "from multiprocessing import Manager, Queue\n", + "\n", + "\n", + "N_PARALLEL = 5\n", + "\n", + "\n", + "def worker(i: int, q: Queue) -> None:\n", + " print(f'worker {i} start')\n", + " while 1:\n", + " data = q.get()\n", + " if data is None: # 采用毒丸(poison pill)方式来结束进程池\n", + " q.put(data)\n", + " print(f'worker {i} exit')\n", + " return\n", + " \n", + " print(f'dealing with data {data}...')\n", + " sleep(1)\n", + " \n", + "\n", + " \n", + " \n", + "def main():\n", + " executor = ProcessPoolExecutor(max_workers=N_PARALLEL) # 控制并发量\n", + " with Manager() as manager:\n", + " queue = manager.Queue(maxsize=50) # 控制缓存量\n", + "\n", + " workers = [executor.submit(worker, i, queue) for i in range(N_PARALLEL)]\n", + " for i in range(50):\n", + " queue.put(i)\n", + " \n", + " print('all task data submitted')\n", + "\n", + " queue.put(None)\n", + " wait(workers)\n", + " print('all done')\n", + " \n", + "\n", + "main()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "worker[0] got normal_v 1, shared_v 1\n", + "worker[1] got normal_v 1, shared_v 2\n", + "all done\n" + ] + } + ], + "source": [ + "## shared value\n", + "\n", + "from time import sleep\n", + "from concurrent.futures import ProcessPoolExecutor, wait\n", + "from multiprocessing import Manager, Queue\n", + "from ctypes import c_int64\n", + "\n", + "\n", + "def worker(i, normal_v, shared_v):\n", + " normal_v += 1 # 因为进程间内存隔离,所以每个进程都会得到 1\n", + " shared_v.value += 1 # 因为使用了共享内存,所以会分别得到 1 和 2\n", + " \n", + " print(f'worker[{i}] got normal_v {normal_v}, shared_v {shared_v.value}')\n", + " \n", + " \n", + "def main():\n", + " executor = ProcessPoolExecutor(max_workers=2)\n", + " with Manager() as manager:\n", + " lock = manager.Lock()\n", + " shared_v = manager.Value(c_int64, 0, lock=lock)\n", + " normal_v = 0\n", + "\n", + " workers = [executor.submit(worker, i, normal_v, shared_v) for i in range(2)]\n", + " wait(workers)\n", + " print('all done')\n", + " \n", + "\n", + "main()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "ename": "BrokenProcessPool", + "evalue": "A process in the process pool was terminated abruptly while the future was running or pending.", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mBrokenProcessPool\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 31\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 32\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 33\u001b[0;31m \u001b[0mmain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m\u001b[0m in \u001b[0;36mmain\u001b[0;34m()\u001b[0m\n\u001b[1;32m 27\u001b[0m \u001b[0mworkers\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mexecutor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msubmit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mworker\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mi\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnormal_v\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mshared_v\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m10\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 28\u001b[0m \u001b[0mwait\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mworkers\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 29\u001b[0;31m \u001b[0;34m[\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mf\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mworkers\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 30\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'all done'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 31\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 27\u001b[0m \u001b[0mworkers\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mexecutor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msubmit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mworker\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mi\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnormal_v\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mshared_v\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m10\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 28\u001b[0m \u001b[0mwait\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mworkers\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 29\u001b[0;31m \u001b[0;34m[\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mf\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mworkers\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 30\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'all done'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 31\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.pyenv/versions/3.8.0/lib/python3.8/concurrent/futures/_base.py\u001b[0m in \u001b[0;36mresult\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 430\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mCancelledError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 431\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_state\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mFINISHED\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 432\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__get_result\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 433\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 434\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_condition\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwait\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.pyenv/versions/3.8.0/lib/python3.8/concurrent/futures/_base.py\u001b[0m in \u001b[0;36m__get_result\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 386\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__get_result\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 387\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_exception\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 388\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_exception\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 389\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 390\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_result\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mBrokenProcessPool\u001b[0m: A process in the process pool was terminated abruptly while the future was running or pending." + ] + } + ], + "source": [ + "\"\"\"\n", + "shared memory\n", + "=============\n", + "\n", + "Output:\n", + "::\n", + " worker[0] got normal_v 1, shared_v 1\n", + " worker[2] got normal_v 1, shared_v 2\n", + " worker[3] got normal_v 1, shared_v 3\n", + " worker[1] got normal_v 1, shared_v 4\n", + " worker[4] got normal_v 1, shared_v 5\n", + " worker[5] got normal_v 1, shared_v 6\n", + " worker[6] got normal_v 1, shared_v 7\n", + " worker[8] got normal_v 1, shared_v 8\n", + " worker[7] got normal_v 1, shared_v 9\n", + " worker[9] got normal_v 1, shared_v 10\n", + " all done\n", + "\"\"\"\n", + "\n", + "from traceback import print_exc\n", + "from time import sleep\n", + "from concurrent.futures import ProcessPoolExecutor, wait\n", + "from multiprocessing import Event, RLock\n", + "from multiprocessing.shared_memory import ShareableList\n", + "from multiprocessing.managers import SharedMemoryManager, SyncManager\n", + "from ctypes import c_int64\n", + "\n", + "\n", + "def worker(l: RLock, evt: Event, i: int, normal_v: int, shared_v: ShareableList):\n", + " try:\n", + " evt.wait() # 确保任务同时开始\n", + " normal_v += 1 # 因为进程间内存隔离,所以每个进程都会得到 1\n", + " with RLock(): # 需要自行处理锁\n", + " shared_v[0] += 1 # 因为使用了共享内存,所以会得到连续累加的值\n", + "\n", + " print(f\"worker[{i}] got normal_v {normal_v}, shared_v {shared_v[0]}\")\n", + " except Exception:\n", + " print_exc()\n", + " raise\n", + "\n", + "\n", + "def main():\n", + " executor = ProcessPoolExecutor(max_workers=10)\n", + " with SharedMemoryManager() as smm, SyncManager() as sm:\n", + " evt = sm.Event()\n", + " shared_v = smm.ShareableList([0])\n", + " normal_v = 0\n", + " workers = [\n", + " executor.submit(worker, sm.RLock(), evt, i, normal_v, shared_v)\n", + " for i in range(10)\n", + " ]\n", + "\n", + " evt.set()\n", + " wait(workers)\n", + " [f.result() for f in workers]\n", + " print(\"all done\")\n", + "\n", + "\n", + "if __name__ == \"__main__\":\n", + " main()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "ename": "RuntimeError", + "evalue": "This event loop is already running", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 53\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 54\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 55\u001b[0;31m \u001b[0mmain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 56\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mmain\u001b[0;34m()\u001b[0m\n\u001b[1;32m 49\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mmain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 51\u001b[0;31m \u001b[0mioloop\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_until_complete\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcoroutine_main\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 52\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'all done'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 53\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.pyenv/versions/3.7.4/lib/python3.7/asyncio/base_events.py\u001b[0m in \u001b[0;36mrun_until_complete\u001b[0;34m(self, future)\u001b[0m\n\u001b[1;32m 564\u001b[0m \u001b[0mfuture\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd_done_callback\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0m_run_until_complete_cb\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 565\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 566\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_forever\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 567\u001b[0m \u001b[0;32mexcept\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 568\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mnew_task\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mfuture\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdone\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mfuture\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcancelled\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.pyenv/versions/3.7.4/lib/python3.7/asyncio/base_events.py\u001b[0m in \u001b[0;36mrun_forever\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 519\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_check_closed\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 520\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_running\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 521\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mRuntimeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'This event loop is already running'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 522\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mevents\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_running_loop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 523\u001b[0m raise RuntimeError(\n", + "\u001b[0;31mRuntimeError\u001b[0m: This event loop is already running" + ] + } + ], + "source": [ + "from time import sleep\n", + "from asyncio import get_event_loop, sleep as asleep, gather, ensure_future\n", + "from concurrent.futures import ThreadPoolExecutor, wait, Future\n", + "from functools import wraps\n", + "\n", + "\n", + "executor = ThreadPoolExecutor(max_workers=10)\n", + "ioloop = get_event_loop()\n", + "\n", + "\n", + "def nonblocking(func) -> Future:\n", + " @wraps(func)\n", + " def wrapper(*args):\n", + " return ioloop.run_in_executor(executor, func, *args)\n", + " return wrapper\n", + "\n", + "\n", + "@nonblocking # 用线程池封装没法协程化的普通阻塞程序\n", + "def foo(n: int):\n", + " \"\"\"假装我是个很耗时的阻塞调用\"\"\"\n", + " print('start blocking task...')\n", + " sleep(n)\n", + " print('end blocking task')\n", + "\n", + "\n", + "async def coroutine_demo(n: int):\n", + " \"\"\"我就是个普通的协程\"\"\"\n", + "\n", + " # 协程内不能出现任何的阻塞调用,所谓一朝协程,永世协程\n", + " # 那我偏要调一个普通的阻塞函数怎么办?\n", + " # 最简单的办法,套一个线程池…\n", + " await foo(n)\n", + "\n", + "\n", + "async def coroutine_demo_2():\n", + " print('start coroutine task...')\n", + " await asleep(1)\n", + " print('end coroutine task')\n", + "\n", + "\n", + "async def coroutine_main():\n", + " \"\"\"一般我们会写一个 coroutine 的 main 函数,专门负责管理协程\"\"\"\n", + " await gather(\n", + " coroutine_demo(1),\n", + " coroutine_demo_2()\n", + " )\n", + "\n", + "\n", + "def main():\n", + " ioloop.run_until_complete(coroutine_main())\n", + " print('all done')\n", + "\n", + "\n", + "main()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# kipp\n", + "\n", + "from kipp.aio import run_until_complete, " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.0" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/py34/cython/Cython.html b/py3/cython/Cython.html similarity index 100% rename from py34/cython/Cython.html rename to py3/cython/Cython.html diff --git a/py34/cython/README.md b/py3/cython/README.md similarity index 100% rename from py34/cython/README.md rename to py3/cython/README.md diff --git a/py34/cython/bench.ipy b/py3/cython/bench.ipy similarity index 100% rename from py34/cython/bench.ipy rename to py3/cython/bench.ipy diff --git a/py34/cython/fast.pyx b/py3/cython/fast.pyx similarity index 100% rename from py34/cython/fast.pyx rename to py3/cython/fast.pyx diff --git a/py34/cython/faster.pyx b/py3/cython/faster.pyx similarity index 100% rename from py34/cython/faster.pyx rename to py3/cython/faster.pyx diff --git a/py34/cython/fastest.pyx b/py3/cython/fastest.pyx similarity index 100% rename from py34/cython/fastest.pyx rename to py3/cython/fastest.pyx diff --git a/py34/cython/notebook/Cython.ipynb b/py3/cython/notebook/Cython.ipynb similarity index 100% rename from py34/cython/notebook/Cython.ipynb rename to py3/cython/notebook/Cython.ipynb diff --git a/py34/cython/origin.html b/py3/cython/origin.html similarity index 100% rename from py34/cython/origin.html rename to py3/cython/origin.html diff --git a/py34/cython/origin.py b/py3/cython/origin.py similarity index 100% rename from py34/cython/origin.py rename to py3/cython/origin.py diff --git a/py34/cython/setup.py b/py3/cython/setup.py similarity index 100% rename from py34/cython/setup.py rename to py3/cython/setup.py diff --git a/py34/cython/startup/README b/py3/cython/startup/README similarity index 100% rename from py34/cython/startup/README rename to py3/cython/startup/README diff --git a/py36/data/demo-2-over+previous.png b/py3/data/demo-2-over+previous.png similarity index 100% rename from py36/data/demo-2-over+previous.png rename to py3/data/demo-2-over+previous.png diff --git a/py36/data/huawei.jpg b/py3/data/huawei.jpg similarity index 100% rename from py36/data/huawei.jpg rename to py3/data/huawei.jpg diff --git a/py35/data/project.db b/py3/data/project.db similarity index 100% rename from py35/data/project.db rename to py3/data/project.db diff --git a/py35/data/result.db b/py3/data/result.db similarity index 100% rename from py35/data/result.db rename to py3/data/result.db diff --git a/py35/data/scheduler.1d b/py3/data/scheduler.1d similarity index 100% rename from py35/data/scheduler.1d rename to py3/data/scheduler.1d diff --git a/py35/data/scheduler.1h b/py3/data/scheduler.1h similarity index 100% rename from py35/data/scheduler.1h rename to py3/data/scheduler.1h diff --git a/py35/data/scheduler.all b/py3/data/scheduler.all similarity index 100% rename from py35/data/scheduler.all rename to py3/data/scheduler.all diff --git a/py35/data/task.db b/py3/data/task.db similarity index 100% rename from py35/data/task.db rename to py3/data/task.db diff --git a/py36/data/test.gif b/py3/data/test.gif similarity index 100% rename from py36/data/test.gif rename to py3/data/test.gif diff --git a/py36/data/test.txt b/py3/data/test.txt similarity index 100% rename from py36/data/test.txt rename to py3/data/test.txt diff --git a/py36/data/test.webp b/py3/data/test.webp similarity index 100% rename from py36/data/test.webp rename to py3/data/test.webp diff --git a/py36/datetime.ipynb b/py3/datetime.ipynb similarity index 100% rename from py36/datetime.ipynb rename to py3/datetime.ipynb diff --git a/py3/demo.ipynb b/py3/demo.ipynb new file mode 100644 index 00000000..c1304415 --- /dev/null +++ b/py3/demo.ipynb @@ -0,0 +1,52 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[1, 4, 3]\n", + "[1, 4, 3]\n" + ] + } + ], + "source": [ + "l = [1, 2, 3]\n", + "\n", + "\n", + "def foo(v):\n", + " v[1] = 4\n", + " return v\n", + "\n", + "\n", + "print(foo(l))\n", + "print(l)\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/py34/design-pattern/Adapter Pattern.ipynb b/py3/design-pattern/Adapter Pattern.ipynb similarity index 100% rename from py34/design-pattern/Adapter Pattern.ipynb rename to py3/design-pattern/Adapter Pattern.ipynb diff --git a/py34/design-pattern/Command Pattern.ipynb b/py3/design-pattern/Command Pattern.ipynb similarity index 100% rename from py34/design-pattern/Command Pattern.ipynb rename to py3/design-pattern/Command Pattern.ipynb diff --git a/py34/design-pattern/Decorator Pattern.ipynb b/py3/design-pattern/Decorator Pattern.ipynb similarity index 100% rename from py34/design-pattern/Decorator Pattern.ipynb rename to py3/design-pattern/Decorator Pattern.ipynb diff --git a/py34/design-pattern/Factory Method Pattern.ipynb b/py3/design-pattern/Factory Method Pattern.ipynb similarity index 100% rename from py34/design-pattern/Factory Method Pattern.ipynb rename to py3/design-pattern/Factory Method Pattern.ipynb diff --git a/py34/design-pattern/Observer Pattern.ipynb b/py3/design-pattern/Observer Pattern.ipynb similarity index 100% rename from py34/design-pattern/Observer Pattern.ipynb rename to py3/design-pattern/Observer Pattern.ipynb diff --git a/py34/design-pattern/README.md b/py3/design-pattern/README.md similarity index 100% rename from py34/design-pattern/README.md rename to py3/design-pattern/README.md diff --git a/py34/design-pattern/Singleton Pattern.ipynb b/py3/design-pattern/Singleton Pattern.ipynb similarity index 100% rename from py34/design-pattern/Singleton Pattern.ipynb rename to py3/design-pattern/Singleton Pattern.ipynb diff --git a/py34/design-pattern/Strategy Pattern.ipynb b/py3/design-pattern/Strategy Pattern.ipynb similarity index 100% rename from py34/design-pattern/Strategy Pattern.ipynb rename to py3/design-pattern/Strategy Pattern.ipynb diff --git a/py34/design-pattern/Template Pattern.ipynb b/py3/design-pattern/Template Pattern.ipynb similarity index 100% rename from py34/design-pattern/Template Pattern.ipynb rename to py3/design-pattern/Template Pattern.ipynb diff --git a/py34/encrypt/bcrypt.ipynb b/py3/encrypt/bcrypt.ipynb similarity index 100% rename from py34/encrypt/bcrypt.ipynb rename to py3/encrypt/bcrypt.ipynb diff --git a/py34/flask/README.md b/py3/flask/README.md similarity index 100% rename from py34/flask/README.md rename to py3/flask/README.md diff --git a/py34/flask/meinheld/1 b/py3/flask/meinheld/1 similarity index 100% rename from py34/flask/meinheld/1 rename to py3/flask/meinheld/1 diff --git a/py34/flask/meinheld/flask_meinheld.py b/py3/flask/meinheld/flask_meinheld.py similarity index 100% rename from py34/flask/meinheld/flask_meinheld.py rename to py3/flask/meinheld/flask_meinheld.py diff --git a/py34/flask/meinheld/pure_meinheld.py b/py3/flask/meinheld/pure_meinheld.py similarity index 100% rename from py34/flask/meinheld/pure_meinheld.py rename to py3/flask/meinheld/pure_meinheld.py diff --git a/py34/flask/rest/README.md b/py3/flask/rest/README.md similarity index 100% rename from py34/flask/rest/README.md rename to py3/flask/rest/README.md diff --git a/py34/flask/rest/app.py b/py3/flask/rest/app.py similarity index 100% rename from py34/flask/rest/app.py rename to py3/flask/rest/app.py diff --git a/py34/flask/tutorial/app.py b/py3/flask/tutorial/app.py similarity index 100% rename from py34/flask/tutorial/app.py rename to py3/flask/tutorial/app.py diff --git a/py34/flask/tutorial/appdemo/__init__.py b/py3/flask/tutorial/appdemo/__init__.py similarity index 100% rename from py34/flask/tutorial/appdemo/__init__.py rename to py3/flask/tutorial/appdemo/__init__.py diff --git a/py34/flask/tutorial/appdemo/urls.py b/py3/flask/tutorial/appdemo/urls.py similarity index 100% rename from py34/flask/tutorial/appdemo/urls.py rename to py3/flask/tutorial/appdemo/urls.py diff --git a/py34/flask/tutorial/settings.py b/py3/flask/tutorial/settings.py similarity index 100% rename from py34/flask/tutorial/settings.py rename to py3/flask/tutorial/settings.py diff --git a/py34/flask/tutorial/templates/base.html b/py3/flask/tutorial/templates/base.html similarity index 100% rename from py34/flask/tutorial/templates/base.html rename to py3/flask/tutorial/templates/base.html diff --git a/py34/flask/tutorial/templates/demo.html b/py3/flask/tutorial/templates/demo.html similarity index 100% rename from py34/flask/tutorial/templates/demo.html rename to py3/flask/tutorial/templates/demo.html diff --git a/py34/flask/tutorial/templates/index.html b/py3/flask/tutorial/templates/index.html similarity index 100% rename from py34/flask/tutorial/templates/index.html rename to py3/flask/tutorial/templates/index.html diff --git a/py3/gbk-fp.txt b/py3/gbk-fp.txt new file mode 100644 index 00000000..d800886d --- /dev/null +++ b/py3/gbk-fp.txt @@ -0,0 +1 @@ +123 \ No newline at end of file diff --git a/py36/gc_demo.py b/py3/gc_demo.py similarity index 100% rename from py36/gc_demo.py rename to py3/gc_demo.py diff --git a/py3/gcp/firestore.ipynb b/py3/gcp/firestore.ipynb new file mode 100644 index 00000000..3f82204a --- /dev/null +++ b/py3/gcp/firestore.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [], + "source": [ + "from google.cloud import firestore\n", + "\n", + "db = firestore.Client()\n", + "posts = db.collection(\"posts\")\n", + "categories = db.collection('categories')\n", + "users = db.collection('users')" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [], + "source": [ + "from pymongo import MongoClient\n", + "\n", + "mgocli = MongoClient()\n", + "mgo_db = mgocli['blog']\n", + "mgo_posts = mgo_db['posts']\n", + "mgo_categories = mgo_db['categories']\n", + "mgo_users = mgo_db['users']" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2" + ] + }, + "execution_count": 59, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mgo_posts.find().count()\n", + "mgo_categories.find().count()\n", + "mgo_users.find().count()" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + } + ], + "source": [ + "# delete document\n", + "\n", + "# for docu in posts.stream():\n", + "# if docu.to_dict().get('author'):\n", + "# posts.document(docu.id).delete()" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "5" + ] + }, + "execution_count": 52, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# len(list(posts.stream()))\n", + "len(list(categories.stream()))" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": {}, + "outputs": [], + "source": [ + "for docu in mgo_posts.find():\n", + " docu['mgo_id'] = str(docu['_id'])\n", + " if docu.get('category'):\n", + " docu['category'] = str(docu['category'])\n", + " docu['post_author'] = str(docu['post_author'])\n", + "# print(docu)\n", + " del docu['_id']\n", + " posts.add(document_id=docu['mgo_id'], document_data=docu)" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [], + "source": [ + "for docu in mgo_categories.find():\n", + " docu['mgo_id'] = str(docu['_id'])\n", + " del docu['_id']\n", + " \n", + " if docu.get('category'):\n", + " docu['category'] = str(docu['category'])\n", + " docu['author'] = str(docu['author'])\n", + "\n", + " categories.document(document_id=docu['mgo_id']).set(docu)" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": {}, + "outputs": [], + "source": [ + "for docu in mgo_users.find():\n", + " docu['mgo_id'] = str(docu['_id'])\n", + " del docu['_id']\n", + " \n", + " users.document(document_id=docu['mgo_id']).set(docu)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/py36/gql.ipynb b/py3/gql.ipynb similarity index 100% rename from py36/gql.ipynb rename to py3/gql.ipynb diff --git a/py35/graphene/README.md b/py3/graphene/README.md similarity index 100% rename from py35/graphene/README.md rename to py3/graphene/README.md diff --git a/py35/graphene/complex.py b/py3/graphene/complex.py similarity index 100% rename from py35/graphene/complex.py rename to py3/graphene/complex.py diff --git a/py35/graphene/simple.py b/py3/graphene/simple.py similarity index 100% rename from py35/graphene/simple.py rename to py3/graphene/simple.py diff --git a/py36/hypothesis/README.md b/py3/hypothesis/README.md similarity index 100% rename from py36/hypothesis/README.md rename to py3/hypothesis/README.md diff --git a/py36/hypothesis/source.py b/py3/hypothesis/source.py similarity index 100% rename from py36/hypothesis/source.py rename to py3/hypothesis/source.py diff --git a/py36/hypothesis/tests.py b/py3/hypothesis/tests.py similarity index 100% rename from py36/hypothesis/tests.py rename to py3/hypothesis/tests.py diff --git a/py36/japronto/async_demo.py b/py3/japronto/async_demo.py similarity index 100% rename from py36/japronto/async_demo.py rename to py3/japronto/async_demo.py diff --git a/py35/jieba/simple-demo.ipynb b/py3/jieba/simple-demo.ipynb similarity index 100% rename from py35/jieba/simple-demo.ipynb rename to py3/jieba/simple-demo.ipynb diff --git a/py3/kafka/oogway.ipynb b/py3/kafka/oogway.ipynb new file mode 100644 index 00000000..9804a716 --- /dev/null +++ b/py3/kafka/oogway.ipynb @@ -0,0 +1,160 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'bootstrap.servers': '10.213.113.26:9092',\n", + " 'group.id': 'host-one',\n", + " 'virus_topic': 'antivirus-scan-results'}" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import yaml\n", + "import codecs\n", + "import kipp\n", + "import json\n", + "from string import ascii_letters\n", + "from random import choice,sample\n", + "\n", + "\n", + "with codecs.open(r'/opt/configs/360/yunjia.yml', 'r', 'utf8') as f:\n", + " config = yaml.load(f, yaml.CLoader)['kafka']\n", + " \n", + "config" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "from kafka import KafkaProducer\n", + "KafkaProducer?" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "from kafka import KafkaProducer\n", + "\n", + "producer = KafkaProducer(\n", + " bootstrap_servers=config['bootstrap.servers'],\n", + ")\n", + "\n", + "\n", + "def generate_scan_result():\n", + " return {\n", + " 'IsVirus': True,\n", + " 'VirusClass': \"病毒类型\",\n", + " 'VirusName': \"病毒名.\" + ''.join(sample(ascii_letters, 8)),\n", + " 'VirusFileFullName': \"VirusFileFullName\",\n", + " 'VirusFileShortName': \"VirusFileShortName\",\n", + " 'VirusFilePath': \"VirusFilePath\",\n", + " 'VirusMajorType': \"VirusMajorType\",\n", + " 'VirusMinorType': \"VirusMinorType\",\n", + " 'VirusFileType': \"VirusFileType\",\n", + " 'VirusProcAction':123,\n", + " 'UserOwner': \"UserOwner\",\n", + " 'EngineType': 1,\n", + " 'FileLevel': 1,\n", + " 'IsArchive': True,\n", + " 'FileNeedUpload': True,\n", + " 'AttrNeedUpload': True,\n", + " 'MD5': \"MD5.\"+''.join(sample(ascii_letters, 2)),\n", + " 'SHA1': \"SHA1\",\n", + " 'AgentID': \"AgentID\",\n", + "}\n", + "\n", + "# generate_scan_result()\n", + "\n", + "for _ in range(1000):\n", + " producer.send(config['virus_topic'], json.dumps(generate_scan_result()).encode('utf8'))" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "KafkaConsumer?" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "ename": "KeyboardInterrupt", + "evalue": "", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 10\u001b[0m )\n\u001b[1;32m 11\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 12\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mmsg\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mconsumer\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 13\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mmsg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/38/lib/python3.8/site-packages/kafka/consumer/group.py\u001b[0m in \u001b[0;36m__next__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1190\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnext_v1\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1191\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1192\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnext_v2\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1193\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1194\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mnext_v2\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/38/lib/python3.8/site-packages/kafka/consumer/group.py\u001b[0m in \u001b[0;36mnext_v2\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1198\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_iterator\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_message_generator_v2\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1199\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1200\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mnext\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_iterator\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1201\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mStopIteration\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1202\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_iterator\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/38/lib/python3.8/site-packages/kafka/consumer/group.py\u001b[0m in \u001b[0;36m_message_generator_v2\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1113\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_message_generator_v2\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1114\u001b[0m \u001b[0mtimeout_ms\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1000\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_consumer_timeout\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1115\u001b[0;31m \u001b[0mrecord_map\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpoll\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtimeout_ms\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mtimeout_ms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mupdate_offsets\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1116\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mtp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrecords\u001b[0m \u001b[0;32min\u001b[0m \u001b[0msix\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0miteritems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrecord_map\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1117\u001b[0m \u001b[0;31m# Generators are stateful, and it is possible that the tp / records\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/38/lib/python3.8/site-packages/kafka/consumer/group.py\u001b[0m in \u001b[0;36mpoll\u001b[0;34m(self, timeout_ms, max_records, update_offsets)\u001b[0m\n\u001b[1;32m 652\u001b[0m \u001b[0mremaining\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtimeout_ms\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 653\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 654\u001b[0;31m \u001b[0mrecords\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_poll_once\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mremaining\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmax_records\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mupdate_offsets\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mupdate_offsets\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 655\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mrecords\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 656\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mrecords\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/38/lib/python3.8/site-packages/kafka/consumer/group.py\u001b[0m in \u001b[0;36m_poll_once\u001b[0;34m(self, timeout_ms, max_records, update_offsets)\u001b[0m\n\u001b[1;32m 699\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 700\u001b[0m \u001b[0mtimeout_ms\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtimeout_ms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_coordinator\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtime_to_next_poll\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m1000\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 701\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_client\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpoll\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtimeout_ms\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mtimeout_ms\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 702\u001b[0m \u001b[0;31m# after the long poll, we should check whether the group needs to rebalance\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 703\u001b[0m \u001b[0;31m# prior to returning data so that the group can stabilize faster\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/38/lib/python3.8/site-packages/kafka/client_async.py\u001b[0m in \u001b[0;36mpoll\u001b[0;34m(self, timeout_ms, future)\u001b[0m\n\u001b[1;32m 598\u001b[0m \u001b[0mtimeout\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmax\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# avoid negative timeouts\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 599\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 600\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_poll\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtimeout\u001b[0m \u001b[0;34m/\u001b[0m \u001b[0;36m1000\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 601\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 602\u001b[0m \u001b[0;31m# called without the lock to avoid deadlock potential\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/38/lib/python3.8/site-packages/kafka/client_async.py\u001b[0m in \u001b[0;36m_poll\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 630\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 631\u001b[0m \u001b[0mstart_select\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 632\u001b[0;31m \u001b[0mready\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_selector\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mselect\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 633\u001b[0m \u001b[0mend_select\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 634\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_sensors\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.pyenv/versions/3.8.0/lib/python3.8/selectors.py\u001b[0m in \u001b[0;36mselect\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 556\u001b[0m \u001b[0mready\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 557\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 558\u001b[0;31m \u001b[0mkev_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_selector\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcontrol\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmax_ev\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 559\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mInterruptedError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 560\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mready\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mKeyboardInterrupt\u001b[0m: " + ] + } + ], + "source": [ + "from kafka import KafkaConsumer\n", + "consumer = KafkaConsumer(\n", + " config['virus_topic'],\n", + " bootstrap_servers=config['bootstrap.servers'],\n", + " group_id=config['group.id'],\n", + " fetch_max_wait_ms=3000,\n", + "# request_timeout_ms=3500,\n", + "# session_timeout_ms=3100,\n", + " enable_auto_commit=False,\n", + ")\n", + "\n", + "for msg in consumer:\n", + " print (msg)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.0" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/py34/ldap-demo/ldap.ipynb b/py3/ldap-demo/ldap.ipynb similarity index 100% rename from py34/ldap-demo/ldap.ipynb rename to py3/ldap-demo/ldap.ipynb diff --git a/py35/lxml & xpath.ipynb b/py3/lxml & xpath.ipynb similarity index 100% rename from py35/lxml & xpath.ipynb rename to py3/lxml & xpath.ipynb diff --git a/py36/markdown/markdown.ipynb b/py3/markdown/markdown.ipynb similarity index 100% rename from py36/markdown/markdown.ipynb rename to py3/markdown/markdown.ipynb diff --git a/py36/markdown/simple.html b/py3/markdown/simple.html similarity index 100% rename from py36/markdown/simple.html rename to py3/markdown/simple.html diff --git a/py35/mock.ipynb b/py3/mock.ipynb similarity index 100% rename from py35/mock.ipynb rename to py3/mock.ipynb diff --git a/py35/mock/demo.ipynb b/py3/mock/demo.ipynb similarity index 100% rename from py35/mock/demo.ipynb rename to py3/mock/demo.ipynb diff --git a/py35/mock/mock.ipynb b/py3/mock/mock.ipynb similarity index 100% rename from py35/mock/mock.ipynb rename to py3/mock/mock.ipynb diff --git a/py35/mock/settings/__init__.py b/py3/mock/settings/__init__.py similarity index 100% rename from py35/mock/settings/__init__.py rename to py3/mock/settings/__init__.py diff --git a/py35/mock/settings/settings.py b/py3/mock/settings/settings.py similarity index 100% rename from py35/mock/settings/settings.py rename to py3/mock/settings/settings.py diff --git a/py35/mypy/README.md b/py3/mypy/README.md similarity index 100% rename from py35/mypy/README.md rename to py3/mypy/README.md diff --git a/py35/mypy/class.py b/py3/mypy/class.py similarity index 100% rename from py35/mypy/class.py rename to py3/mypy/class.py diff --git a/py35/mypy/simple.py b/py3/mypy/simple.py similarity index 100% rename from py35/mypy/simple.py rename to py3/mypy/simple.py diff --git a/py34/networkx/README.md b/py3/networkx/README.md similarity index 100% rename from py34/networkx/README.md rename to py3/networkx/README.md diff --git a/py34/networkx/tutorial.ipynb b/py3/networkx/tutorial.ipynb similarity index 100% rename from py34/networkx/tutorial.ipynb rename to py3/networkx/tutorial.ipynb diff --git a/py34/unittest/tests/test_fixtures.py b/py3/nlp/README.md similarity index 100% rename from py34/unittest/tests/test_fixtures.py rename to py3/nlp/README.md diff --git a/py36/nlp/stopwords.ipynb b/py3/nlp/stopwords.ipynb similarity index 100% rename from py36/nlp/stopwords.ipynb rename to py3/nlp/stopwords.ipynb diff --git a/py34/pandas/DataFrame.html b/py3/pandas/DataFrame.html similarity index 100% rename from py34/pandas/DataFrame.html rename to py3/pandas/DataFrame.html diff --git a/py34/pandas/README.md b/py3/pandas/README.md similarity index 100% rename from py34/pandas/README.md rename to py3/pandas/README.md diff --git a/py34/pandas/matplotlib.html b/py3/pandas/matplotlib.html similarity index 100% rename from py34/pandas/matplotlib.html rename to py3/pandas/matplotlib.html diff --git a/py34/pandas/notebook/dict.ipynb b/py3/pandas/notebook/dict.ipynb similarity index 100% rename from py34/pandas/notebook/dict.ipynb rename to py3/pandas/notebook/dict.ipynb diff --git a/py34/pandas/notebook/matplotlib.ipynb b/py3/pandas/notebook/matplotlib.ipynb similarity index 100% rename from py34/pandas/notebook/matplotlib.ipynb rename to py3/pandas/notebook/matplotlib.ipynb diff --git a/py34/pandas/notebook/pandas.ipynb b/py3/pandas/notebook/pandas.ipynb similarity index 100% rename from py34/pandas/notebook/pandas.ipynb rename to py3/pandas/notebook/pandas.ipynb diff --git a/py34/pandas/notebook/pivot_table.ipynb b/py3/pandas/notebook/pivot_table.ipynb similarity index 100% rename from py34/pandas/notebook/pivot_table.ipynb rename to py3/pandas/notebook/pivot_table.ipynb diff --git a/py34/pandas/notebook/test.ipynb b/py3/pandas/notebook/test.ipynb similarity index 100% rename from py34/pandas/notebook/test.ipynb rename to py3/pandas/notebook/test.ipynb diff --git a/py34/pandas/notebook/wordpress.ipynb b/py3/pandas/notebook/wordpress.ipynb similarity index 100% rename from py34/pandas/notebook/wordpress.ipynb rename to py3/pandas/notebook/wordpress.ipynb diff --git a/py34/paramiko/paramiko.ipynb b/py3/paramiko/paramiko.ipynb similarity index 100% rename from py34/paramiko/paramiko.ipynb rename to py3/paramiko/paramiko.ipynb diff --git a/py34/parse-html/notebook/lxml.ipynb b/py3/parse-html/notebook/lxml.ipynb similarity index 100% rename from py34/parse-html/notebook/lxml.ipynb rename to py3/parse-html/notebook/lxml.ipynb diff --git a/py36/pillow/README.md b/py3/pillow/README.md similarity index 100% rename from py36/pillow/README.md rename to py3/pillow/README.md diff --git a/py36/pillow/data/huge.jpeg b/py3/pillow/data/huge.jpeg similarity index 100% rename from py36/pillow/data/huge.jpeg rename to py3/pillow/data/huge.jpeg diff --git a/py36/pillow/pillow-simd.ipynb b/py3/pillow/pillow-simd.ipynb similarity index 100% rename from py36/pillow/pillow-simd.ipynb rename to py3/pillow/pillow-simd.ipynb diff --git a/py35/profiling/README.md b/py3/profiling/README.md similarity index 100% rename from py35/profiling/README.md rename to py3/profiling/README.md diff --git a/py35/profiling/base.py b/py3/profiling/base.py similarity index 100% rename from py35/profiling/base.py rename to py3/profiling/base.py diff --git a/py35/profiling/simple_cprofile.py b/py3/profiling/simple_cprofile.py similarity index 100% rename from py35/profiling/simple_cprofile.py rename to py3/profiling/simple_cprofile.py diff --git a/py35/profiling/simple_lineprofiler.py b/py3/profiling/simple_lineprofiler.py similarity index 100% rename from py35/profiling/simple_lineprofiler.py rename to py3/profiling/simple_lineprofiler.py diff --git a/py35/profiling/simple_lineprofiler.py.lprof b/py3/profiling/simple_lineprofiler.py.lprof similarity index 100% rename from py35/profiling/simple_lineprofiler.py.lprof rename to py3/profiling/simple_lineprofiler.py.lprof diff --git a/py35/profiling/test_objgraph.py b/py3/profiling/test_objgraph.py similarity index 100% rename from py35/profiling/test_objgraph.py rename to py3/profiling/test_objgraph.py diff --git a/py35/profiling/test_pprofile.py b/py3/profiling/test_pprofile.py similarity index 100% rename from py35/profiling/test_pprofile.py rename to py3/profiling/test_pprofile.py diff --git a/py35/profiling/test_pstats.py b/py3/profiling/test_pstats.py similarity index 100% rename from py35/profiling/test_pstats.py rename to py3/profiling/test_pstats.py diff --git a/py35/profiling/timeit b/py3/profiling/timeit similarity index 100% rename from py35/profiling/timeit rename to py3/profiling/timeit diff --git a/py34/purl/purl.ipynb b/py3/purl/purl.ipynb similarity index 100% rename from py34/purl/purl.ipynb rename to py3/purl/purl.ipynb diff --git a/py35/py35-new-syntax.ipynb b/py3/py35-new-syntax.ipynb similarity index 100% rename from py35/py35-new-syntax.ipynb rename to py3/py35-new-syntax.ipynb diff --git a/py34/pyinotify/notebook/Untitled.ipynb b/py3/pyinotify/notebook/Untitled.ipynb similarity index 100% rename from py34/pyinotify/notebook/Untitled.ipynb rename to py3/pyinotify/notebook/Untitled.ipynb diff --git a/py34/pyjwt/notebook/pyjwt.ipynb b/py3/pyjwt/notebook/pyjwt.ipynb similarity index 100% rename from py34/pyjwt/notebook/pyjwt.ipynb rename to py3/pyjwt/notebook/pyjwt.ipynb diff --git a/py34/pymining/notebook/pymining.ipynb b/py3/pymining/notebook/pymining.ipynb similarity index 100% rename from py34/pymining/notebook/pymining.ipynb rename to py3/pymining/notebook/pymining.ipynb diff --git a/py35/pyquery.ipynb b/py3/pyquery.ipynb similarity index 95% rename from py35/pyquery.ipynb rename to py3/pyquery.ipynb index cfbc9597..25db6250 100644 --- a/py35/pyquery.ipynb +++ b/py3/pyquery.ipynb @@ -40,9 +40,7 @@ { "cell_type": "code", "execution_count": 17, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -76,9 +74,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.1" + "version": "3.7.4" } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 1 } diff --git a/py3/pyquery/README.md b/py3/pyquery/README.md new file mode 100644 index 00000000..85fbf09d --- /dev/null +++ b/py3/pyquery/README.md @@ -0,0 +1 @@ +车系-车标数据: diff --git a/py3/pyquery/tuhu.ipynb b/py3/pyquery/tuhu.ipynb new file mode 100644 index 00000000..93e63b45 --- /dev/null +++ b/py3/pyquery/tuhu.ipynb @@ -0,0 +1,5842 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import re\n", + "import codecs\n", + "import json\n", + "import traceback\n", + "from urllib.parse import quote, unquote\n", + "from collections import defaultdict\n", + "from operator import itemgetter\n", + "\n", + "from pyquery import PyQuery as pq\n", + "import requests\n", + "\n", + "\n", + "index_regex = re.compile(r'[^{]+(.*)\\)')" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [], + "source": [ + "# get brand image\n", + "\n", + "resp = requests.get('https://item.tuhu.cn/Car/GetCarBrands2?callback=__GetCarBrands__&_=1565141557927')\n", + "index = json.loads(index_regex.findall(resp.text)[0])" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [], + "source": [ + "# download logo image\n", + "for _, l1 in index.items():\n", + " for brand_dict in l1:\n", + " bname = brand_dict['Brand']\n", + " bimg = requests.get(f\"https://img3.tuhu.org/{brand_dict['Url']}\").content\n", + " with open(f'{bname}.png', 'wb') as f:\n", + " f.write(bimg)\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "# get child tier\n", + "\n", + "def get_child_brand_url(brand):\n", + " return f\"https://item.tuhu.cn/Car/SelOneBrand?callback=__GetCarBrands__&Brand={quote(brand)}&_=1565143202617\"\n", + "\n", + "\n", + "result = defaultdict(list)\n", + "for _, l1 in index.items():\n", + " for brand_dict in l1:\n", + " bname = brand_dict['Brand']\n", + " for cbrand_d in json.loads(index_regex.findall(requests.get(get_child_brand_url(bname)).text)[0])['OneBrand']:\n", + " result[bname].append(cbrand_d)\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": {}, + "outputs": [], + "source": [ + "# write result\n", + "\n", + "with open('./车胎/child-tires-utf8.txt', 'rb') as f:\n", + " f.write(json.dumps(result, indent=4, sort_keys=True, ensure_ascii=False).encode('utf8'))\n", + " \n", + "with open('./车胎/child-tires-gbk.txt', 'rb') as f:\n", + " f.write(json.dumps(result, indent=4, sort_keys=True, ensure_ascii=False).encode('gbk')) " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "# load result\n", + "with open('./车胎/child-tires-utf8.txt', 'rb') as f:\n", + " result = json.loads(f.read().decode('utf8'))" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'A': [{'Brand': 'A - 阿尔法·罗米欧',\n", + " 'Url': '/Images/Logo/aerfa%C2%B7luomiou.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'A - 安驰', 'Url': '/Images/Logo/anchi.png', 'ImageUrl': None},\n", + " {'Brand': 'A - ARCFOX', 'Url': '/Images/Logo/arcfox.png', 'ImageUrl': None},\n", + " {'Brand': 'A - 阿斯顿·马丁',\n", + " 'Url': '/Images/Logo/asidun%C2%B7mading.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'A - 奥迪', 'Url': '/Images/Logo/aodi.png', 'ImageUrl': None}],\n", + " 'B': [{'Brand': 'B - 别克', 'Url': '/Images/Logo/bieke.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 奔驰', 'Url': '/Images/Logo/benchi.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 保时捷', 'Url': '/Images/Logo/baoshijie.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 宝龙', 'Url': '/Images/Logo/baolong.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 比亚迪', 'Url': '/Images/Logo/biyadi.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 宝马', 'Url': '/Images/Logo/baoma.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 标致', 'Url': '/Images/Logo/biaozhi.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 宾利', 'Url': '/Images/Logo/binli.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 北汽制造',\n", + " 'Url': '/Images/Logo/beiqizhizao.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'B - 北京汽车',\n", + " 'Url': '/Images/Logo/beijingqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'B - 宝骏', 'Url': '/Images/Logo/baojun.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 巴博斯', 'Url': '/Images/Logo/babosi.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 宝沃', 'Url': '/Images/Logo/baowo.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 比速汽车', 'Url': '/Images/Logo/bisuqiche.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 北汽瑞丽',\n", + " 'Url': '/Images/Logo/beiqiruili.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'B - 本田', 'Url': '/Images/Logo/bentian.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 北汽新能源',\n", + " 'Url': '/Images/Logo/beiqixinnengyuan.png',\n", + " 'ImageUrl': None}],\n", + " 'C': [{'Brand': 'C - 成功',\n", + " 'Url': '/Images/Logo/chenggong.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'C - 长安', 'Url': '/Images/Logo/changan.png', 'ImageUrl': None},\n", + " {'Brand': 'C - 昌河', 'Url': '/Images/Logo/changhe.png', 'ImageUrl': None},\n", + " {'Brand': 'C - 长安商用',\n", + " 'Url': '/Images/Logo/changanshangyong.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'C - 长城', 'Url': '/Images/Logo/changcheng.png', 'ImageUrl': None},\n", + " {'Brand': 'C - 传祺', 'Url': '/Images/Logo/chuanzuo.png', 'ImageUrl': None}],\n", + " 'D': [{'Brand': 'D - 大众',\n", + " 'Url': '/Images/Logo/dazhong.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'D - 大迪', 'Url': '/Images/Logo/dadi.png', 'ImageUrl': None},\n", + " {'Brand': 'D - 大发', 'Url': '/Images/Logo/dafa.png', 'ImageUrl': None},\n", + " {'Brand': 'D - 大宇', 'Url': '/Images/Logo/dayu.png', 'ImageUrl': None},\n", + " {'Brand': 'D - 道奇', 'Url': '/Images/Logo/daoqi.png', 'ImageUrl': None},\n", + " {'Brand': 'D - 东风汽车',\n", + " 'Url': '/Images/Logo/dongfengqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'D - 东风风神',\n", + " 'Url': '/Images/Logo/dongfengfengshen.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'D - DS', 'Url': '/Images/Logo/ds.png', 'ImageUrl': None},\n", + " {'Brand': 'D - 电咖', 'Url': '/Images/Logo/dianka.png', 'ImageUrl': None},\n", + " {'Brand': 'D - 大乘汽车',\n", + " 'Url': '/Images/Logo/dachengqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'D - 东南', 'Url': '/Images/Logo/dongnan.png', 'ImageUrl': None},\n", + " {'Brand': 'D - 东风风度',\n", + " 'Url': '/Images/Logo/dongfengfengdu.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'D - 大通', 'Url': '/Images/Logo/datong.png', 'ImageUrl': None},\n", + " {'Brand': 'D - 东风小康',\n", + " 'Url': '/Images/Logo/dongfengxiaokang.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'D - 东风富康',\n", + " 'Url': '/Images/Logo/dongfengfukang.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'D - 东风风行',\n", + " 'Url': '/Images/Logo/dongfengfengxing.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'D - 东风俊风',\n", + " 'Url': '/Images/Logo/dongfengjunfeng.png',\n", + " 'ImageUrl': None}],\n", + " 'F': [{'Brand': 'F - 菲亚特',\n", + " 'Url': '/Images/Logo/feiyate.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'ImageUrl': None},\n", + " {'Brand': 'F - 福迪', 'Url': '/Images/Logo/fudi.png', 'ImageUrl': None},\n", + " {'Brand': 'F - 富奇', 'Url': '/Images/Logo/fuqi.png', 'ImageUrl': None},\n", + " {'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'ImageUrl': None},\n", + " {'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'ImageUrl': None},\n", + " {'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'ImageUrl': None}],\n", + " 'G': [{'Brand': 'G - 观致',\n", + " 'Url': '/Images/Logo/guanzhi.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'G - GMC', 'Url': '/Images/Logo/gmc.png', 'ImageUrl': None},\n", + " {'Brand': 'G - 光冈', 'Url': '/Images/Logo/guanggang.png', 'ImageUrl': None},\n", + " {'Brand': 'G - 国金', 'Url': '/Images/Logo/guojin.png', 'ImageUrl': None},\n", + " {'Brand': 'G - 广汽新能源',\n", + " 'Url': '/Images/Logo/guangqixinnengyuan.png',\n", + " 'ImageUrl': None}],\n", + " 'H': [{'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 华普', 'Url': '/Images/Logo/huapu.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 华泰', 'Url': '/Images/Logo/huatai.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 黄海', 'Url': '/Images/Logo/huanghai.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 红旗', 'Url': '/Images/Logo/hongqi.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 汇众', 'Url': '/Images/Logo/huizhong.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 海格', 'Url': '/Images/Logo/haige.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 黑豹', 'Url': '/Images/Logo/heibao.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 恒天', 'Url': '/Images/Logo/hengtian.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 华北', 'Url': '/Images/Logo/huabei.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 幻速', 'Url': '/Images/Logo/huansu.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 华颂', 'Url': '/Images/Logo/huasong.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 汉腾汽车',\n", + " 'Url': '/Images/Logo/hantengqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'H - 华骐', 'Url': '/Images/Logo/huazuo.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 红星汽车',\n", + " 'Url': '/Images/Logo/hongxingqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'H - 海马', 'Url': '/Images/Logo/haima.png', 'ImageUrl': None},\n", + " {'Brand': 'H - 哈弗', 'Url': '/Images/Logo/hafu.png', 'ImageUrl': None}],\n", + " 'J': [{'Brand': 'J - 吉奥', 'Url': '/Images/Logo/jiao.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 吉普', 'Url': '/Images/Logo/jipu.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 江南', 'Url': '/Images/Logo/jiangnan.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 江苏南亚',\n", + " 'Url': '/Images/Logo/jiangsunanya.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'J - 捷豹', 'Url': '/Images/Logo/jiebao.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 金程', 'Url': '/Images/Logo/jincheng.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 江铃', 'Url': '/Images/Logo/jiangling.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 九龙', 'Url': '/Images/Logo/jiulong.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 解放', 'Url': '/Images/Logo/jiefang.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 金旅', 'Url': '/Images/Logo/jinlv.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 君马', 'Url': '/Images/Logo/junma.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 吉利', 'Url': '/Images/Logo/jili.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 几何汽车', 'Url': '/Images/Logo/jiheqiche.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 江淮', 'Url': '/Images/Logo/jianghuai.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 金杯', 'Url': '/Images/Logo/jinbei.png', 'ImageUrl': None},\n", + " {'Brand': 'J - 江铃新能源',\n", + " 'Url': '/Images/Logo/jianglingxinnengyuan.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'J - 捷途', 'Url': '/Images/Logo/jietu.png', 'ImageUrl': None}],\n", + " 'K': [{'Brand': 'K - 开瑞', 'Url': '/Images/Logo/kairui.png', 'ImageUrl': None},\n", + " {'Brand': 'K - 凯迪拉克', 'Url': '/Images/Logo/kaidilake.png', 'ImageUrl': None},\n", + " {'Brand': 'K - 克莱斯勒', 'Url': '/Images/Logo/kelaisile.png', 'ImageUrl': None},\n", + " {'Brand': 'K - 卡尔森', 'Url': '/Images/Logo/kaersen.png', 'ImageUrl': None},\n", + " {'Brand': 'K - 科尼赛克', 'Url': '/Images/Logo/kenisaike.png', 'ImageUrl': None},\n", + " {'Brand': 'K - 凯翼', 'Url': '/Images/Logo/kaiyi.png', 'ImageUrl': None},\n", + " {'Brand': 'K - 卡威', 'Url': '/Images/Logo/kawei.png', 'ImageUrl': None}],\n", + " 'L': [{'Brand': 'L - 铃木', 'Url': '/Images/Logo/lingmu.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 路虎', 'Url': '/Images/Logo/luhu.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 猎豹', 'Url': '/Images/Logo/liebao.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 兰博基尼', 'Url': '/Images/Logo/lanbojini.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 雷诺', 'Url': '/Images/Logo/leinuo.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 路特斯', 'Url': '/Images/Logo/lutesi.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 莲花', 'Url': '/Images/Logo/lianhua.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 陆风', 'Url': '/Images/Logo/lufeng.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 罗孚', 'Url': '/Images/Logo/luozuo.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 劳伦士', 'Url': '/Images/Logo/laolunshi.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 陆地方舟',\n", + " 'Url': '/Images/Logo/ludifangzhou.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'L - 理念', 'Url': '/Images/Logo/linian.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 领克', 'Url': '/Images/Logo/lingke.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 罗夫哈特', 'Url': '/Images/Logo/luofuhate.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 力帆', 'Url': '/Images/Logo/lifan.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 领途汽车',\n", + " 'Url': '/Images/Logo/lingtuqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'L - 劳斯莱斯',\n", + " 'Url': '/Images/Logo/laosilaisi.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'L - 雷克萨斯', 'Url': '/Images/Logo/leikesasi.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 林肯', 'Url': '/Images/Logo/linken.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 零跑汽车',\n", + " 'Url': '/Images/Logo/lingpaoqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'L - 洛克汽车',\n", + " 'Url': '/Images/Logo/luokeqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'L - 理想', 'Url': '/Images/Logo/lixiang.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 雷丁', 'Url': '/Images/Logo/leiding.png', 'ImageUrl': None}],\n", + " 'M': [{'Brand': 'M - MINI', 'Url': '/Images/Logo/mini.png', 'ImageUrl': None},\n", + " {'Brand': 'M - MG', 'Url': '/Images/Logo/mg.png', 'ImageUrl': None},\n", + " {'Brand': 'M - 玛莎拉蒂', 'Url': '/Images/Logo/mashaladi.png', 'ImageUrl': None},\n", + " {'Brand': 'M - 迈巴赫', 'Url': '/Images/Logo/maibahe.png', 'ImageUrl': None},\n", + " {'Brand': 'M - 美亚', 'Url': '/Images/Logo/meiya.png', 'ImageUrl': None},\n", + " {'Brand': 'M - 马自达', 'Url': '/Images/Logo/mazida.png', 'ImageUrl': None},\n", + " {'Brand': 'M - 迈凯伦', 'Url': '/Images/Logo/maikailun.png', 'ImageUrl': None}],\n", + " 'N': [{'Brand': 'N - 纳智捷',\n", + " 'Url': '/Images/Logo/nazhijie.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'N - 哪吒汽车',\n", + " 'Url': '/Images/Logo/nazuoqiche.png',\n", + " 'ImageUrl': None}],\n", + " 'O': [{'Brand': 'O - 欧宝', 'Url': '/Images/Logo/oubao.png', 'ImageUrl': None},\n", + " {'Brand': 'O - 欧朗', 'Url': '/Images/Logo/oulang.png', 'ImageUrl': None},\n", + " {'Brand': 'O - 讴歌', 'Url': '/Images/Logo/zuoge.png', 'ImageUrl': None},\n", + " {'Brand': 'O - 欧拉', 'Url': '/Images/Logo/oula.png', 'ImageUrl': None},\n", + " {'Brand': 'O - 欧尚汽车',\n", + " 'Url': '/Images/Logo/oushangqiche.png',\n", + " 'ImageUrl': None}],\n", + " 'P': [{'Brand': 'P - Polestar',\n", + " 'Url': '/Images/Logo/polestar.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'P - 帕加尼', 'Url': '/Images/Logo/pajiani.png', 'ImageUrl': None}],\n", + " 'Q': [{'Brand': 'Q - 奇瑞', 'Url': '/Images/Logo/qirui.png', 'ImageUrl': None},\n", + " {'Brand': 'Q - 起亚', 'Url': '/Images/Logo/qiya.png', 'ImageUrl': None},\n", + " {'Brand': 'Q - 庆铃', 'Url': '/Images/Logo/qingling.png', 'ImageUrl': None},\n", + " {'Brand': 'Q - 启腾', 'Url': '/Images/Logo/qiteng.png', 'ImageUrl': None},\n", + " {'Brand': 'Q - 乔治·巴顿',\n", + " 'Url': '/Images/Logo/qiaozhi%C2%B7badun.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'Q - 前途汽车',\n", + " 'Url': '/Images/Logo/qiantuqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'Q - 启辰', 'Url': '/Images/Logo/qichen.png', 'ImageUrl': None}],\n", + " 'R': [{'Brand': 'R - 日产', 'Url': '/Images/Logo/richan.png', 'ImageUrl': None},\n", + " {'Brand': 'R - 瑞麒', 'Url': '/Images/Logo/ruizuo.png', 'ImageUrl': None},\n", + " {'Brand': 'R - RUF', 'Url': '/Images/Logo/ruf.png', 'ImageUrl': None},\n", + " {'Brand': 'R - 荣威', 'Url': '/Images/Logo/rongwei.png', 'ImageUrl': None}],\n", + " 'S': [{'Brand': 'S - Smart',\n", + " 'Url': '/Images/Logo/smart.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'S - 思铭', 'Url': '/Images/Logo/siming.png', 'ImageUrl': None},\n", + " {'Brand': 'S - 斯巴鲁', 'Url': '/Images/Logo/sibalu.png', 'ImageUrl': None},\n", + " {'Brand': 'S - 萨博', 'Url': '/Images/Logo/sabo.png', 'ImageUrl': None},\n", + " {'Brand': 'S - 赛宝', 'Url': '/Images/Logo/saibao.png', 'ImageUrl': None},\n", + " {'Brand': 'S - 双环', 'Url': '/Images/Logo/shuanghuan.png', 'ImageUrl': None},\n", + " {'Brand': 'S - 双龙', 'Url': '/Images/Logo/shuanglong.png', 'ImageUrl': None},\n", + " {'Brand': 'S - 世爵', 'Url': '/Images/Logo/shijue.png', 'ImageUrl': None},\n", + " {'Brand': 'S - 陕汽通家',\n", + " 'Url': '/Images/Logo/shanqitongjia.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'S - 斯威汽车',\n", + " 'Url': '/Images/Logo/siweiqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'S - 三菱', 'Url': '/Images/Logo/sanling.png', 'ImageUrl': None},\n", + " {'Brand': 'S - 斯柯达', 'Url': '/Images/Logo/sikeda.png', 'ImageUrl': None},\n", + " {'Brand': 'S - 绅宝', 'Url': '/Images/Logo/shenbao.png', 'ImageUrl': None}],\n", + " 'T': [{'Brand': 'T - 天马', 'Url': '/Images/Logo/tianma.png', 'ImageUrl': None},\n", + " {'Brand': 'T - 通田', 'Url': '/Images/Logo/tongtian.png', 'ImageUrl': None},\n", + " {'Brand': 'T - 腾势', 'Url': '/Images/Logo/tengshi.png', 'ImageUrl': None},\n", + " {'Brand': 'T - 天津一汽',\n", + " 'Url': '/Images/Logo/tianjinyiqi.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'T - 特斯拉', 'Url': '/Images/Logo/tesila.png', 'ImageUrl': None}],\n", + " 'W': [{'Brand': 'W - 万丰',\n", + " 'Url': '/Images/Logo/wanfeng.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'W - 威麟', 'Url': '/Images/Logo/weizuo.png', 'ImageUrl': None},\n", + " {'Brand': 'W - 沃尔沃', 'Url': '/Images/Logo/woerwo.png', 'ImageUrl': None},\n", + " {'Brand': 'W - 五菱', 'Url': '/Images/Logo/wuling.png', 'ImageUrl': None},\n", + " {'Brand': 'W - 威旺', 'Url': '/Images/Logo/weiwang.png', 'ImageUrl': None},\n", + " {'Brand': 'W - 威兹曼', 'Url': '/Images/Logo/weiziman.png', 'ImageUrl': None},\n", + " {'Brand': 'W - 五十铃', 'Url': '/Images/Logo/wushiling.png', 'ImageUrl': None},\n", + " {'Brand': 'W - WEY', 'Url': '/Images/Logo/wey.png', 'ImageUrl': None},\n", + " {'Brand': 'W - 威马', 'Url': '/Images/Logo/weima.png', 'ImageUrl': None},\n", + " {'Brand': 'W - 蔚来', 'Url': '/Images/Logo/weilai.png', 'ImageUrl': None}],\n", + " 'X': [{'Brand': 'X - 新雅途',\n", + " 'Url': '/Images/Logo/xinyatu.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'X - 厦门金龙',\n", + " 'Url': '/Images/Logo/xiamenjinlong.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'X - 雪佛兰', 'Url': '/Images/Logo/xuefolan.png', 'ImageUrl': None},\n", + " {'Brand': 'X - 雪铁龙', 'Url': '/Images/Logo/xuetielong.png', 'ImageUrl': None},\n", + " {'Brand': 'X - 西雅特', 'Url': '/Images/Logo/xiyate.png', 'ImageUrl': None},\n", + " {'Brand': 'X - 新凯', 'Url': '/Images/Logo/xinkai.png', 'ImageUrl': None},\n", + " {'Brand': 'X - 新特汽车',\n", + " 'Url': '/Images/Logo/xinteqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'X - 现代', 'Url': '/Images/Logo/xiandai.png', 'ImageUrl': None},\n", + " {'Brand': 'X - 小鹏汽车',\n", + " 'Url': '/Images/Logo/xiaopengqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'X - 星途', 'Url': '/Images/Logo/xingtu.png', 'ImageUrl': None}],\n", + " 'Y': [{'Brand': 'Y - 英菲尼迪',\n", + " 'Url': '/Images/Logo/yingfeinidi.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'Y - 永源', 'Url': '/Images/Logo/yongyuan.png', 'ImageUrl': None},\n", + " {'Brand': 'Y - 云雀', 'Url': '/Images/Logo/yunque.png', 'ImageUrl': None},\n", + " {'Brand': 'Y - 一汽吉林', 'Url': '/Images/Logo/yiqijilin.png', 'ImageUrl': None},\n", + " {'Brand': 'Y - 一汽华利', 'Url': '/Images/Logo/yiqihuali.png', 'ImageUrl': None},\n", + " {'Brand': 'Y - 依维柯', 'Url': '/Images/Logo/yiweike.png', 'ImageUrl': None},\n", + " {'Brand': 'Y - 一汽通用',\n", + " 'Url': '/Images/Logo/yiqitongyong.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'Y - 云度汽车',\n", + " 'Url': '/Images/Logo/yunduqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'Y - 裕路', 'Url': '/Images/Logo/yulu.png', 'ImageUrl': None},\n", + " {'Brand': 'Y - 御捷新能源',\n", + " 'Url': '/Images/Logo/yujiexinnengyuan.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'Y - 一汽奔腾',\n", + " 'Url': '/Images/Logo/yiqibenteng.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'Y - 野马', 'Url': '/Images/Logo/yema.png', 'ImageUrl': None},\n", + " {'Brand': 'Y - 英致', 'Url': '/Images/Logo/yingzhi.png', 'ImageUrl': None},\n", + " {'Brand': 'Y - 易至汽车',\n", + " 'Url': '/Images/Logo/yizhiqiche.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'Y - 银隆新能源',\n", + " 'Url': '/Images/Logo/yinlongxinnengyuan.png',\n", + " 'ImageUrl': None}],\n", + " 'Z': [{'Brand': 'Z - 中华',\n", + " 'Url': '/Images/Logo/zhonghua.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'Z - 中顺', 'Url': '/Images/Logo/zhongshun.png', 'ImageUrl': None},\n", + " {'Brand': 'Z - 中兴', 'Url': '/Images/Logo/zhongxing.png', 'ImageUrl': None},\n", + " {'Brand': 'Z - 众泰', 'Url': '/Images/Logo/zhongtai.png', 'ImageUrl': None},\n", + " {'Brand': 'Z - 中欧', 'Url': '/Images/Logo/zhongou.png', 'ImageUrl': None},\n", + " {'Brand': 'Z - 知豆', 'Url': '/Images/Logo/zhidou.png', 'ImageUrl': None},\n", + " {'Brand': 'Z - 浙江卡尔森',\n", + " 'Url': '/Images/Logo/zhejiangkaersen.png',\n", + " 'ImageUrl': None},\n", + " {'Brand': 'Z - 之诺', 'Url': '/Images/Logo/zhinuo.png', 'ImageUrl': None}],\n", + " 'hot': [{'Brand': 'A - 奥迪', 'Url': '/Images/Logo/aodi.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 别克', 'Url': '/Images/Logo/bieke.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 奔驰', 'Url': '/Images/Logo/benchi.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 宝马', 'Url': '/Images/Logo/baoma.png', 'ImageUrl': None},\n", + " {'Brand': 'D - 大众', 'Url': '/Images/Logo/dazhong.png', 'ImageUrl': None},\n", + " {'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'ImageUrl': None},\n", + " {'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 本田', 'Url': '/Images/Logo/bentian.png', 'ImageUrl': None},\n", + " {'Brand': 'R - 日产', 'Url': '/Images/Logo/richan.png', 'ImageUrl': None},\n", + " {'Brand': 'S - 斯柯达', 'Url': '/Images/Logo/sikeda.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 标致', 'Url': '/Images/Logo/biaozhi.png', 'ImageUrl': None},\n", + " {'Brand': 'M - 马自达', 'Url': '/Images/Logo/mazida.png', 'ImageUrl': None},\n", + " {'Brand': 'X - 现代', 'Url': '/Images/Logo/xiandai.png', 'ImageUrl': None},\n", + " {'Brand': 'B - 比亚迪', 'Url': '/Images/Logo/biyadi.png', 'ImageUrl': None},\n", + " {'Brand': 'X - 雪铁龙', 'Url': '/Images/Logo/xuetielong.png', 'ImageUrl': None},\n", + " {'Brand': 'X - 雪佛兰', 'Url': '/Images/Logo/xuefolan.png', 'ImageUrl': None},\n", + " {'Brand': 'Q - 起亚', 'Url': '/Images/Logo/qiya.png', 'ImageUrl': None},\n", + " {'Brand': 'L - 铃木', 'Url': '/Images/Logo/lingmu.png', 'ImageUrl': None},\n", + " {'Brand': 'M - MG', 'Url': '/Images/Logo/mg.png', 'ImageUrl': None},\n", + " {'Brand': 'R - 荣威', 'Url': '/Images/Logo/rongwei.png', 'ImageUrl': None}]}" + ] + }, + "execution_count": 48, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "index" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A - 阿尔法·罗米欧 done\n", + "A - 安驰 done\n", + "A - ARCFOX done\n", + "A - 阿斯顿·马丁 done\n", + "A - 奥迪 done\n", + "B - 别克 done\n", + "B - 奔驰 done\n", + "B - 保时捷 done\n", + "B - 宝龙 done\n", + "B - 比亚迪 done\n", + "B - 宝马 done\n", + "B - 标致 done\n", + ">> B - 标致 - VE-GPEUG505 - {'Vehicle': '505-广州标致', 'ProductID': 'VE-GPEUG505', 'BrandType': '广州标致', 'Brand': 'B - 标致', 'Url': '/Images/Logo/biaozhi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GPEUG505.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '505', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GPEUG505.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/BiaoZhi.png', 'Tires': '185/80R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 1, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "B - 宾利 done\n", + ">> B - 宾利 - VE-BENT07AB - {'Vehicle': '雅骏-宾利汽车', 'ProductID': 'VE-BENT07AB', 'BrandType': '宾利汽车', 'Brand': 'B - 宾利', 'Url': '/Images/Logo/binli.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-BENT07AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '雅骏', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-BENT07AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/BinLi.png', 'Tires': '255/55R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "B - 北汽制造 done\n", + ">> B - 北汽制造 - VE-LNB-LULING - {'Vehicle': '陆铃-北汽制造', 'ProductID': 'VE-LNB-LULING', 'BrandType': '北汽制造', 'Brand': 'B - 北汽制造', 'Url': '/Images/Logo/beiqizhizao.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LNB-LULING.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '陆铃', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LNB-LULING.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/BeiQiZhiZao.png', 'Tires': '225/70R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> B - 北汽制造 - VE-LNB-LEICHI - {'Vehicle': '雷驰-北汽制造', 'ProductID': 'VE-LNB-LEICHI', 'BrandType': '北汽制造', 'Brand': 'B - 北汽制造', 'Url': '/Images/Logo/beiqizhizao.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LNB-LEICHI.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '雷驰', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LNB-LEICHI.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/BeiQiZhiZao.png', 'Tires': '225/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "B - 北京汽车 done\n", + "B - 宝骏 done\n", + "B - 巴博斯 done\n", + "B - 宝沃 done\n", + "B - 比速汽车 done\n", + "B - 北汽瑞丽 done\n", + "B - 本田 done\n", + "B - 北汽新能源 done\n", + "C - 成功 done\n", + "C - 长安 done\n", + ">> C - 长安 - VE-CACS35 - {'Vehicle': 'CS35-乘用车', 'ProductID': 'VE-CACS35', 'BrandType': '乘用车', 'Brand': 'C - 长安', 'Url': '/Images/Logo/changan.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-CACS35.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'CS35', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-CACS35.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/ChangAn.png', 'Tires': '215/50R17;205/60R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 27, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 65, in \n", + " gbk_fp.write(ij.encode('gbk'))\n", + "UnicodeEncodeError: 'gbk' codec can't encode character '\\xa0' in position 55: illegal multibyte sequence\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "C - 昌河 done\n", + "C - 长安商用 done\n", + ">> C - 长安商用 - VE-CHAN05AU - {'Vehicle': '长安星韵-商用车', 'ProductID': 'VE-CHAN05AU', 'BrandType': '商用车', 'Brand': 'C - 长安商用', 'Url': '/Images/Logo/changanshangyong.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-CHAN05AU.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '长安星韵', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-CHAN05AU.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/ChangAnShangYong.png', 'Tires': '165/70R13', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 5, 'Priority3': 15, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "C - 长城 done\n", + ">> C - 长城 - VE-GREA04BD - {'Vehicle': '迪尔-长城汽车', 'ProductID': 'VE-GREA04BD', 'BrandType': '长城汽车', 'Brand': 'C - 长城', 'Url': '/Images/Logo/changcheng.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GREA04BD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '迪尔', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GREA04BD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/ChangCheng.png', 'Tires': '205/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 25, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "C - 传祺 done\n", + "D - 大众 done\n", + "D - 大迪 done\n", + "D - 大发 done\n", + "D - 大宇 done\n", + ">> D - 大宇 - VE-DAEW05AB - {'Vehicle': '典雅-大宇汽车', 'ProductID': 'VE-DAEW05AB', 'BrandType': '大宇汽车', 'Brand': 'D - 大宇', 'Url': '/Images/Logo/dayu.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-DAEW05AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '典雅', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-DAEW05AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/DaYu.png', 'Tires': '205/60R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> D - 大宇 - VE-DAEW99AB - {'Vehicle': '蓝天-大宇汽车', 'ProductID': 'VE-DAEW99AB', 'BrandType': '大宇汽车', 'Brand': 'D - 大宇', 'Url': '/Images/Logo/dayu.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-DAEW99AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '蓝天', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-DAEW99AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/DaYu.png', 'Tires': '155/80R13', 'SpecialTireSize': '155R13', 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> D - 大宇 - VE-DAEW05AC - {'Vehicle': '旅行家-大宇汽车', 'ProductID': 'VE-DAEW05AC', 'BrandType': '大宇汽车', 'Brand': 'D - 大宇', 'Url': '/Images/Logo/dayu.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-DAEW05AC.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '旅行家', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-DAEW05AC.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/DaYu.png', 'Tires': '185/65R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "D - 道奇 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "D - 东风汽车 done\n", + ">> D - 东风汽车 - VE-DDJJL - {'Vehicle': '汗马-东风汽车', 'ProductID': 'VE-DDJJL', 'BrandType': '东风汽车', 'Brand': 'D - 东风汽车', 'Url': '/Images/Logo/dongfengqiche.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-DDJJL.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '汗马', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-DDJJL.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/DongFengQiChe.png', 'Tires': '37/12.5R16.5', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 10, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> D - 东风汽车 - VE-DF-MENSHI - {'Vehicle': '猛士-东风汽车', 'ProductID': 'VE-DF-MENSHI', 'BrandType': '东风汽车', 'Brand': 'D - 东风汽车', 'Url': '/Images/Logo/dongfengqiche.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-DF-MENSHI.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '猛士', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-DF-MENSHI.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/DongFengQiChe.png', 'Tires': '315/70R17LT;215/75R16', 'SpecialTireSize': '37.5X12.5R16.5', 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 9, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> D - 东风汽车 - VE-LGG-A10 - {'Vehicle': '御风A100-东风汽车', 'ProductID': 'VE-LGG-A10', 'BrandType': '东风汽车', 'Brand': 'D - 东风汽车', 'Url': '/Images/Logo/dongfengqiche.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LGG-A10.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '御风A100', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LGG-A10.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/DongFengQiChe.png', 'Tires': '215/75R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> D - 东风汽车 - VE-LGG-AE100 - {'Vehicle': '御风EA100-东风汽车', 'ProductID': 'VE-LGG-AE100', 'BrandType': '东风汽车', 'Brand': 'D - 东风汽车', 'Url': '/Images/Logo/dongfengqiche.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LGG-AE100.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '御风EA100', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LGG-AE100.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/DongFengQiChe.png', 'Tires': '215/75R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "D - 东风风神 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "D - DS done\n", + "D - 电咖 done\n", + "D - 大乘汽车 done\n", + "D - 东南 done\n", + "D - 东风风度 done\n", + "D - 大通 done\n", + ">> D - 大通 - VE-SQDTYSTN - {'Vehicle': '伊思坦纳-上海汽车', 'ProductID': 'VE-SQDTYSTN', 'BrandType': '上海汽车', 'Brand': 'D - 大通', 'Url': '/Images/Logo/datong.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-SQDTYSTN.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '伊思坦纳', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-SQDTYSTN.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/DaTong.png', 'Tires': '195/75R16;195/75R16C', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 65, in \n", + " gbk_fp.write(ij.encode('gbk'))\n", + "UnicodeEncodeError: 'gbk' codec can't encode character '\\xa0' in position 60: illegal multibyte sequence\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "D - 东风小康 done\n", + "D - 东风富康 done\n", + "D - 东风风行 done\n", + "D - 东风俊风 done\n", + "F - 菲亚特 done\n", + ">> F - 菲亚特 - VE-FIAT05AA - {'Vehicle': '多宝-菲亚特进口', 'ProductID': 'VE-FIAT05AA', 'BrandType': '菲亚特进口', 'Brand': 'F - 菲亚特', 'Url': '/Images/Logo/feiyate.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FIAT05AA.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '多宝', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FIAT05AA.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FeiYaTe.png', 'Tires': '175/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 7, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 菲亚特 - VE-FIATMULTIPLA - {'Vehicle': '多能-菲亚特进口', 'ProductID': 'VE-FIATMULTIPLA', 'BrandType': '菲亚特进口', 'Brand': 'F - 菲亚特', 'Url': '/Images/Logo/feiyate.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FIATMULTIPLA.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '多能', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FIATMULTIPLA.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FeiYaTe.png', 'Tires': '185/65R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 菲亚特 - VE-FIATSTILO - {'Vehicle': '短剑-菲亚特进口', 'ProductID': 'VE-FIATSTILO', 'BrandType': '菲亚特进口', 'Brand': 'F - 菲亚特', 'Url': '/Images/Logo/feiyate.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FIATSTILO.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '短剑', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FIATSTILO.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FeiYaTe.png', 'Tires': '215/75R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "F - 丰田 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-JCRAV4YSJT - {'Vehicle': 'RAV4-一汽丰田', 'ProductID': 'VE-JCRAV4YSJT', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JCRAV4YSJT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'RAV4', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JCRAV4YSJT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '225/65R17;235/55R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 15, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-JCRONGFANGYSJT - {'Vehicle': 'RAV4荣放-一汽丰田', 'ProductID': 'VE-JCRONGFANGYSJT', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-JCRONGFANGYSJT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'RAV4荣放', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-JCRONGFANGYSJT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '225/65R17;235/55R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 14, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 62, in \n", + " for b in load_child_brands(vid, pailiang, nian):\n", + " File \"\", line 38, in load_child_brands\n", + " return json.loads(index_regex.findall(requests.get(url).text)[0])['SalesName']\n", + "IndexError: list index out of range\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOYT07BD - {'Vehicle': '花冠-一汽丰田', 'ProductID': 'VE-TOYT07BD', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYT07BD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '花冠', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYT07BD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '195/60R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 13, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-FJTKLLYSJT - {'Vehicle': '卡罗拉-一汽丰田', 'ProductID': 'VE-FJTKLLYSJT', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FJTKLLYSJT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '卡罗拉', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FJTKLLYSJT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '195/65R15;205/55R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 12, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOSC07AF - {'Vehicle': '普拉多-一汽丰田', 'ProductID': 'VE-TOSC07AF', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOSC07AF.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '普拉多', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOSC07AF.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '265/65R17;265/70R16;265/60R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 11, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-TOYT07BE - {'Vehicle': '锐志-一汽丰田', 'ProductID': 'VE-TOYT07BE', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYT07BE.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '锐志', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYT07BE.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '215/60R16;215/55R17;235/45R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 10, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOYT07AL - {'Vehicle': '皇冠-一汽丰田', 'ProductID': 'VE-TOYT07AL', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYT07AL.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '皇冠', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYT07AL.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '215/60R16;215/55R17;235/50R17;225/50R17;235/45R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 9, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-LDKLZYSJT - {'Vehicle': '兰德酷路泽-一汽丰田', 'ProductID': 'VE-LDKLZYSJT', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LDKLZYSJT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '兰德酷路泽', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LDKLZYSJT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '285/65R17;285/60R18;275/65R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 8, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-FACC07AG - {'Vehicle': '陆地巡洋舰-一汽丰田', 'ProductID': 'VE-FACC07AG', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FACC07AG.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '陆地巡洋舰', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FACC07AG.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '275/65R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 7, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-FACC07AB - {'Vehicle': '普锐斯-一汽丰田', 'ProductID': 'VE-FACC07AB', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FACC07AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '普锐斯', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FACC07AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '195/60R15;195/65R15;195/55R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 6, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOYT07AF - {'Vehicle': '威驰-一汽丰田', 'ProductID': 'VE-TOYT07AF', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYT07AF.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '威驰', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYT07AF.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '175/65R14;185/60R15;155/80R13', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 5, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-LMF-VIOSFS - {'Vehicle': '威驰FS-一汽丰田', 'ProductID': 'VE-LMF-VIOSFS', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LMF-VIOSFS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '威驰FS', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LMF-VIOSFS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '185/60R15;175/65R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOYOTR - {'Vehicle': '特锐-一汽丰田', 'ProductID': 'VE-TOYOTR', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYOTR.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '特锐', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYOTR.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '205/70R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 3, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-LVG-IZOA - {'Vehicle': '奕泽-一汽丰田', 'ProductID': 'VE-LVG-IZOA', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LVG-IZOA.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '奕泽', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LVG-IZOA.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '215/60R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-LFM-AVALON - {'Vehicle': '亚洲龙-一汽丰田', 'ProductID': 'VE-LFM-AVALON', 'BrandType': '一汽丰田', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LFM-AVALON.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '亚洲龙', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LFM-AVALON.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '215/55R17;235/45R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 1, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOYLFIOFBL - {'Vehicle': '86-丰田进口', 'ProductID': 'VE-TOYLFIOFBL', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYLFIOFBL.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '86', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYLFIOFBL.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '205/55R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 15, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-FJLZJTJK - {'Vehicle': 'FJ酷路泽-丰田进口', 'ProductID': 'VE-FJLZJTJK', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FJLZJTJK.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'FJ酷路泽', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FJLZJTJK.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '265/70R17;265/75R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 14, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOYO07AB - {'Vehicle': 'RAV4-丰田进口', 'ProductID': 'VE-TOYO07AB', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYO07AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'RAV4', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYO07AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '235/60R16;225/65R17;215/70R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 13, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-TOYO07AF - {'Vehicle': '海狮-丰田进口', 'ProductID': 'VE-TOYO07AF', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-TOYO07AF.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '海狮', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-TOYO07AF.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': None, 'SpecialTireSize': '195R15C', 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 12, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOYO06AB - {'Vehicle': '佳美-丰田进口', 'ProductID': 'VE-TOYO06AB', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYO06AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '佳美', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYO06AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '215/60R16;205/65R15;215/55R17;215/65R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 11, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-FJTSLDJTJK - {'Vehicle': '普拉多-丰田进口', 'ProductID': 'VE-FJTSLDJTJK', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FJTSLDJTJK.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '普拉多', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FJTSLDJTJK.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '265/65R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 10, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOYO07AD - {'Vehicle': '普瑞维亚(大霸王)-丰田进口', 'ProductID': 'VE-TOYO07AD', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-TOYO07AD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '普瑞维亚(大霸王)', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-TOYO07AD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '215/55R17;215/60R16;205/65R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 9, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-TOYLFIRXWS - {'Vehicle': '威飒-丰田进口', 'ProductID': 'VE-TOYLFIRXWS', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-TOYLFIRXWS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '威飒', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-TOYLFIRXWS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '245/55R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 8, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOYLFIRAEF - {'Vehicle': '埃尔法-丰田进口', 'ProductID': 'VE-TOYLFIRAEF', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-TOYLFIRAEF.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '埃尔法', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-TOYLFIRAEF.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '235/50R18;215/65R16;225/60R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 7, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-TOYLFIRJLC - {'Vehicle': '杰路驰-丰田进口', 'ProductID': 'VE-TOYLFIRJLC', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYLFIRJLC.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '杰路驰', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYLFIRJLC.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '205/55R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 6, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOYLFIRXBW - {'Vehicle': '小霸王-丰田进口', 'ProductID': 'VE-TOYLFIRXBW', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYLFIRXBW.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '小霸王', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYLFIRXBW.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '195/60R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-TOYOHLANDER - {'Vehicle': '汉兰达-丰田进口', 'ProductID': 'VE-TOYOHLANDER', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYOHLANDER.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '汉兰达', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYOHLANDER.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '245/55R19;225/70R16;245/65R17;245/60R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-TOYOLCRUSER - {'Vehicle': '兰德酷路泽-丰田进口', 'ProductID': 'VE-TOYOLCRUSER', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-TOYOLCRUSER.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '兰德酷路泽', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-TOYOLCRUSER.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '285/65R17;285/60R18;275/65R17;245/75R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n", + ">> F - 丰田 - VE-vellfire - {'Vehicle': '威尔法-丰田进口', 'ProductID': 'VE-vellfire', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-vellfire.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '威尔法', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-vellfire.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '225/60R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 丰田 - VE-5TD-Sienna - {'Vehicle': '塞纳-丰田进口', 'ProductID': 'VE-5TD-Sienna', 'BrandType': '丰田进口', 'Brand': 'F - 丰田', 'Url': '/Images/Logo/fengtian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-5TD-Sienna.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '塞纳', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-5TD-Sienna.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FengTian.png', 'Tires': '225/60R17;235/60R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "F - 福迪 done\n", + ">> F - 福迪 - VE-FUDI05AC - {'Vehicle': '探索者I-福迪汽车', 'ProductID': 'VE-FUDI05AC', 'BrandType': '福迪汽车', 'Brand': 'F - 福迪', 'Url': '/Images/Logo/fudi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUDI05AC.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '探索者I', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUDI05AC.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuDi.png', 'Tires': '235/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 10, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福迪 - VE-FUDI06AC - {'Vehicle': '探索者Ⅱ-福迪汽车', 'ProductID': 'VE-FUDI06AC', 'BrandType': '福迪汽车', 'Brand': 'F - 福迪', 'Url': '/Images/Logo/fudi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUDI06AC.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '探索者Ⅱ', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUDI06AC.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuDi.png', 'Tires': '235/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 9, 'VehicleSeries': None}\n", + ">> F - 福迪 - VE-FUDI07AH - {'Vehicle': '探索者Ⅲ-福迪汽车', 'ProductID': 'VE-FUDI07AH', 'BrandType': '福迪汽车', 'Brand': 'F - 福迪', 'Url': '/Images/Logo/fudi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUDI07AH.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '探索者Ⅲ', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUDI07AH.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuDi.png', 'Tires': '235/75R15;215/75R15;235/70R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 8, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福迪 - VE-FUDLFIRXCT - {'Vehicle': '探索者6-福迪汽车', 'ProductID': 'VE-FUDLFIRXCT', 'BrandType': '福迪汽车', 'Brand': 'F - 福迪', 'Url': '/Images/Logo/fudi.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FUDLFIRXCT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '探索者6', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FUDLFIRXCT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuDi.png', 'Tires': '235/75R16;245/70R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 7, 'VehicleSeries': None}\n", + ">> F - 福迪 - VE-FUDLFIRXXS - {'Vehicle': '雄狮-福迪汽车', 'ProductID': 'VE-FUDLFIRXXS', 'BrandType': '福迪汽车', 'Brand': 'F - 福迪', 'Url': '/Images/Logo/fudi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUDLFIRXXS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '雄狮', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUDLFIRXXS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuDi.png', 'Tires': '215/75R15;235/70R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 6, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福迪 - VE-FUDLFIRXXF - {'Vehicle': '雄狮F16-福迪汽车', 'ProductID': 'VE-FUDLFIRXXF', 'BrandType': '福迪汽车', 'Brand': 'F - 福迪', 'Url': '/Images/Logo/fudi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUDLFIRXXF.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '雄狮F16', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUDLFIRXXF.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuDi.png', 'Tires': '235/70R16;215/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n", + ">> F - 福迪 - VE-FUDIXSHIF22 - {'Vehicle': '雄狮F22-福迪汽车', 'ProductID': 'VE-FUDIXSHIF22', 'BrandType': '福迪汽车', 'Brand': 'F - 福迪', 'Url': '/Images/Logo/fudi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUDIXSHIF22.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '雄狮F22', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUDIXSHIF22.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuDi.png', 'Tires': '235/70R17;235/70R16;245/70R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福迪 - VE-FUDI07AD - {'Vehicle': '飞越-福迪汽车', 'ProductID': 'VE-FUDI07AD', 'BrandType': '福迪汽车', 'Brand': 'F - 福迪', 'Url': '/Images/Logo/fudi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUDI07AD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '飞越', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUDI07AD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuDi.png', 'Tires': '235/75R15;215/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n", + ">> F - 福迪 - VE-FUDLFIRXCR - {'Vehicle': '小超人-福迪汽车', 'ProductID': 'VE-FUDLFIRXCR', 'BrandType': '福迪汽车', 'Brand': 'F - 福迪', 'Url': '/Images/Logo/fudi.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FUDLFIRXCR.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '小超人', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FUDLFIRXCR.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuDi.png', 'Tires': '235/70R16;215/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福迪 - VE-FUDILANFU - {'Vehicle': '揽福-福迪汽车', 'ProductID': 'VE-FUDILANFU', 'BrandType': '福迪汽车', 'Brand': 'F - 福迪', 'Url': '/Images/Logo/fudi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUDILANFU.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '揽福', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUDILANFU.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuDi.png', 'Tires': '245/70R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "F - 富奇 done\n", + ">> F - 富奇 - VE-FUQI06AB - {'Vehicle': '富奇-华翔汽车', 'ProductID': 'VE-FUQI06AB', 'BrandType': '华翔汽车', 'Brand': 'F - 富奇', 'Url': '/Images/Logo/fuqi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUQI06AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '富奇', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUQI06AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuQi.png', 'Tires': '275/70R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 富奇 - VE-FUQI07AF - {'Vehicle': '驭虎-华翔汽车', 'ProductID': 'VE-FUQI07AF', 'BrandType': '华翔汽车', 'Brand': 'F - 富奇', 'Url': '/Images/Logo/fuqi.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FUQI07AF.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '驭虎', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FUQI07AF.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuQi.png', 'Tires': '275/70R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "F - 福田 done\n", + ">> F - 福田 - VE-FUTDFIYMMD - {'Vehicle': '迷迪-福田汽车', 'ProductID': 'VE-FUTDFIYMMD', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMMD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '迷迪', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMMD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '185/70R14;185/65R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 25, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FUTDFIYMSP - {'Vehicle': '萨普-福田汽车', 'ProductID': 'VE-FUTDFIYMSP', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FUTDFIYMSP.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '萨普', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FUTDFIYMSP.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '205/70R14;215/75R15;245/70R16;225/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 24, 'VehicleSeries': None}\n", + ">> F - 福田 - VE-FUTDFIYTLZ - {'Vehicle': '拓路者-福田汽车', 'ProductID': 'VE-FUTDFIYTLZ', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYTLZ.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '拓路者', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYTLZ.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '245/70R16;265/70R16;235/70R15;235/75R15;245/70R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 23, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-LVC-CQC - {'Vehicle': '传奇C-福田汽车', 'ProductID': 'VE-LVC-CQC', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LVC-CQC.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '传奇C', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LVC-CQC.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '225/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 22, 'VehicleSeries': None}\n", + ">> F - 福田 - VE-FUTIANCHQI - {'Vehicle': '传奇X-福田汽车', 'ProductID': 'VE-FUTIANCHQI', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTIANCHQI.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '传奇X', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTIANCHQI.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '235/70R16;225/75R15;235/75R15;245/70R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 21, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FUTTYNUO - {'Vehicle': '图雅诺-福田汽车', 'ProductID': 'VE-FUTTYNUO', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTTYNUO.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '图雅诺', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTTYNUO.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '215/75R16;215/75R16C', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 20, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FTSAWANA - {'Vehicle': '萨瓦纳-福田汽车', 'ProductID': 'VE-FTSAWANA', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FTSAWANA.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '萨瓦纳', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FTSAWANA.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '265/65R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 19, 'VehicleSeries': None}\n", + ">> F - 福田 - VE-FUTIANQIETUV3 - {'Vehicle': '伽途V3-福田汽车', 'ProductID': 'VE-FUTIANQIETUV3', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUV3.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '伽途V3', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUV3.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '165/70R13C;165/70R13;175/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 18, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FUTIANQIETUV5 - {'Vehicle': '伽途V5-福田汽车', 'ProductID': 'VE-FUTIANQIETUV5', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUV5.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '伽途V5', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUV5.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '175/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 17, 'VehicleSeries': None}\n", + ">> F - 福田 - VE-FUTIANQIETUix5 - {'Vehicle': '伽途ix5-福田汽车', 'ProductID': 'VE-FUTIANQIETUix5', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUix5.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '伽途ix5', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUix5.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '185/70R14;195/60R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 16, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FUTIANQIETUix7 - {'Vehicle': '伽途ix7-福田汽车', 'ProductID': 'VE-FUTIANQIETUix7', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUix7.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '伽途ix7', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUix7.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '205/60R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 15, 'VehicleSeries': None}\n", + ">> F - 福田 - VE-FUTIANQIETUim6 - {'Vehicle': '伽途im6-福田汽车', 'ProductID': 'VE-FUTIANQIETUim6', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FUTIANQIETUim6.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '伽途im6', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FUTIANQIETUim6.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '195/65R15;195/60R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 14, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FUTIANQIETUim8 - {'Vehicle': '伽途im8-福田汽车', 'ProductID': 'VE-FUTIANQIETUim8', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUim8.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '伽途im8', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUim8.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '215/55R16;195/R15C;195/60R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 13, 'VehicleSeries': None}\n", + ">> F - 福田 - VE-FUTIANQIETUGT - {'Vehicle': '伽途GT-福田汽车', 'ProductID': 'VE-FUTIANQIETUGT', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUGT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '伽途GT', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTIANQIETUGT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '215/55R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 12, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FUTDFIYMPKE - {'Vehicle': '蒙派克E-福田汽车', 'ProductID': 'VE-FUTDFIYMPKE', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMPKE.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '蒙派克E', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMPKE.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '195/70R15;195/70R15C;205/70R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 11, 'VehicleSeries': None}\n", + ">> F - 福田 - VE-FUTDFIYMPK - {'Vehicle': '蒙派克-福田汽车', 'ProductID': 'VE-FUTDFIYMPK', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMPK.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '蒙派克', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMPK.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '205/70R15;195/70R15;195/R15C;205/55R16;195/70R15C', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 10, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FUTDFIYMPKS - {'Vehicle': '蒙派克S-福田汽车', 'ProductID': 'VE-FUTDFIYMPKS', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMPKS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '蒙派克S', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMPKS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '195/R15C', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 9, 'VehicleSeries': None}\n", + ">> F - 福田 - VE-FUTDFIYMFJ - {'Vehicle': '风景-福田汽车', 'ProductID': 'VE-FUTDFIYMFJ', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMFJ.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '风景', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMFJ.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '185/R14C;195/70R15;195/R15C;225/75R15;185/R14LT;205/70R14', 'SpecialTireSize': '185 R14 C', 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 8, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FUTDFIYMFJCL - {'Vehicle': '风景·冲浪-福田汽车', 'ProductID': 'VE-FUTDFIYMFJCL', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMFJCL.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '风景·冲浪', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMFJCL.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '235/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 7, 'VehicleSeries': None}\n", + ">> F - 福田 - VE-FUTDFIYMFJAL - {'Vehicle': '风景·爱尔法-福田汽车', 'ProductID': 'VE-FUTDFIYMFJAL', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FUTDFIYMFJAL.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '风景·爱尔法', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FUTDFIYMFJAL.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '195/70R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 6, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FUTDFIYMFJHS - {'Vehicle': '风景·海狮-福田汽车', 'ProductID': 'VE-FUTDFIYMFJHS', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMFJHS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '风景·海狮', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMFJHS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '205/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n", + ">> F - 福田 - VE-FUTDFIYMFJG7 - {'Vehicle': '风景G7-福田汽车', 'ProductID': 'VE-FUTDFIYMFJG7', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMFJG7.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '风景G7', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FUTDFIYMFJG7.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '195/70R15;195/R15C', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FUTDFIYMFJG8 - {'Vehicle': '风景G9-福田汽车', 'ProductID': 'VE-FUTDFIYMFJG8', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FUTDFIYMFJG8.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '风景G9', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FUTDFIYMFJG8.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '195/R15C', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n", + ">> F - 福田 - VE-FUTDFIYMFJV3 - {'Vehicle': '风景V3-福田汽车', 'ProductID': 'VE-FUTDFIYMFJV3', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FUTDFIYMFJV3.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '风景V3', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FUTDFIYMFJV3.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '165/70R13;175/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福田 - VE-FUTDFIYMFJV5 - {'Vehicle': '风景V5-福田汽车', 'ProductID': 'VE-FUTDFIYMFJV5', 'BrandType': '福田汽车', 'Brand': 'F - 福田', 'Url': '/Images/Logo/futian.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FUTDFIYMFJV5.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '风景V5', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FUTDFIYMFJV5.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTian.png', 'Tires': '175/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "F - 法拉利 done\n", + ">> F - 法拉利 - VE-FERR06AC - {'Vehicle': '360-法拉利汽车', 'ProductID': 'VE-FERR06AC', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FERR06AC.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '360', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FERR06AC.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '215/45R18;275/40R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 17, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 法拉利 - VE-FJLLF430 - {'Vehicle': 'F430-法拉利汽车', 'ProductID': 'VE-FJLLF430', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FJLLF430.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'F430', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FJLLF430.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '225/35R19;285/35R19;235/35R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 16, 'VehicleSeries': None}\n", + ">> F - 法拉利 - VE-FERR456M - {'Vehicle': '456M-法拉利汽车', 'ProductID': 'VE-FERR456M', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FERR456M.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '456M', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FERR456M.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '285/40R17;305/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 15, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 法拉利 - VE-458Italia - {'Vehicle': '458 Italia-法拉利汽车', 'ProductID': 'VE-458Italia', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-458Italia.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '458 Italia', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-458Italia.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '235/35R20;295/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 14, 'VehicleSeries': None}\n", + ">> F - 法拉利 - VE-458Special - {'Vehicle': '458 Speciale-法拉利汽车', 'ProductID': 'VE-458Special', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-458Special.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '458 Speciale', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-458Special.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '245/35R20;305/30R20;235/35R20;295/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 13, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 法拉利 - VE-FERR488GTB - {'Vehicle': '488-法拉利汽车', 'ProductID': 'VE-FERR488GTB', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FERR488GTB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '488', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FERR488GTB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '245/35R20;305/30R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 12, 'VehicleSeries': None}\n", + ">> F - 法拉利 - VE-FERR06AD - {'Vehicle': '575-法拉利汽车', 'ProductID': 'VE-FERR06AD', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FERR06AD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '575', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FERR06AD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '245/40R19;305/35R20;295/35R18;255/40R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 11, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 法拉利 - VE-FJLL599 - {'Vehicle': '599-法拉利汽车', 'ProductID': 'VE-FJLL599', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FJLL599.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '599', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FJLL599.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '245/40R19;305/35R19;305/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 10, 'VehicleSeries': None}\n", + ">> F - 法拉利 - VE-FJLL612 - {'Vehicle': '612-法拉利汽车', 'ProductID': 'VE-FJLL612', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FJLL612.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '612', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FJLL612.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '245/45R18;245/40R19;285/40R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 9, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 法拉利 - VE-California - {'Vehicle': 'California-法拉利汽车', 'ProductID': 'VE-California', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-California.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'California', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-California.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '245/40R19;285/40R19;245/35R20;285/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 8, 'VehicleSeries': None}\n", + ">> F - 法拉利 - VE-FERLFIOFFF - {'Vehicle': 'FF-法拉利汽车', 'ProductID': 'VE-FERLFIOFFF', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FERLFIOFFF.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'FF', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FERLFIOFFF.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '245/35R20;295/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 7, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 法拉利 - VE-FERLFIOFBL - {'Vehicle': 'F12 Berlinetta-法拉利汽车', 'ProductID': 'VE-FERLFIOFBL', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FERLFIOFBL.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'F12 Berlinetta', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FERLFIOFBL.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '255/35R20;315/35R20;275/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 6, 'VehicleSeries': None}\n", + ">> F - 法拉利 - VE-LaFerrari - {'Vehicle': 'LaFerrari-法拉利汽车', 'ProductID': 'VE-LaFerrari', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LaFerrari.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'LaFerrari', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LaFerrari.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '265/30R19;345/30R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 法拉利 - VE-GTC4Lusso - {'Vehicle': 'GTC4Lusso-法拉利汽车', 'ProductID': 'VE-GTC4Lusso', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GTC4Lusso.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'GTC4Lusso', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GTC4Lusso.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '245/35R20;295/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n", + ">> F - 法拉利 - VE-Portofino - {'Vehicle': 'Portofino-法拉利汽车', 'ProductID': 'VE-Portofino', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-Portofino.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Portofino', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-Portofino.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '245/35R20;285/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 法拉利 - VE-FER-812 - {'Vehicle': '812 Superfast-法拉利汽车', 'ProductID': 'VE-FER-812', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FER-812.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '812 Superfast', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FER-812.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '275/35R20;315/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n", + ">> F - 法拉利 - VE-FERRF8 - {'Vehicle': 'F8-法拉利汽车', 'ProductID': 'VE-FERRF8', 'BrandType': '法拉利汽车', 'Brand': 'F - 法拉利', 'Url': '/Images/Logo/falali.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FERRF8.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'F8', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FERRF8.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FaLaLi.png', 'Tires': '245/35R20;305/30R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "F - 福特 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-FRDC07AYCLS - {'Vehicle': '经典福克斯-长安福特', 'ProductID': 'VE-FRDC07AYCLS', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FRDC07AYCLS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '经典福克斯', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FRDC07AYCLS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '195/65R15;205/55R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 13, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-FRDC07AY - {'Vehicle': '新福克斯-长安福特', 'ProductID': 'VE-FRDC07AY', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FRDC07AY.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '新福克斯', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FRDC07AY.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '195/65R15;205/55R16;205/60R16;215/50R17;235/40R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 12, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-CHFORDFURS - {'Vehicle': '福睿斯-长安福特', 'ProductID': 'VE-CHFORDFURS', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-CHFORDFURS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '福睿斯', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-CHFORDFURS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '195/65R15;205/55R16;205/50R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 11, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-FRDC07AD - {'Vehicle': '嘉年华-长安福特', 'ProductID': 'VE-FRDC07AD', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FRDC07AD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '嘉年华', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FRDC07AD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '185/55R15;195/50R16;175/65R14;185/60R14;165/70R13', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 10, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-CAFORDYIHU - {'Vehicle': '翼虎-长安福特', 'ProductID': 'VE-CAFORDYIHU', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-CAFORDYIHU.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '翼虎', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-CAFORDYIHU.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '235/50R18;235/45R19;235/55R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 9, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-FORDYB - {'Vehicle': '翼搏-长安福特', 'ProductID': 'VE-FORDYB', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FORDYB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '翼搏', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FORDYB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '205/60R16;195/65R15;205/50R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 8, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-CHANFORDZSHENG - {'Vehicle': '致胜-长安福特', 'ProductID': 'VE-CHANFORDZSHENG', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-CHANFORDZSHENG.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '致胜', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-CHANFORDZSHENG.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '215/55R16;225/50R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 7, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-FRDC07AP - {'Vehicle': '蒙迪欧-长安福特', 'ProductID': 'VE-FRDC07AP', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FRDC07AP.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '蒙迪欧', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FRDC07AP.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '205/55R16;215/60R16;235/50R17;235/45R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 6, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-FRDenergi - {'Vehicle': '蒙迪欧Energi-长安福特 ', 'ProductID': 'VE-FRDenergi', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FRDenergi.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '蒙迪欧Energi', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FRDenergi.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '235/50R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 5, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-LDSZSZAJT - {'Vehicle': '蒙迪欧致胜-长安福特', 'ProductID': 'VE-LDSZSZAJT', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LDSZSZAJT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '蒙迪欧致胜', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LDSZSZAJT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '225/50R17;235/45R17;215/55R16;215/70R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-FRDC07BD - {'Vehicle': '麦柯斯S—MAX-长安福特', 'ProductID': 'VE-FRDC07BD', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FRDC07BD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '麦柯斯S—MAX', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FRDC07BD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '215/60R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 3, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-CHANFOREdge - {'Vehicle': '锐界-长安福特', 'ProductID': 'VE-CHANFOREdge', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-CHANFOREdge.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '锐界', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-CHANFOREdge.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '245/60R18;245/55R19;245/50R20;265/40R21', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-CHFORGJNZ - {'Vehicle': '金牛座-长安福特', 'ProductID': 'VE-CHFORGJNZ', 'BrandType': '长安福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-CHFORGJNZ.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '金牛座', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-CHFORGJNZ.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '235/55R17;235/50R18;245/45R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 1, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-EdgeSJJTJK - {'Vehicle': '锐界-福特进口', 'ProductID': 'VE-EdgeSJJTJK', 'BrandType': '福特进口', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-EdgeSJJTJK.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '锐界', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-EdgeSJJTJK.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '245/60R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 11, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-FORD05AB - {'Vehicle': '稳达-福特进口', 'ProductID': 'VE-FORD05AB', 'BrandType': '福特进口', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FORD05AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '稳达', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FORD05AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '215/70R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 10, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-FORD07AB - {'Vehicle': '翼虎-福特进口', 'ProductID': 'VE-FORD07AB', 'BrandType': '福特进口', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FORD07AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '翼虎', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FORD07AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '215/70R16;235/70R16;235/50R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 9, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-FURDFIRXEE - {'Vehicle': 'E350-福特进口', 'ProductID': 'VE-FURDFIRXEE', 'BrandType': '福特进口', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FURDFIRXEE.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'E350', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FURDFIRXEE.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '275/45R20;285/50R20;295/30R22', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 8, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-FURDFIRFFF - {'Vehicle': 'F—150-福特进口', 'ProductID': 'VE-FURDFIRFFF', 'BrandType': '福特进口', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FURDFIRFFF.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'F—150', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FURDFIRFFF.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '315/70R17;275/45R22;275/55R20;265/70R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 7, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-FURDFIRFCS - {'Vehicle': '福克斯ST-福特进口', 'ProductID': 'VE-FURDFIRFCS', 'BrandType': '福特进口', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FURDFIRFCS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '福克斯ST', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FURDFIRFCS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '235/40R18;235/35R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 6, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-FURDFIYMST - {'Vehicle': '嘉年华ST-福特进口', 'ProductID': 'VE-FURDFIYMST', 'BrandType': '福特进口', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FURDFIYMST.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '嘉年华ST', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FURDFIYMST.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '205/40R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 5, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-FURDFIYMGT - {'Vehicle': '野马-福特进口', 'ProductID': 'VE-FURDFIYMGT', 'BrandType': '福特进口', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FURDFIYMGT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '野马', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FURDFIYMGT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '255/40R19;275/40R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-FURDFIYTXZ - {'Vehicle': '探险者-福特进口', 'ProductID': 'VE-FURDFIYTXZ', 'BrandType': '福特进口', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FURDFIYTXZ.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '探险者', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FURDFIYTXZ.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '245/60R18;255/50R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 3, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-FORDEXPDIT - {'Vehicle': '征服者-福特进口', 'ProductID': 'VE-FORDEXPDIT', 'BrandType': '福特进口', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-FORDEXPDIT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '征服者', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-FORDEXPDIT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '255/70R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-FORD-RANGER - {'Vehicle': 'Ranger-福特进口', 'ProductID': 'VE-FORD-RANGER', 'BrandType': '福特进口', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FORD-RANGER.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Ranger', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FORD-RANGER.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '265/60R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 1, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-LJX-2017QUANSHUN - {'Vehicle': '全顺-江铃福特', 'ProductID': 'VE-LJX-2017QUANSHUN', 'BrandType': '江铃福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LJX-2017QUANSHUN.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '全顺', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LJX-2017QUANSHUN.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '215/65R16;215/65R16C;215/75R16LT;215/70R15;225/70R15', 'SpecialTireSize': '185R15LT', 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 6, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-JFORDQSHCLS - {'Vehicle': '经典全顺-江铃福特', 'ProductID': 'VE-JFORDQSHCLS', 'BrandType': '江铃福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JFORDQSHCLS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '经典全顺', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JFORDQSHCLS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '215/70R15C;225/70R15C;215/70R16;215/75R16C;225/70R15;185/R15LT;215/70R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-JFORDQSHNEW - {'Vehicle': '新世代全顺-江铃福特', 'ProductID': 'VE-JFORDQSHNEW', 'BrandType': '江铃福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JFORDQSHNEW.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '新世代全顺', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JFORDQSHNEW.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '185/75R16;215/70R15;215/75R16LT;215/70R16;205/75R16C;185/75R16C;215/70R15C;215/75R16C', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-JFORDTitanium - {'Vehicle': '撼路者-江铃福特', 'ProductID': 'VE-JFORDTitanium', 'BrandType': '江铃福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JFORDTitanium.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '撼路者', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JFORDTitanium.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '265/65R17;265/60R18;265/50R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n", + ">> F - 福特 - VE-JFORDTURUIOU - {'Vehicle': '途睿欧-江铃福特', 'ProductID': 'VE-JFORDTURUIOU', 'BrandType': '江铃福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JFORDTURUIOU.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '途睿欧', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JFORDTURUIOU.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '215/65R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> F - 福特 - VE-LJX-LINJIE - {'Vehicle': '领界-江铃福特', 'ProductID': 'VE-LJX-LINJIE', 'BrandType': '江铃福特', 'Brand': 'F - 福特', 'Url': '/Images/Logo/fute.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LJX-LINJIE.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '领界', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LJX-LINJIE.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/FuTe.png', 'Tires': '215/65R16;235/55R17;235/50R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "G - 观致 done\n", + ">> G - 观致 - VE-GZHIGZHI3SUV - {'Vehicle': '都市SUV-观致汽车', 'ProductID': 'VE-GZHIGZHI3SUV', 'BrandType': '观致汽车', 'Brand': 'G - 观致', 'Url': '/Images/Logo/guanzhi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GZHIGZHI3SUV.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '都市SUV', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GZHIGZHI3SUV.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuanZhi.png', 'Tires': '215/60R17;215/55R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> G - 观致 - VE-GZHIGZHI5SUV - {'Vehicle': '观致5-观致汽车', 'ProductID': 'VE-GZHIGZHI5SUV', 'BrandType': '观致汽车', 'Brand': 'G - 观致', 'Url': '/Images/Logo/guanzhi.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-GZHIGZHI5SUV.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '观致5', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-GZHIGZHI5SUV.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuanZhi.png', 'Tires': '225/65R17;235/55R18;235/50R19;215/60R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n", + ">> G - 观致 - VE-LLN-3SANXIANG - {'Vehicle': '观致3 三厢-观致汽车', 'ProductID': 'VE-LLN-3SANXIANG', 'BrandType': '观致汽车', 'Brand': 'G - 观致', 'Url': '/Images/Logo/guanzhi.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LLN-3SANXIANG.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '观致3 三厢', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LLN-3SANXIANG.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuanZhi.png', 'Tires': '205/60R16;215/50R17;225/45R18;225/60R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> G - 观致 - VE-LLN-3LIANGXIANG - {'Vehicle': '观致3 两厢-观致汽车', 'ProductID': 'VE-LLN-3LIANGXIANG', 'BrandType': '观致汽车', 'Brand': 'G - 观致', 'Url': '/Images/Logo/guanzhi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LLN-3LIANGXIANG.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '观致3 两厢', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LLN-3LIANGXIANG.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuanZhi.png', 'Tires': '205/60R16;215/50R17;225/45R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n", + ">> G - 观致 - VE-LLN-3GT - {'Vehicle': '观致3 GT-观致汽车', 'ProductID': 'VE-LLN-3GT', 'BrandType': '观致汽车', 'Brand': 'G - 观致', 'Url': '/Images/Logo/guanzhi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LLN-3GT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '观致3 GT', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LLN-3GT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuanZhi.png', 'Tires': '215/55R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "G - GMC done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> G - GMC - VE-GMCSAVANA - {'Vehicle': '赛威-通用汽车', 'ProductID': 'VE-GMCSAVANA', 'BrandType': '通用汽车', 'Brand': 'G - GMC', 'Url': '/Images/Logo/gmc.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-GMCSAVANA.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '赛威', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-GMCSAVANA.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GMC.png', 'Tires': '265/50R20;275/45R20;295/45R20;265/60R18;245/75R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n", + ">> G - GMC - VE-GMCSIERRA - {'Vehicle': '西拉-通用汽车', 'ProductID': 'VE-GMCSIERRA', 'BrandType': '通用汽车', 'Brand': 'G - GMC', 'Url': '/Images/Logo/gmc.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-GMCSIERRA.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '西拉', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-GMCSIERRA.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GMC.png', 'Tires': '245/75R16;265/60R20;275/55R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> G - GMC - VE-GMCYUKON - {'Vehicle': 'YUKON-通用汽车', 'ProductID': 'VE-GMCYUKON', 'BrandType': '通用汽车', 'Brand': 'G - GMC', 'Url': '/Images/Logo/gmc.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GMCYUKON.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'YUKON', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GMCYUKON.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GMC.png', 'Tires': '275/60R18;275/60R20;245/75R16;285/45R22', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "G - 光冈 done\n", + ">> G - 光冈 - VE-GGANGGC - {'Vehicle': '嘉路-光冈汽车', 'ProductID': 'VE-GGANGGC', 'BrandType': '光冈汽车', 'Brand': 'G - 光冈', 'Url': '/Images/Logo/guanggang.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GGANGGC.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '嘉路', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GGANGGC.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuangGang.png', 'Tires': '235/50R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> G - 光冈 - VE-GGANGORO - {'Vehicle': '大蛇-光冈汽车', 'ProductID': 'VE-GGANGORO', 'BrandType': '光冈汽车', 'Brand': 'G - 光冈', 'Url': '/Images/Logo/guanggang.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GGANGORO.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '大蛇', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GGANGORO.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuangGang.png', 'Tires': '245/45R18;285/40R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "G - 国金 done\n", + ">> G - 国金 - VE-LKJ-GM3 - {'Vehicle': '国金GM3-陕汽通家', 'ProductID': 'VE-LKJ-GM3', 'BrandType': '陕汽通家', 'Brand': 'G - 国金', 'Url': '/Images/Logo/guojin.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LKJ-GM3.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '国金GM3', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LKJ-GM3.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuoJin.png', 'Tires': '215/60R16;215/55R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "G - 广汽新能源 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> G - 广汽新能源 - VE-LDNPHEV - {'Vehicle': '祺智-广汽三菱', 'ProductID': 'VE-LDNPHEV', 'BrandType': '广汽三菱', 'Brand': 'G - 广汽新能源', 'Url': '/Images/Logo/guangqixinnengyuan.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LDNPHEV.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '祺智', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LDNPHEV.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuangQiXinNengYuan.png', 'Tires': '215/55R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 4, 'Priority3': 1, 'VehicleSeries': None}\n", + ">> G - 广汽新能源 - VE-LVG-ix4 - {'Vehicle': '广汽ix4-广汽丰田', 'ProductID': 'VE-LVG-ix4', 'BrandType': '广汽丰田', 'Brand': 'G - 广汽新能源', 'Url': '/Images/Logo/guangqixinnengyuan.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LVG-ix4.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '广汽ix4', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LVG-ix4.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuangQiXinNengYuan.png', 'Tires': '215/60R17;215/55R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 1, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> G - 广汽新能源 - VE-LMG-EG3 - {'Vehicle': '传祺GE3-广汽乘用车', 'ProductID': 'VE-LMG-EG3', 'BrandType': '广汽乘用车', 'Brand': 'G - 广汽新能源', 'Url': '/Images/Logo/guangqixinnengyuan.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LMG-EG3.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '传祺GE3', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LMG-EG3.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuangQiXinNengYuan.png', 'Tires': '215/55R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 2, 'VehicleSeries': None}\n", + ">> G - 广汽新能源 - VE-LMG-AIONS - {'Vehicle': 'AION S-广汽乘用车', 'ProductID': 'VE-LMG-AIONS', 'BrandType': '广汽乘用车', 'Brand': 'G - 广汽新能源', 'Url': '/Images/Logo/guangqixinnengyuan.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LMG-AIONS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'AION S', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LMG-AIONS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuangQiXinNengYuan.png', 'Tires': '215/55R17;235/45R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 1, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> G - 广汽新能源 - VE-LHG-SR - {'Vehicle': '世锐-广汽本田', 'ProductID': 'VE-LHG-SR', 'BrandType': '广汽本田', 'Brand': 'G - 广汽新能源', 'Url': '/Images/Logo/guangqixinnengyuan.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LHG-SR.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '世锐', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LHG-SR.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/GuangQiXinNengYuan.png', 'Tires': '215/55R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "H - 哈飞 done\n", + ">> H - 哈飞 - VE-HAFE07BC - {'Vehicle': '路宝-哈飞汽车', 'ProductID': 'VE-HAFE07BC', 'BrandType': '哈飞汽车', 'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HAFE07BC.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '路宝', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HAFE07BC.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaFei.png', 'Tires': '165/65R13;155/65R13;165/70R13;165/65R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 11, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 哈飞 - VE-HJJLZXBW - {'Vehicle': '路尊小霸王-哈飞汽车', 'ProductID': 'VE-HJJLZXBW', 'BrandType': '哈飞汽车', 'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-HJJLZXBW.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '路尊小霸王', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-HJJLZXBW.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaFei.png', 'Tires': '175/65R14;165/70R13', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 10, 'VehicleSeries': None}\n", + ">> H - 哈飞 - VE-HJJLZDBW - {'Vehicle': '路尊大霸王-哈飞汽车', 'ProductID': 'VE-HJJLZDBW', 'BrandType': '哈飞汽车', 'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-HJJLZDBW.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '路尊大霸王', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-HJJLZDBW.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaFei.png', 'Tires': '195/65R15;185/80R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 9, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 哈飞 - VE-HAFE99AA - {'Vehicle': '百利-哈飞汽车', 'ProductID': 'VE-HAFE99AA', 'BrandType': '哈飞汽车', 'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HAFE99AA.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '百利', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HAFE99AA.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaFei.png', 'Tires': '155/R12C;135/R12', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 8, 'VehicleSeries': None}\n", + ">> H - 哈飞 - VE-HAFE06BJ - {'Vehicle': '中意-哈飞汽车', 'ProductID': 'VE-HAFE06BJ', 'BrandType': '哈飞汽车', 'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HAFE06BJ.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '中意', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HAFE06BJ.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaFei.png', 'Tires': '165/70R13', 'SpecialTireSize': '165R13LT', 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 7, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 哈飞 - VE-HAFE07BD - {'Vehicle': '民意-哈飞汽车', 'ProductID': 'VE-HAFE07BD', 'BrandType': '哈飞汽车', 'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-HAFE07BD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '民意', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-HAFE07BD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaFei.png', 'Tires': '165/70R13', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 6, 'VehicleSeries': None}\n", + ">> H - 哈飞 - VE-HAFE07AS - {'Vehicle': '赛豹-哈飞汽车', 'ProductID': 'VE-HAFE07AS', 'BrandType': '哈飞汽车', 'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HAFE07AS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '赛豹', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HAFE07AS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaFei.png', 'Tires': '195/55R15;185/65R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 哈飞 - VE-HAFE06BJV5 - {'Vehicle': '中意V5-哈飞汽车', 'ProductID': 'VE-HAFE06BJV5', 'BrandType': '哈飞汽车', 'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-HAFE06BJV5.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '中意V5', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-HAFE06BJV5.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaFei.png', 'Tires': '165/R13LT', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n", + ">> H - 哈飞 - VE-HAFE07AK - {'Vehicle': '赛马-哈飞汽车', 'ProductID': 'VE-HAFE07AK', 'BrandType': '哈飞汽车', 'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-HAFE07AK.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '赛马', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-HAFE07AK.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaFei.png', 'Tires': '185/65R14;195/55R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 哈飞 - VE-HAFEJUNYI - {'Vehicle': '骏意-哈飞汽车', 'ProductID': 'VE-HAFEJUNYI', 'BrandType': '哈飞汽车', 'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-HAFEJUNYI.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '骏意', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-HAFEJUNYI.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaFei.png', 'Tires': '165/R13LT', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n", + ">> H - 哈飞 - VE-HAFESHJIANG - {'Vehicle': '松花江-哈飞汽车', 'ProductID': 'VE-HAFESHJIANG', 'BrandType': '哈飞汽车', 'Brand': 'H - 哈飞', 'Url': '/Images/Logo/hafei.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HAFESHJIANG.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '松花江', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HAFESHJIANG.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaFei.png', 'Tires': '165/70R13;155/R12C', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "H - 华普 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "H - 华泰 done\n", + ">> H - 华泰 - VE-LRH-SDFDY - {'Vehicle': '圣达菲2-华泰汽车', 'ProductID': 'VE-LRH-SDFDY', 'BrandType': '华泰汽车', 'Brand': 'H - 华泰', 'Url': '/Images/Logo/huatai.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LRH-SDFDY.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '圣达菲2', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LRH-SDFDY.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HuaTai.png', 'Tires': '185/65R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "H - 黄海 done\n", + ">> H - 黄海 - VE-SHUG06AD - {'Vehicle': '傲龙-曙光汽车', 'ProductID': 'VE-SHUG06AD', 'BrandType': '曙光汽车', 'Brand': 'H - 黄海', 'Url': '/Images/Logo/huanghai.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-SHUG06AD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '傲龙', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-SHUG06AD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HuangHai.png', 'Tires': '235/65R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 10, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 黄海 - VE-HUANGHAIAOJUN - {'Vehicle': '傲骏-曙光汽车', 'ProductID': 'VE-HUANGHAIAOJUN', 'BrandType': '曙光汽车', 'Brand': 'H - 黄海', 'Url': '/Images/Logo/huanghai.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HUANGHAIAOJUN.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '傲骏', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HUANGHAIAOJUN.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HuangHai.png', 'Tires': '215/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n", + ">> H - 黄海 - VE-SHUG07AK - {'Vehicle': '傲羚-曙光汽车', 'ProductID': 'VE-SHUG07AK', 'BrandType': '曙光汽车', 'Brand': 'H - 黄海', 'Url': '/Images/Logo/huanghai.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-SHUG07AK.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '傲羚', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-SHUG07AK.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HuangHai.png', 'Tires': '215/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 62, in \n", + " for b in load_child_brands(vid, pailiang, nian):\n", + " File \"\", line 38, in load_child_brands\n", + " return json.loads(index_regex.findall(requests.get(url).text)[0])['SalesName']\n", + "IndexError: list index out of range\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 黄海 - VE-HUANGHAIXCS - {'Vehicle': '小柴神-曙光汽车', 'ProductID': 'VE-HUANGHAIXCS', 'BrandType': '曙光汽车', 'Brand': 'H - 黄海', 'Url': '/Images/Logo/huanghai.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HUANGHAIXCS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '小柴神', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HUANGHAIXCS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HuangHai.png', 'Tires': '215/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n", + ">> H - 黄海 - VE-SHUG07AM - {'Vehicle': '大柴神-曙光汽车', 'ProductID': 'VE-SHUG07AM', 'BrandType': '曙光汽车', 'Brand': 'H - 黄海', 'Url': '/Images/Logo/huanghai.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-SHUG07AM.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '大柴神', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-SHUG07AM.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HuangHai.png', 'Tires': '235/65R17;215/75R15;225/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 黄海 - VE-LDD-RUNTU - {'Vehicle': '瑞途-曙光汽车', 'ProductID': 'VE-LDD-RUNTU', 'BrandType': '曙光汽车', 'Brand': 'H - 黄海', 'Url': '/Images/Logo/huanghai.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LDD-RUNTU.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '瑞途', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LDD-RUNTU.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HuangHai.png', 'Tires': '245/75R16;195/65R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "H - 红旗 done\n", + ">> H - 红旗 - VE-HONGQL5 - {'Vehicle': 'L5-一汽轿车', 'ProductID': 'VE-HONGQL5', 'BrandType': '一汽轿车', 'Brand': 'H - 红旗', 'Url': '/Images/Logo/hongqi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HONGQL5.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'L5', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HONGQL5.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HongQi.png', 'Tires': '275/40R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 11, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 红旗 - VE-HONG07AH - {'Vehicle': 'HQ3-一汽轿车', 'ProductID': 'VE-HONG07AH', 'BrandType': '一汽轿车', 'Brand': 'H - 红旗', 'Url': '/Images/Logo/hongqi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HONG07AH.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'HQ3', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HONG07AH.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HongQi.png', 'Tires': '225/60R16;215/55R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 10, 'VehicleSeries': None}\n", + ">> H - 红旗 - VE-HONG0H5 - {'Vehicle': 'H5-一汽轿车', 'ProductID': 'VE-HONG0H5', 'BrandType': '一汽轿车', 'Brand': 'H - 红旗', 'Url': '/Images/Logo/hongqi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HONG0H5.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'H5', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HONG0H5.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HongQi.png', 'Tires': '215/55R17;225/45R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 9, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 红旗 - VE-HONG0H7 - {'Vehicle': 'H7-一汽轿车', 'ProductID': 'VE-HONG0H7', 'BrandType': '一汽轿车', 'Brand': 'H - 红旗', 'Url': '/Images/Logo/hongqi.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-HONG0H7.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'H7', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-HONG0H7.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HongQi.png', 'Tires': '225/55R17;235/45R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 8, 'VehicleSeries': None}\n", + ">> H - 红旗 - VE-HONG99AT - {'Vehicle': '红旗-一汽轿车', 'ProductID': 'VE-HONG99AT', 'BrandType': '一汽轿车', 'Brand': 'H - 红旗', 'Url': '/Images/Logo/hongqi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HONG99AT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '红旗', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HONG99AT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HongQi.png', 'Tires': '205/60R15;185/80R14;185/R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 7, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 红旗 - VE-HONG07AG - {'Vehicle': '明仕-一汽轿车', 'ProductID': 'VE-HONG07AG', 'BrandType': '一汽轿车', 'Brand': 'H - 红旗', 'Url': '/Images/Logo/hongqi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HONG07AG.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '明仕', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HONG07AG.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HongQi.png', 'Tires': '205/60R15;185/80R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 6, 'VehicleSeries': None}\n", + ">> H - 红旗 - VE-HONG99AB - {'Vehicle': '旗舰-一汽轿车', 'ProductID': 'VE-HONG99AB', 'BrandType': '一汽轿车', 'Brand': 'H - 红旗', 'Url': '/Images/Logo/hongqi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HONG99AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '旗舰', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HONG99AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HongQi.png', 'Tires': '225/60R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 红旗 - VE-HONG07AJ - {'Vehicle': '世纪星-一汽轿车', 'ProductID': 'VE-HONG07AJ', 'BrandType': '一汽轿车', 'Brand': 'H - 红旗', 'Url': '/Images/Logo/hongqi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HONG07AJ.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '世纪星', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HONG07AJ.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HongQi.png', 'Tires': '205/60R15;185/80R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n", + ">> H - 红旗 - VE-HONGQSSHI - {'Vehicle': '盛世-一汽轿车', 'ProductID': 'VE-HONGQSSHI', 'BrandType': '一汽轿车', 'Brand': 'H - 红旗', 'Url': '/Images/Logo/hongqi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HONGQSSHI.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '盛世', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HONGQSSHI.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HongQi.png', 'Tires': '215/55R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 红旗 - VE-HONG07AJZYZ - {'Vehicle': '卓越者-一汽轿车', 'ProductID': 'VE-HONG07AJZYZ', 'BrandType': '一汽轿车', 'Brand': 'H - 红旗', 'Url': '/Images/Logo/hongqi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HONG07AJZYZ.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '卓越者', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HONG07AJZYZ.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HongQi.png', 'Tires': '205/60R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/models.py\", line 897, in json\n", + " return complexjson.loads(self.text, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/__init__.py\", line 518, in loads\n", + " return _default_decoder.decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 370, in decode\n", + " obj, end = self.raw_decode(s)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/simplejson/decoder.py\", line 400, in raw_decode\n", + " return self.scan_once(s, idx=_w(s, idx).end())\n", + "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "H - 汇众 done\n", + "H - 海格 done\n", + ">> H - 海格 - VE-HAIGEH4E - {'Vehicle': 'H4E-苏州金龙', 'ProductID': 'VE-HAIGEH4E', 'BrandType': '苏州金龙', 'Brand': 'H - 海格', 'Url': '/Images/Logo/haige.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HAIGEH4E.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'H4E', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HAIGEH4E.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaiGe.png', 'Tires': None, 'SpecialTireSize': '175R14LT', 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 9, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> H - 海格 - VE-HAIGEH7V - {'Vehicle': 'H7V-苏州金龙', 'ProductID': 'VE-HAIGEH7V', 'BrandType': '苏州金龙', 'Brand': 'H - 海格', 'Url': '/Images/Logo/haige.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-HAIGEH7V.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'H7V', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-HAIGEH7V.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/HaiGe.png', 'Tires': None, 'SpecialTireSize': '6.50R16', 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "H - 黑豹 done\n", + "H - 恒天 done\n", + "H - 华北 done\n", + "H - 幻速 done\n", + "H - 华颂 done\n", + "H - 汉腾汽车 done\n", + "H - 华骐 done\n", + "H - 红星汽车 done\n", + "H - 海马 done\n", + "H - 哈弗 done\n", + "J - 吉奥 done\n", + ">> J - 吉奥 - VE-GONO07AR - {'Vehicle': 'GS50-广汽吉奥', 'ProductID': 'VE-GONO07AR', 'BrandType': '广汽吉奥', 'Brand': 'J - 吉奥', 'Url': '/Images/Logo/jiao.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-GONO07AR.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'GS50', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-GONO07AR.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JiAo.png', 'Tires': '215/75R15;235/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 22, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> J - 吉奥 - VE-GONO05AJ - {'Vehicle': '帅驰-广汽吉奥', 'ProductID': 'VE-GONO05AJ', 'BrandType': '广汽吉奥', 'Brand': 'J - 吉奥', 'Url': '/Images/Logo/jiao.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GONO05AJ.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '帅驰', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GONO05AJ.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JiAo.png', 'Tires': '215/75R15;235/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 17, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> J - 吉奥 - VE-GONO07AC - {'Vehicle': '伊美-广汽吉奥', 'ProductID': 'VE-GONO07AC', 'BrandType': '广汽吉奥', 'Brand': 'J - 吉奥', 'Url': '/Images/Logo/jiao.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GONO07AC.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '伊美', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GONO07AC.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JiAo.png', 'Tires': '165/70R14;195/65R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 14, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> J - 吉奥 - VE-GQJAXWL - {'Vehicle': '星旺L-广汽吉奥', 'ProductID': 'VE-GQJAXWL', 'BrandType': '广汽吉奥', 'Brand': 'J - 吉奥', 'Url': '/Images/Logo/jiao.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GQJAXWL.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '星旺L', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GQJAXWL.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JiAo.png', 'Tires': '165/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> J - 吉奥 - VE-GQJAXWM1 - {'Vehicle': '星旺M1-广汽吉奥', 'ProductID': 'VE-GQJAXWM1', 'BrandType': '广汽吉奥', 'Brand': 'J - 吉奥', 'Url': '/Images/Logo/jiao.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GQJAXWM1.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '星旺M1', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GQJAXWM1.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JiAo.png', 'Tires': '165/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> J - 吉奥 - VE-GQJAXWM2 - {'Vehicle': '星旺M2-广汽吉奥', 'ProductID': 'VE-GQJAXWM2', 'BrandType': '广汽吉奥', 'Brand': 'J - 吉奥', 'Url': '/Images/Logo/jiao.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-GQJAXWM2.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '星旺M2', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-GQJAXWM2.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JiAo.png', 'Tires': '165/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "J - 吉普 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> J - 吉普 - VE-JEEPLiberty - {'Vehicle': '自由人-吉普进口', 'ProductID': 'VE-JEEPLiberty', 'BrandType': '吉普进口', 'Brand': 'J - 吉普', 'Url': '/Images/Logo/jipu.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JEEPLiberty.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '自由人', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JEEPLiberty.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JiPu.png', 'Tires': '235/70R16;235/65R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "J - 江南 done\n", + ">> J - 江南 - VE-JNQC07AD - {'Vehicle': '传奇-江南汽车', 'ProductID': 'VE-JNQC07AD', 'BrandType': '江南汽车', 'Brand': 'J - 江南', 'Url': '/Images/Logo/jiangnan.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JNQC07AD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '传奇', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JNQC07AD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JiangNan.png', 'Tires': '165/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/connectionpool.py\", line 603, in urlopen\n", + " chunked=chunked)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/connectionpool.py\", line 344, in _make_request\n", + " self._validate_conn(conn)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/connectionpool.py\", line 843, in _validate_conn\n", + " conn.connect()\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/connection.py\", line 370, in connect\n", + " ssl_context=context)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/util/ssl_.py\", line 355, in ssl_wrap_socket\n", + " return context.wrap_socket(sock, server_hostname=server_hostname)\n", + " File \"/Users/laisky/.pyenv/versions/3.7.4/lib/python3.7/ssl.py\", line 423, in wrap_socket\n", + " session=session\n", + " File \"/Users/laisky/.pyenv/versions/3.7.4/lib/python3.7/ssl.py\", line 870, in _create\n", + " self.do_handshake()\n", + " File \"/Users/laisky/.pyenv/versions/3.7.4/lib/python3.7/ssl.py\", line 1139, in do_handshake\n", + " self._sslobj.do_handshake()\n", + "TimeoutError: [Errno 60] Operation timed out\n", + "\n", + "During handling of the above exception, another exception occurred:\n", + "\n", + "Traceback (most recent call last):\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/adapters.py\", line 449, in send\n", + " timeout=timeout\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/connectionpool.py\", line 641, in urlopen\n", + " _stacktrace=sys.exc_info()[2])\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/util/retry.py\", line 368, in increment\n", + " raise six.reraise(type(error), error, _stacktrace)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/packages/six.py\", line 685, in reraise\n", + " raise value.with_traceback(tb)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/connectionpool.py\", line 603, in urlopen\n", + " chunked=chunked)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/connectionpool.py\", line 344, in _make_request\n", + " self._validate_conn(conn)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/connectionpool.py\", line 843, in _validate_conn\n", + " conn.connect()\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/connection.py\", line 370, in connect\n", + " ssl_context=context)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/urllib3/util/ssl_.py\", line 355, in ssl_wrap_socket\n", + " return context.wrap_socket(sock, server_hostname=server_hostname)\n", + " File \"/Users/laisky/.pyenv/versions/3.7.4/lib/python3.7/ssl.py\", line 423, in wrap_socket\n", + " session=session\n", + " File \"/Users/laisky/.pyenv/versions/3.7.4/lib/python3.7/ssl.py\", line 870, in _create\n", + " self.do_handshake()\n", + " File \"/Users/laisky/.pyenv/versions/3.7.4/lib/python3.7/ssl.py\", line 1139, in do_handshake\n", + " self._sslobj.do_handshake()\n", + "urllib3.exceptions.ProtocolError: ('Connection aborted.', TimeoutError(60, 'Operation timed out'))\n", + "\n", + "During handling of the above exception, another exception occurred:\n", + "\n", + "Traceback (most recent call last):\n", + " File \"\", line 62, in \n", + " for b in load_child_brands(vid, pailiang, nian):\n", + " File \"\", line 38, in load_child_brands\n", + " return json.loads(index_regex.findall(requests.get(url).text)[0])['SalesName']\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/api.py\", line 75, in get\n", + " return request('get', url, params=params, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/api.py\", line 60, in request\n", + " return session.request(method=method, url=url, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/sessions.py\", line 533, in request\n", + " resp = self.send(prep, **send_kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/sessions.py\", line 646, in send\n", + " r = adapter.send(request, **kwargs)\n", + " File \"/Users/laisky/.virtualenvs/37/lib/python3.7/site-packages/requests/adapters.py\", line 498, in send\n", + " raise ConnectionError(err, request=request)\n", + "requests.exceptions.ConnectionError: ('Connection aborted.', TimeoutError(60, 'Operation timed out'))\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "J - 江苏南亚 done\n", + ">> J - 江苏南亚 - VE-NANY04AD - {'Vehicle': '英格尔-江苏南亚', 'ProductID': 'VE-NANY04AD', 'BrandType': '江苏南亚', 'Brand': 'J - 江苏南亚', 'Url': '/Images/Logo/jiangsunanya.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-NANY04AD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '英格尔', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-NANY04AD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JiangSuNanYa.png', 'Tires': '175/70R13', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "J - 捷豹 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "J - 金程 done\n", + ">> J - 金程 - VE-JINC05AF - {'Vehicle': '海狮-金程汽车', 'ProductID': 'VE-JINC05AF', 'BrandType': '金程汽车', 'Brand': 'J - 金程', 'Url': '/Images/Logo/jincheng.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JINC05AF.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '海狮', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JINC05AF.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JinCheng.png', 'Tires': '185/R14C', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "J - 江铃 done\n", + "J - 九龙 done\n", + ">> J - 九龙 - VE-JLONGTIANMA - {'Vehicle': '九龙天马-九龙汽车', 'ProductID': 'VE-JLONGTIANMA', 'BrandType': '九龙汽车', 'Brand': 'J - 九龙', 'Url': '/Images/Logo/jiulong.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JLONGTIANMA.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '九龙天马', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JLONGTIANMA.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JiuLong.png', 'Tires': '195/75R16;195/70R15;215/70R16;205/75R16C', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "J - 解放 done\n", + "J - 金旅 done\n", + "J - 君马 done\n", + "J - 吉利 done\n", + "J - 几何汽车 done\n", + "J - 江淮 done\n", + "J - 金杯 done\n", + ">> J - 金杯 - VE-JINB07BR - {'Vehicle': '勤务兵-华晨金杯', 'ProductID': 'VE-JINB07BR', 'BrandType': '华晨金杯', 'Brand': 'J - 金杯', 'Url': '/Images/Logo/jinbei.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JINB07BR.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '勤务兵', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JINB07BR.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/JinBei.png', 'Tires': '185/R14C', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 11, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "J - 江铃新能源 done\n", + "J - 捷途 done\n", + "K - 开瑞 done\n", + "K - 凯迪拉克 done\n", + ">> K - 凯迪拉克 - VE-CADI04AB - {'Vehicle': '赛威-凯迪拉克进口', 'ProductID': 'VE-CADI04AB', 'BrandType': '凯迪拉克进口', 'Brand': 'K - 凯迪拉克', 'Url': '/Images/Logo/kaidilake.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-CADI04AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '赛威', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-CADI04AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/KaiDiLaKe.png', 'Tires': '235/50R18;255/45R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "K - 克莱斯勒 done\n", + ">> K - 克莱斯勒 - VE-CHRYSCFIRE - {'Vehicle': '交叉火力-克莱斯勒进口', 'ProductID': 'VE-CHRYSCFIRE', 'BrandType': '克莱斯勒进口', 'Brand': 'K - 克莱斯勒', 'Url': '/Images/Logo/kelaisile.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-CHRYSCFIRE.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '交叉火力', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-CHRYSCFIRE.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/KeLaiSiLe.png', 'Tires': '255/40R18;235/35R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> K - 克莱斯勒 - VE-CHRYSSEB - {'Vehicle': '赛百灵-克莱斯勒进口', 'ProductID': 'VE-CHRYSSEB', 'BrandType': '克莱斯勒进口', 'Brand': 'K - 克莱斯勒', 'Url': '/Images/Logo/kelaisile.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-CHRYSSEB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '赛百灵', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-CHRYSSEB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/KeLaiSiLe.png', 'Tires': '205/65R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "K - 卡尔森 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "K - 科尼赛克 done\n", + ">> K - 科尼赛克 - VE-KEONAgera - {'Vehicle': 'Agera-科尼塞克', 'ProductID': 'VE-KEONAgera', 'BrandType': '科尼塞克', 'Brand': 'K - 科尼赛克', 'Url': '/Images/Logo/kenisaike.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-KEONAgera.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Agera', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-KEONAgera.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/KeNiSaiKe.png', 'Tires': '265/35R19;345/30R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> K - 科尼赛克 - VE-KEONCCXR - {'Vehicle': 'CCXR-科尼塞克', 'ProductID': 'VE-KEONCCXR', 'BrandType': '科尼塞克', 'Brand': 'K - 科尼赛克', 'Url': '/Images/Logo/kenisaike.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-KEONCCXR.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'CCXR', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-KEONCCXR.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/KeNiSaiKe.png', 'Tires': '255/35R19;335/30R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "K - 凯翼 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "K - 卡威 done\n", + "L - 铃木 done\n", + "L - 路虎 done\n", + "L - 猎豹 done\n", + ">> L - 猎豹 - VE-CZJJLSK - {'Vehicle': '飞铃皮卡-长丰扬子', 'ProductID': 'VE-CZJJLSK', 'BrandType': '长丰扬子', 'Brand': 'L - 猎豹', 'Url': '/Images/Logo/liebao.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-CZJJLSK.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '飞铃皮卡', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-CZJJLSK.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LieBao.png', 'Tires': '215/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 5, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 猎豹 - VE-CZJJYSK - {'Vehicle': '飞扬皮卡-长丰扬子', 'ProductID': 'VE-CZJJYSK', 'BrandType': '长丰扬子', 'Brand': 'L - 猎豹', 'Url': '/Images/Logo/liebao.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-CZJJYSK.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '飞扬皮卡', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-CZJJYSK.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LieBao.png', 'Tires': 'P215/75R15;235/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 猎豹 - VE-LIEBAOFYSUV - {'Vehicle': '飞扬SUV-长丰扬子', 'ProductID': 'VE-LIEBAOFYSUV', 'BrandType': '长丰扬子', 'Brand': 'L - 猎豹', 'Url': '/Images/Logo/liebao.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LIEBAOFYSUV.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '飞扬SUV', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LIEBAOFYSUV.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LieBao.png', 'Tires': '215/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "L - 兰博基尼 done\n", + "L - 雷诺 done\n", + ">> L - 雷诺 - VE-RENTrafic - {'Vehicle': 'Trafic(塔菲克)-三江雷诺', 'ProductID': 'VE-RENTrafic', 'BrandType': '三江雷诺', 'Brand': 'L - 雷诺', 'Url': '/Images/Logo/leinuo.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-RENTrafic.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Trafic(塔菲克)', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-RENTrafic.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LeiNuo.png', 'Tires': '205/70R15;235/35R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 1, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 雷诺 - VE-VF1-VelSatis - {'Vehicle': 'Vel Satis(威赛帝)-雷诺进口', 'ProductID': 'VE-VF1-VelSatis', 'BrandType': '雷诺进口', 'Brand': 'L - 雷诺', 'Url': '/Images/Logo/leinuo.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-VF1-VelSatis.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Vel Satis(威赛帝)', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-VF1-VelSatis.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LeiNuo.png', 'Tires': '225/55R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "L - 路特斯 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 路特斯 - VE-LLJJSLJJK - {'Vehicle': 'Esprit -宝腾汽车', 'ProductID': 'VE-LLJJSLJJK', 'BrandType': '宝腾汽车', 'Brand': 'L - 路特斯', 'Url': '/Images/Logo/lutesi.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-LLJJSLJJK.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Esprit ', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-LLJJSLJJK.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LuTeSi.png', 'Tires': '195/60R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 路特斯 - VE-LLJJYLJJK - {'Vehicle': 'Elite-宝腾汽车', 'ProductID': 'VE-LLJJYLJJK', 'BrandType': '宝腾汽车', 'Brand': 'L - 路特斯', 'Url': '/Images/Logo/lutesi.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-LLJJYLJJK.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Elite', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-LLJJYLJJK.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LuTeSi.png', 'Tires': '195/60R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n", + "L - 莲花 done\n", + "L - 陆风 done\n", + "L - 罗孚 done\n", + ">> L - 罗孚 - VE-MG06AC - {'Vehicle': 'Rover75-罗孚进口', 'ProductID': 'VE-MG06AC', 'BrandType': '罗孚进口', 'Brand': 'L - 罗孚', 'Url': '/Images/Logo/luozuo.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-MG06AC.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Rover75', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-MG06AC.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LuoZuo.png', 'Tires': '215/55R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 罗孚 - VE-MG06AA - {'Vehicle': 'TF-罗孚进口', 'ProductID': 'VE-MG06AA', 'BrandType': '罗孚进口', 'Brand': 'L - 罗孚', 'Url': '/Images/Logo/luozuo.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-MG06AA.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'TF', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-MG06AA.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LuoZuo.png', 'Tires': '195/45R16;215/40R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "L - 劳伦士 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 劳伦士 - VE-LORINCLSclass - {'Vehicle': 'CLS级-劳伦士', 'ProductID': 'VE-LORINCLSclass', 'BrandType': '劳伦士', 'Brand': 'L - 劳伦士', 'Url': '/Images/Logo/laolunshi.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-LORINCLSclass.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'CLS级', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-LORINCLSclass.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LaoLunShi.png', 'Tires': '245/40R18;275/35R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 劳伦士 - VE-LORINMLclass - {'Vehicle': 'ML级-劳伦士', 'ProductID': 'VE-LORINMLclass', 'BrandType': '劳伦士', 'Brand': 'L - 劳伦士', 'Url': '/Images/Logo/laolunshi.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-LORINMLclass.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'ML级', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-LORINMLclass.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LaoLunShi.png', 'Tires': '295/40R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 劳伦士 - VE-LORINSclass - {'Vehicle': 'S级-劳伦士', 'ProductID': 'VE-LORINSclass', 'BrandType': '劳伦士', 'Brand': 'L - 劳伦士', 'Url': '/Images/Logo/laolunshi.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LORINSclass.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'S级', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LORINSclass.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/LaoLunShi.png', 'Tires': '255/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "L - 陆地方舟 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 陆地方舟 - VE-GREENWEvion - {'Vehicle': '艾威-陆地方舟', 'ProductID': 'VE-GREENWEvion', 'BrandType': '陆地方舟', 'Brand': 'L - 陆地方舟', 'Url': '/Images/Logo/ludifangzhou.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GREENWEvion.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '艾威', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GREENWEvion.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/LuDiFangZhou.png', 'Tires': '165/65R13', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 陆地方舟 - VE-GREENWJMA - {'Vehicle': '劲玛-陆地方舟', 'ProductID': 'VE-GREENWJMA', 'BrandType': '陆地方舟', 'Brand': 'L - 陆地方舟', 'Url': '/Images/Logo/ludifangzhou.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-GREENWJMA.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '劲玛', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-GREENWJMA.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/LuDiFangZhou.png', 'Tires': '195/60R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 陆地方舟 - VE-GREENWFS - {'Vehicle': '风尚-陆地方舟', 'ProductID': 'VE-GREENWFS', 'BrandType': '陆地方舟', 'Brand': 'L - 陆地方舟', 'Url': '/Images/Logo/ludifangzhou.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-GREENWFS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '风尚', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-GREENWFS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/LuDiFangZhou.png', 'Tires': '195/65R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "L - 理念 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "L - 领克 done\n", + "L - 罗夫哈特 done\n", + "L - 力帆 done\n", + "L - 领途汽车 done\n", + "L - 劳斯莱斯 done\n", + "L - 雷克萨斯 done\n", + ">> L - 雷克萨斯 - VE-JTH-ES330 - {'Vehicle': 'ES330-雷克萨斯', 'ProductID': 'VE-JTH-ES330', 'BrandType': '雷克萨斯', 'Brand': 'L - 雷克萨斯', 'Url': '/Images/Logo/leikesasi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JTH-ES330.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'ES330', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JTH-ES330.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/LeiKeSaSi.png', 'Tires': '215/60R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 46, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 雷克萨斯 - VE-JTH-RX330 - {'Vehicle': 'RX330-雷克萨斯', 'ProductID': 'VE-JTH-RX330', 'BrandType': '雷克萨斯', 'Brand': 'L - 雷克萨斯', 'Url': '/Images/Logo/leikesasi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-JTH-RX330.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'RX330', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-JTH-RX330.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/LeiKeSaSi.png', 'Tires': '235/55R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 9, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "L - 林肯 done\n", + ">> L - 林肯 - VE-LINCOLNLS - {'Vehicle': 'LS-福特汽车', 'ProductID': 'VE-LINCOLNLS', 'BrandType': '福特汽车', 'Brand': 'L - 林肯', 'Url': '/Images/Logo/linken.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-LINCOLNLS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'LS', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-LINCOLNLS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/LinKen.png', 'Tires': '215/60R16;245/45R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 10, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> L - 林肯 - VE-FURDFIRMCS - {'Vehicle': '城市-福特汽车', 'ProductID': 'VE-FURDFIRMCS', 'BrandType': '福特汽车', 'Brand': 'L - 林肯', 'Url': '/Images/Logo/linken.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-FURDFIRMCS.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '城市', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-FURDFIRMCS.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/LinKen.png', 'Tires': '225/60R17;245/60R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "L - 零跑汽车 done\n", + "L - 洛克汽车 done\n", + "L - 理想 done\n", + ">> L - 理想 - VE-ONE - {'Vehicle': '理想ONE-理想智造', 'ProductID': 'VE-ONE', 'BrandType': '理想智造', 'Brand': 'L - 理想', 'Url': '/Images/Logo/lixiang.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-ONE.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '理想ONE', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-ONE.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/LiXiang.png', 'Tires': '', 'SpecialTireSize': '', 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "L - 雷丁 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "M - MINI done\n", + "M - MG done\n", + "M - 玛莎拉蒂 done\n", + ">> M - 玛莎拉蒂 - VE-LSLDCoupe - {'Vehicle': 'Coupe-玛莎拉蒂', 'ProductID': 'VE-LSLDCoupe', 'BrandType': '玛莎拉蒂', 'Brand': 'M - 玛莎拉蒂', 'Url': '/Images/Logo/mashaladi.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LSLDCoupe.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Coupe', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LSLDCoupe.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/MaShaLaDi.png', 'Tires': '235/40R18;265/35R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 7, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> M - 玛莎拉蒂 - VE-MAS3200GT - {'Vehicle': '3200GT-玛莎拉蒂', 'ProductID': 'VE-MAS3200GT', 'BrandType': '玛莎拉蒂', 'Brand': 'M - 玛莎拉蒂', 'Url': '/Images/Logo/mashaladi.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-MAS3200GT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '3200GT', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-MAS3200GT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/MaShaLaDi.png', 'Tires': '195/65R15;205/55R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> M - 玛莎拉蒂 - VE-MASEGranSport - {'Vehicle': 'GranSport-玛莎拉蒂', 'ProductID': 'VE-MASEGranSport', 'BrandType': '玛莎拉蒂', 'Brand': 'M - 玛莎拉蒂', 'Url': '/Images/Logo/mashaladi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-MASEGranSport.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'GranSport', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-MASEGranSport.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/MaShaLaDi.png', 'Tires': '235/50R18;275/45R18;245/35R20;285/35R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "M - 迈巴赫 done\n", + "M - 美亚 done\n", + "M - 马自达 done\n", + ">> M - 马自达 - VE-MAZD6Ruiyi - {'Vehicle': '睿翼-马自达进口', 'ProductID': 'VE-MAZD6Ruiyi', 'BrandType': '马自达进口', 'Brand': 'M - 马自达', 'Url': '/Images/Logo/mazida.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-MAZD6Ruiyi.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '睿翼', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-MAZD6Ruiyi.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/MaZiDa.png', 'Tires': '225/55R17;225/45R19;205/60R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "M - 迈凯伦 done\n", + ">> M - 迈凯伦 - VE-McLaren675LT - {'Vehicle': '675LT-迈凯伦汽车', 'ProductID': 'VE-McLaren675LT', 'BrandType': '迈凯伦汽车', 'Brand': 'M - 迈凯伦', 'Url': '/Images/Logo/maikailun.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-McLaren675LT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '675LT', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-McLaren675LT.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/MaiKaiLun.png', 'Tires': '235/35R19;305/30R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "N - 纳智捷 done\n", + "N - 哪吒汽车 done\n", + "O - 欧宝 done\n", + ">> O - 欧宝 - VE-OPEL99AB - {'Vehicle': '欧美佳-通用汽车', 'ProductID': 'VE-OPEL99AB', 'BrandType': '通用汽车', 'Brand': 'O - 欧宝', 'Url': '/Images/Logo/oubao.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-OPEL99AB.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '欧美佳', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-OPEL99AB.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/OuBao.png', 'Tires': '235/45R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 6, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "O - 欧朗 done\n", + "O - 讴歌 done\n", + "O - 欧拉 done\n", + "O - 欧尚汽车 done\n", + "P - Polestar done\n", + "P - 帕加尼 done\n", + "Q - 奇瑞 done\n", + ">> Q - 奇瑞 - VE-LVV-RUIHU7 - {'Vehicle': '瑞虎7-奇瑞汽车', 'ProductID': 'VE-LVV-RUIHU7', 'BrandType': '奇瑞汽车', 'Brand': 'Q - 奇瑞', 'Url': '/Images/Logo/qirui.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-LVV-RUIHU7.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '瑞虎7', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-LVV-RUIHU7.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/QiRui.png', 'Tires': '225/65R17;225/60R18;225/55R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 11, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 65, in \n", + " gbk_fp.write(ij.encode('gbk'))\n", + "UnicodeEncodeError: 'gbk' codec can't encode character '\\xa0' in position 48: illegal multibyte sequence\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Q - 起亚 done\n", + "Q - 庆铃 done\n", + "Q - 启腾 done\n", + "Q - 乔治·巴顿 done\n", + "Q - 前途汽车 done\n", + "Q - 启辰 done\n", + "R - 日产 done\n", + ">> R - 日产 - VE-NISS03AD - {'Vehicle': '蓝鸟-日产进口', 'ProductID': 'VE-NISS03AD', 'BrandType': '日产进口', 'Brand': 'R - 日产', 'Url': '/Images/Logo/richan.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-NISS03AD.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '蓝鸟', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-NISS03AD.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/RiChan.png', 'Tires': '205/60R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 6, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> R - 日产 - VE-NISS07AF - {'Vehicle': '西玛-日产进口', 'ProductID': 'VE-NISS07AF', 'BrandType': '日产进口', 'Brand': 'R - 日产', 'Url': '/Images/Logo/richan.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-NISS07AF.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '西玛', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-NISS07AF.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/RiChan.png', 'Tires': '255/55R17;245/45R18', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R - 瑞麒 done\n", + "R - RUF done\n", + "R - 荣威 done\n", + "S - Smart done\n", + "S - 思铭 done\n", + "S - 斯巴鲁 done\n", + "S - 萨博 done\n", + ">> S - 萨博 - VE-SAAB9000 - {'Vehicle': '9000-通用汽车', 'ProductID': 'VE-SAAB9000', 'BrandType': '通用汽车', 'Brand': 'S - 萨博', 'Url': '/Images/Logo/sabo.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-SAAB9000.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '9000', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-SAAB9000.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/SaBo.png', 'Tires': '185/55R15;195/55R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "S - 赛宝 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "S - 双环 done\n", + "S - 双龙 done\n", + "S - 世爵 done\n", + "S - 陕汽通家 done\n", + "S - 斯威汽车 done\n", + "S - 三菱 done\n", + "S - 斯柯达 done\n", + ">> S - 斯柯达 - VE-SKOD06AH - {'Vehicle': 'Fabia-斯柯达进口', 'ProductID': 'VE-SKOD06AH', 'BrandType': '斯柯达进口', 'Brand': 'S - 斯柯达', 'Url': '/Images/Logo/sikeda.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-SKOD06AH.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Fabia', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-SKOD06AH.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/SiKeDa.png', 'Tires': '185/60R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "S - 绅宝 done\n", + "T - 天马 done\n", + ">> T - 天马 - VE-TIANMAYXIONG - {'Vehicle': '英雄-天马汽车', 'ProductID': 'VE-TIANMAYXIONG', 'BrandType': '天马汽车', 'Brand': 'T - 天马', 'Url': '/Images/Logo/tianma.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-TIANMAYXIONG.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '英雄', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-TIANMAYXIONG.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/TianMa.png', 'Tires': '245/70R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "T - 通田 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "T - 腾势 done\n", + "T - 天津一汽 done\n", + ">> T - 天津一汽 - VE-LFP-A+SX - {'Vehicle': '夏利A+(三厢)-天津一汽夏利', 'ProductID': 'VE-LFP-A+SX', 'BrandType': '天津一汽夏利', 'Brand': 'T - 天津一汽', 'Url': '/Images/Logo/tianjinyiqi.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-LFP-A+SX.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '夏利A+(三厢)', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-LFP-A+SX.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/TianJinYiQi.png', 'Tires': '165/70R13', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 19, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "T - 特斯拉 done\n", + ">> T - 特斯拉 - VE-TSLLFIOWX - {'Vehicle': 'Model X-特斯拉汽车', 'ProductID': 'VE-TSLLFIOWX', 'BrandType': '特斯拉汽车', 'Brand': 'T - 特斯拉', 'Url': '/Images/Logo/tesila.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-TSLLFIOWX.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Model X', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-TSLLFIOWX.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/TeSiLa.png', 'Tires': '255/45R20;275/45R20;265/35R22;285/35R22', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 65, in \n", + " gbk_fp.write(ij.encode('gbk'))\n", + "UnicodeEncodeError: 'gbk' codec can't encode character '\\xa0' in position 51: illegal multibyte sequence\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "W - 万丰 done\n", + "W - 威麟 done\n", + "W - 沃尔沃 done\n", + ">> W - 沃尔沃 - VE-XC70WEWJK - {'Vehicle': 'XC70-沃尔沃进口', 'ProductID': 'VE-XC70WEWJK', 'BrandType': '沃尔沃进口', 'Brand': 'W - 沃尔沃', 'Url': '/Images/Logo/woerwo.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-XC70WEWJK.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'XC70', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-XC70WEWJK.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/WoErWo.png', 'Tires': '215/65R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 7, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> W - 沃尔沃 - VE-VOLVEV70 - {'Vehicle': 'V70-沃尔沃进口', 'ProductID': 'VE-VOLVEV70', 'BrandType': '沃尔沃进口', 'Brand': 'W - 沃尔沃', 'Url': '/Images/Logo/woerwo.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-VOLVEV70.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'V70', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-VOLVEV70.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/WoErWo.png', 'Tires': '225/55R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> W - 沃尔沃 - VE-VOLVE850 - {'Vehicle': '850-沃尔沃进口', 'ProductID': 'VE-VOLVE850', 'BrandType': '沃尔沃进口', 'Brand': 'W - 沃尔沃', 'Url': '/Images/Logo/woerwo.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-VOLVE850.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '850', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-VOLVE850.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/WoErWo.png', 'Tires': '205/50R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "W - 五菱 done\n", + ">> W - 五菱 - VE-WULI05AC - {'Vehicle': '都市清风-上汽通用五菱', 'ProductID': 'VE-WULI05AC', 'BrandType': '上汽通用五菱', 'Brand': 'W - 五菱', 'Url': '/Images/Logo/wuling.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-WULI05AC.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '都市清风', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-WULI05AC.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/WuLing.png', 'Tires': '175/70R13', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 19, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n", + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "W - 威旺 done\n", + "W - 威兹曼 done\n", + "W - 五十铃 done\n", + "W - WEY done\n", + "W - 威马 done\n", + "W - 蔚来 done\n", + "X - 新雅途 done\n", + "X - 厦门金龙 done\n", + "X - 雪佛兰 done\n", + ">> X - 雪佛兰 - VE-CHVJ05AA - {'Vehicle': 'S10皮卡-金杯通用', 'ProductID': 'VE-CHVJ05AA', 'BrandType': '金杯通用', 'Brand': 'X - 雪佛兰', 'Url': '/Images/Logo/xuefolan.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-CHVJ05AA.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'S10皮卡', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-CHVJ05AA.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/XueFoLan.png', 'Tires': '225/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 3, 'Priority3': 2, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> X - 雪佛兰 - VE-SPRINGO - {'Vehicle': '赛欧SPRINGO-上海通用', 'ProductID': 'VE-SPRINGO', 'BrandType': '上海通用', 'Brand': 'X - 雪佛兰', 'Url': '/Images/Logo/xuefolan.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-SPRINGO.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '赛欧SPRINGO', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-SPRINGO.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/XueFoLan.png', 'Tires': '155/60R15;175/55R15;195/50R15;185/55R15;195/55R15;175/70R14', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 5, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> X - 雪佛兰 - VE-CHVCorvette - {'Vehicle': '克尔维特-雪佛兰进口', 'ProductID': 'VE-CHVCorvette', 'BrandType': '雪佛兰进口', 'Brand': 'X - 雪佛兰', 'Url': '/Images/Logo/xuefolan.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-CHVCorvette.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '克尔维特', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-CHVCorvette.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/XueFoLan.png', 'Tires': '245/40R18;285/35R19', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 5, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> X - 雪佛兰 - VE-CHVExpress - {'Vehicle': 'Express-雪佛兰进口', 'ProductID': 'VE-CHVExpress', 'BrandType': '雪佛兰进口', 'Brand': 'X - 雪佛兰', 'Url': '/Images/Logo/xuefolan.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-CHVExpress.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Express', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-CHVExpress.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/XueFoLan.png', 'Tires': '235/75R16;245/75R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 4, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> X - 雪佛兰 - VE-CHVImpala - {'Vehicle': '英帕拉-雪佛兰进口', 'ProductID': 'VE-CHVImpala', 'BrandType': '雪佛兰进口', 'Brand': 'X - 雪佛兰', 'Url': '/Images/Logo/xuefolan.png', 'Src': 'https://img4.tuhu.org/Images/type/VE-CHVImpala.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '英帕拉', 'appSrc': None, 'Image': 'https://img4.tuhu.org/Images/type/VE-CHVImpala.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/XueFoLan.png', 'Tires': '235/50R18;245/45R19;245/40R20', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 3, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "X - 雪铁龙 done\n", + "X - 西雅特 done\n", + "X - 新凯 done\n", + "X - 新特汽车 done\n", + "X - 现代 done\n", + ">> X - 现代 - VE-HYUNWCHAO - {'Vehicle': '王朝-现代进口', 'ProductID': 'VE-HYUNWCHAO', 'BrandType': '现代进口', 'Brand': 'X - 现代', 'Url': '/Images/Logo/xiandai.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HYUNWCHAO.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '王朝', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HYUNWCHAO.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/XianDai.png', 'Tires': '215/65R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 8, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> X - 现代 - VE-HYUNGrandeur - {'Vehicle': '君爵-现代进口', 'ProductID': 'VE-HYUNGrandeur', 'BrandType': '现代进口', 'Brand': 'X - 现代', 'Url': '/Images/Logo/xiandai.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-HYUNGrandeur.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '君爵', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-HYUNGrandeur.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/XianDai.png', 'Tires': '205/65R15;205/60R16;205/60R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 6, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "X - 小鹏汽车 done\n", + "X - 星途 done\n", + "Y - 英菲尼迪 done\n", + ">> Y - 英菲尼迪 - VE-INFIQ45 - {'Vehicle': 'Q45-日产汽车', 'ProductID': 'VE-INFIQ45', 'BrandType': '日产汽车', 'Brand': 'Y - 英菲尼迪', 'Url': '/Images/Logo/yingfeinidi.png', 'Src': 'https://img3.tuhu.org/Images/type/VE-INFIQ45.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': 'Q45', 'appSrc': None, 'Image': 'https://img3.tuhu.org/Images/type/VE-INFIQ45.png@100Q.png', 'ImageUrl': 'https://img3.tuhu.org/Images/Logo/YingFeiNiDi.png', 'Tires': '225/60R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 11, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Y - 永源 done\n", + "Y - 云雀 done\n", + "Y - 一汽吉林 done\n", + "Y - 一汽华利 done\n", + "Y - 依维柯 done\n", + "Y - 一汽通用 done\n", + ">> Y - 一汽通用 - VE-YIQIGMZYF - {'Vehicle': '自由风-一汽轻型汽车', 'ProductID': 'VE-YIQIGMZYF', 'BrandType': '一汽轻型汽车', 'Brand': 'Y - 一汽通用', 'Url': '/Images/Logo/yiqitongyong.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-YIQIGMZYF.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '自由风', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-YIQIGMZYF.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/YiQiTongYong.png', 'Tires': '215/65R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 2, 'Priority3': 1, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> Y - 一汽通用 - VE-YIQILT - {'Vehicle': '蓝舰-一汽通用', 'ProductID': 'VE-YIQILT', 'BrandType': '一汽通用', 'Brand': 'Y - 一汽通用', 'Url': '/Images/Logo/yiqitongyong.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-YIQILT.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '蓝舰', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-YIQILT.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/YiQiTongYong.png', 'Tires': '245/70R16', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "Y - 云度汽车 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Y - 裕路 done\n", + "Y - 御捷新能源 done\n", + "Y - 一汽奔腾 done\n", + "Y - 野马 done\n", + "Y - 英致 done\n", + "Y - 易至汽车 done\n", + "Y - 银隆新能源 done\n", + "Z - 中华 done\n", + "Z - 中顺 done\n", + "Z - 中兴 done\n", + ">> Z - 中兴 - VE-ZHON04BO - {'Vehicle': '福星皮卡-中兴汽车', 'ProductID': 'VE-ZHON04BO', 'BrandType': '中兴汽车', 'Brand': 'Z - 中兴', 'Url': '/Images/Logo/zhongxing.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-ZHON04BO.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '福星皮卡', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-ZHON04BO.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/ZhongXing.png', 'Tires': '215/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 19, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> Z - 中兴 - VE-ZHON04AP - {'Vehicle': '田野皮卡-中兴汽车', 'ProductID': 'VE-ZHON04AP', 'BrandType': '中兴汽车', 'Brand': 'Z - 中兴', 'Url': '/Images/Logo/zhongxing.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-ZHON04AP.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '田野皮卡', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-ZHON04AP.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/ZhongXing.png', 'Tires': '215/75R15', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 14, 'VehicleSeries': None}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Z - 众泰 done\n", + "Z - 中欧 done\n", + "Z - 知豆 done\n", + "Z - 浙江卡尔森 done\n", + ">> Z - 浙江卡尔森 - VE-ZJKESMPV - {'Vehicle': '商务车-浙江卡尔森', 'ProductID': 'VE-ZJKESMPV', 'BrandType': '浙江卡尔森', 'Brand': 'Z - 浙江卡尔森', 'Url': '/Images/Logo/zhejiangkaersen.png', 'Src': 'https://img2.tuhu.org/Images/type/VE-ZJKESMPV.png@163w_163h_100Q.png', 'IsBaoYang': 'True', 'CarName': '商务车', 'appSrc': None, 'Image': 'https://img2.tuhu.org/Images/type/VE-ZJKESMPV.png@100Q.png', 'ImageUrl': 'https://img2.tuhu.org/Images/Logo/ZheJiangKaErSen.png', 'Tires': '205/65R16;235/60R17', 'SpecialTireSize': None, 'OriginalIsBaoyang': 1, 'Priority2': 1, 'Priority3': 1, 'VehicleSeries': None}\n", + "Z - 之诺 done\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"\", line 60, in \n", + " for pailiang in load_pailiang(vid):\n", + " File \"\", line 11, in load_pailiang\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "KeyError: 'PaiLiang'\n" + ] + } + ], + "source": [ + "# get child brand\n", + "from typing import List\n", + "\n", + "headers = {\n", + " 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',\n", + "}\n", + "\n", + "\n", + "def load_pailiang(vid) -> List[str]:\n", + " url = f'https://api.tuhu.cn/Vehicle/SelectVehicle?VehicleId={vid}'\n", + " return requests.get(url, headers=headers).json()['PaiLiang']\n", + "# print(url, r)\n", + "# return r['PaiLiang']\n", + "\n", + "\n", + "def load_brand_yrs(vid, pailiang) -> List[dict]:\n", + " \"\"\"\n", + " Args:\n", + " \n", + " vid(str): 'VE-LSG-GL6'\n", + " pailiang(str): '1.3T'\n", + " \n", + " Return: [{Key: \"VE-LSG-GL6\", Value: \"2019\"}, {Key: \"VE-LSG-GL6\", Value: \"2018\"},…]\n", + " \"\"\"\n", + " url = f'https://item.tuhu.cn/Car/SelectVehicle?callback=__GetCarBrands__&VehicleID={vid}&PaiLiang={pailiang}&_=1565330440229'\n", + " return json.loads(index_regex.findall(requests.get(url).text)[0])['Nian']\n", + "\n", + "\n", + "def load_child_brands(vid, pailiang, nian):\n", + " \"\"\"\n", + " Args:\n", + " \n", + " nian(str): 2017\n", + " \n", + " Return: [{LiYangID: null, TID: \"113193\", Name: \"2018款 1.3T 手自一体 18T 6座 豪华版\"},…]\n", + " \"\"\"\n", + " url = f'https://item.tuhu.cn/Car/SelectVehicleSalesName?callback=__GetCarBrands__&VehicleID={vid}&PaiLiang={pailiang}&Nian={nian}&_=1565330440230'\n", + " return json.loads(index_regex.findall(requests.get(url).text)[0])['SalesName']\n", + "\n", + "\n", + "\n", + "vid_dones = set([])\n", + "\n", + "with open('./车系/child-brands-gbk.txt', '+ab') as gbk_fp, \\\n", + " open('./车系/child-brands-utf.txt', '+ab') as utf8_fp:\n", + "# open('./车系/child-brands-utf-2.txt', '+ab') as utf8_fp_2, \\\n", + "# open('./车系/child-brands-gbk-2.txt', '+ab') as gbk_fp_2:\n", + " \n", + " utf8_fp.seek(0, 0)\n", + " for ij in utf8_fp:\n", + " vid_dones.add(json.loads(ij.decode('utf8'))['vid'])\n", + " \n", + " for b_1, bl in result.items():\n", + " print(f'{b_1} done')\n", + " for bd in bl:\n", + " vid = bd['ProductID']\n", + " if vid in vid_dones:\n", + " continue \n", + "\n", + " vid_dones.add(vid)\n", + " try:\n", + " for pailiang in load_pailiang(vid):\n", + " for nian in [d['Value'] for d in load_brand_yrs(vid, pailiang)]:\n", + " for b in load_child_brands(vid, pailiang, nian):\n", + " item = {'brand': b, 'pailiang': pailiang, 'vid': vid, 'year': nian}\n", + " ij = json.dumps(item, sort_keys=True, ensure_ascii=False) + '\\n'\n", + " gbk_fp.write(ij.encode('gbk'))\n", + " utf8_fp.write(ij.encode('utf8'))\n", + " except Exception:\n", + " print(f'>> {b_1} - {vid} - {bd}')\n", + " traceback.print_exc()\n", + " finally:\n", + " gbk_fp.flush()\n", + " utf8_fp.flush()\n", + "\n", + " \n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "vid_binfo_map = {}\n", + "for _, bl in result.items():\n", + " for binfo in bl:\n", + " vid_binfo_map[binfo['ProductID']] = binfo\n", + "\n", + "\n", + "with open('./车系/child-brands-gbk.txt', '+ab') as gbk_fp, \\\n", + " open('./车系/child-brands-utf8.txt', '+ab') as utf8_fp, \\\n", + " open('./车系/child-brands-utf8-2.txt', '+ab') as utf8_fp_2, \\\n", + " open('./车系/child-brands-gbk-2.txt', '+ab') as gbk_fp_2:\n", + " \n", + " utf8_fp.seek(0, 0)\n", + " for ij in utf8_fp:\n", + " d = json.loads(ij.decode('utf8'))\n", + " d['brand'].update(vid_binfo_map[d['vid']])\n", + " dj = json.dumps(d, sort_keys=True, ensure_ascii=False) + '\\n'\n", + " gbk_fp_2.write(dj.encode('gbk'))\n", + " utf8_fp_2.write(dj.encode('utf8'))\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "89214\n" + ] + } + ], + "source": [ + "with open('child-brands-utf8.txt') as fp:\n", + " print(fp.read().count('\\n'))" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/py34/pysnmp/README.md b/py3/pysnmp/README.md similarity index 100% rename from py34/pysnmp/README.md rename to py3/pysnmp/README.md diff --git a/py34/pysnmp/nmap.ipynb b/py3/pysnmp/nmap.ipynb similarity index 100% rename from py34/pysnmp/nmap.ipynb rename to py3/pysnmp/nmap.ipynb diff --git a/py34/pysnmp/pysnmp.ipynb b/py3/pysnmp/pysnmp.ipynb similarity index 100% rename from py34/pysnmp/pysnmp.ipynb rename to py3/pysnmp/pysnmp.ipynb diff --git a/py35/pyspider/data/project.db b/py3/pyspider/data/project.db similarity index 100% rename from py35/pyspider/data/project.db rename to py3/pyspider/data/project.db diff --git a/py35/pyspider/data/result.db b/py3/pyspider/data/result.db similarity index 100% rename from py35/pyspider/data/result.db rename to py3/pyspider/data/result.db diff --git a/py35/pyspider/data/scheduler.1d b/py3/pyspider/data/scheduler.1d similarity index 100% rename from py35/pyspider/data/scheduler.1d rename to py3/pyspider/data/scheduler.1d diff --git a/py35/pyspider/data/scheduler.1h b/py3/pyspider/data/scheduler.1h similarity index 100% rename from py35/pyspider/data/scheduler.1h rename to py3/pyspider/data/scheduler.1h diff --git a/py35/pyspider/data/scheduler.all b/py3/pyspider/data/scheduler.all similarity index 100% rename from py35/pyspider/data/scheduler.all rename to py3/pyspider/data/scheduler.all diff --git a/py35/pyspider/data/task.db b/py3/pyspider/data/task.db similarity index 100% rename from py35/pyspider/data/task.db rename to py3/pyspider/data/task.db diff --git a/py35/pytest-benchmark/README.md b/py3/pytest-benchmark/README.md similarity index 100% rename from py35/pytest-benchmark/README.md rename to py3/pytest-benchmark/README.md diff --git a/py35/pytest-benchmark/test_simple.py b/py3/pytest-benchmark/test_simple.py similarity index 100% rename from py35/pytest-benchmark/test_simple.py rename to py3/pytest-benchmark/test_simple.py diff --git a/py34/requirements.txt b/py3/requirements.txt similarity index 58% rename from py34/requirements.txt rename to py3/requirements.txt index 4af48f38..4dfedc41 100644 --- a/py34/requirements.txt +++ b/py3/requirements.txt @@ -1,3 +1,55 @@ +ipython[all] + +# time +maya +pytz + +# image +pillow + +# framework +japronto + +# aws +aiobotocore + +# markdown +markdown2 + +# crawler +selenium +lxml +pyquery +pyspider + +# profile +vprof +line_profiler +memory_profiler +pytest-benchmark +pprofile + +celery + +jieba +pymongo + +# web +gunicorn +aiohttp +meinheld +tornado +sanic + +# syntax +mypy-lang + +# test +ipdb + +# time +arrow + # profiler psutil line_profiler diff --git a/py35/sanic/README.md b/py3/sanic/README.md similarity index 100% rename from py35/sanic/README.md rename to py3/sanic/README.md diff --git a/py35/sanic/bench.py b/py3/sanic/bench.py similarity index 100% rename from py35/sanic/bench.py rename to py3/sanic/bench.py diff --git a/py34/scipy/README.md b/py3/scipy/README.md similarity index 100% rename from py34/scipy/README.md rename to py3/scipy/README.md diff --git a/py34/scipy/notebook/distance_by_cython.ipynb b/py3/scipy/notebook/distance_by_cython.ipynb similarity index 100% rename from py34/scipy/notebook/distance_by_cython.ipynb rename to py3/scipy/notebook/distance_by_cython.ipynb diff --git a/py34/scipy/notebook/sparse.ipynb b/py3/scipy/notebook/sparse.ipynb similarity index 100% rename from py34/scipy/notebook/sparse.ipynb rename to py3/scipy/notebook/sparse.ipynb diff --git a/py34/scipy/sparse.html b/py3/scipy/sparse.html similarity index 100% rename from py34/scipy/sparse.html rename to py3/scipy/sparse.html diff --git a/py35/selenium.ipynb b/py3/selenium.ipynb similarity index 100% rename from py35/selenium.ipynb rename to py3/selenium.ipynb diff --git a/py34/setup.py b/py3/setup.py similarity index 100% rename from py34/setup.py rename to py3/setup.py diff --git a/py36/signal.ipynb b/py3/signal.ipynb similarity index 100% rename from py36/signal.ipynb rename to py3/signal.ipynb diff --git a/py34/sklearn/KNN.html b/py3/sklearn/KNN.html similarity index 100% rename from py34/sklearn/KNN.html rename to py3/sklearn/KNN.html diff --git a/py34/sklearn/README.md b/py3/sklearn/README.md similarity index 100% rename from py34/sklearn/README.md rename to py3/sklearn/README.md diff --git a/py34/sklearn/notebook/KNN.ipynb b/py3/sklearn/notebook/KNN.ipynb similarity index 100% rename from py34/sklearn/notebook/KNN.ipynb rename to py3/sklearn/notebook/KNN.ipynb diff --git a/py35/smtp.ipynb b/py3/smtp.ipynb similarity index 100% rename from py35/smtp.ipynb rename to py3/smtp.ipynb diff --git a/py36/syntax.ipynb b/py3/syntax.ipynb similarity index 100% rename from py36/syntax.ipynb rename to py3/syntax.ipynb diff --git a/py34/python-syntax/Coroutine.html b/py3/syntax/Coroutine.html similarity index 100% rename from py34/python-syntax/Coroutine.html rename to py3/syntax/Coroutine.html diff --git a/py34/python-syntax/README.md b/py3/syntax/README.md similarity index 100% rename from py34/python-syntax/README.md rename to py3/syntax/README.md diff --git a/py34/python-syntax/concurrent.futures.html b/py3/syntax/concurrent.futures.html similarity index 100% rename from py34/python-syntax/concurrent.futures.html rename to py3/syntax/concurrent.futures.html diff --git a/py34/python-syntax/descriptor.html b/py3/syntax/descriptor.html similarity index 100% rename from py34/python-syntax/descriptor.html rename to py3/syntax/descriptor.html diff --git a/py34/python-syntax/notebook/Coroutine.ipynb b/py3/syntax/notebook/Coroutine.ipynb similarity index 100% rename from py34/python-syntax/notebook/Coroutine.ipynb rename to py3/syntax/notebook/Coroutine.ipynb diff --git a/py34/python-syntax/notebook/asterisk.ipynb b/py3/syntax/notebook/asterisk.ipynb similarity index 100% rename from py34/python-syntax/notebook/asterisk.ipynb rename to py3/syntax/notebook/asterisk.ipynb diff --git a/py34/python-syntax/notebook/bisect.ipynb b/py3/syntax/notebook/bisect.ipynb similarity index 100% rename from py34/python-syntax/notebook/bisect.ipynb rename to py3/syntax/notebook/bisect.ipynb diff --git a/py34/python-syntax/notebook/calendar.ipynb b/py3/syntax/notebook/calendar.ipynb similarity index 100% rename from py34/python-syntax/notebook/calendar.ipynb rename to py3/syntax/notebook/calendar.ipynb diff --git a/py34/python-syntax/notebook/collections.ipynb b/py3/syntax/notebook/collections.ipynb similarity index 100% rename from py34/python-syntax/notebook/collections.ipynb rename to py3/syntax/notebook/collections.ipynb diff --git a/py34/python-syntax/notebook/concurrent.futures.ipynb b/py3/syntax/notebook/concurrent.futures.ipynb similarity index 100% rename from py34/python-syntax/notebook/concurrent.futures.ipynb rename to py3/syntax/notebook/concurrent.futures.ipynb diff --git a/py34/python-syntax/notebook/copy.ipynb b/py3/syntax/notebook/copy.ipynb similarity index 100% rename from py34/python-syntax/notebook/copy.ipynb rename to py3/syntax/notebook/copy.ipynb diff --git a/py34/python-syntax/notebook/decimal.ipynb b/py3/syntax/notebook/decimal.ipynb similarity index 100% rename from py34/python-syntax/notebook/decimal.ipynb rename to py3/syntax/notebook/decimal.ipynb diff --git a/py34/python-syntax/notebook/descriptor.ipynb b/py3/syntax/notebook/descriptor.ipynb similarity index 100% rename from py34/python-syntax/notebook/descriptor.ipynb rename to py3/syntax/notebook/descriptor.ipynb diff --git a/py34/python-syntax/notebook/email.ipynb b/py3/syntax/notebook/email.ipynb similarity index 100% rename from py34/python-syntax/notebook/email.ipynb rename to py3/syntax/notebook/email.ipynb diff --git a/py34/python-syntax/notebook/enum.ipynb b/py3/syntax/notebook/enum.ipynb similarity index 100% rename from py34/python-syntax/notebook/enum.ipynb rename to py3/syntax/notebook/enum.ipynb diff --git a/py34/python-syntax/notebook/format.ipynb b/py3/syntax/notebook/format.ipynb similarity index 100% rename from py34/python-syntax/notebook/format.ipynb rename to py3/syntax/notebook/format.ipynb diff --git a/py34/python-syntax/notebook/fractions.ipynb b/py3/syntax/notebook/fractions.ipynb similarity index 100% rename from py34/python-syntax/notebook/fractions.ipynb rename to py3/syntax/notebook/fractions.ipynb diff --git a/py34/python-syntax/notebook/functools.ipynb b/py3/syntax/notebook/functools.ipynb similarity index 100% rename from py34/python-syntax/notebook/functools.ipynb rename to py3/syntax/notebook/functools.ipynb diff --git a/py34/python-syntax/notebook/headq.ipynb b/py3/syntax/notebook/headq.ipynb similarity index 100% rename from py34/python-syntax/notebook/headq.ipynb rename to py3/syntax/notebook/headq.ipynb diff --git a/py34/python-syntax/notebook/itertools.ipynb b/py3/syntax/notebook/itertools.ipynb similarity index 100% rename from py34/python-syntax/notebook/itertools.ipynb rename to py3/syntax/notebook/itertools.ipynb diff --git a/py34/python-syntax/notebook/mock.ipynb b/py3/syntax/notebook/mock.ipynb similarity index 100% rename from py34/python-syntax/notebook/mock.ipynb rename to py3/syntax/notebook/mock.ipynb diff --git a/py34/python-syntax/notebook/pytz.ipynb b/py3/syntax/notebook/pytz.ipynb similarity index 100% rename from py34/python-syntax/notebook/pytz.ipynb rename to py3/syntax/notebook/pytz.ipynb diff --git a/py34/python-syntax/notebook/sched.ipynb b/py3/syntax/notebook/sched.ipynb similarity index 100% rename from py34/python-syntax/notebook/sched.ipynb rename to py3/syntax/notebook/sched.ipynb diff --git a/py34/python-syntax/notebook/selectors.ipynb b/py3/syntax/notebook/selectors.ipynb similarity index 100% rename from py34/python-syntax/notebook/selectors.ipynb rename to py3/syntax/notebook/selectors.ipynb diff --git a/py34/python-syntax/notebook/smtplib.ipynb b/py3/syntax/notebook/smtplib.ipynb similarity index 98% rename from py34/python-syntax/notebook/smtplib.ipynb rename to py3/syntax/notebook/smtplib.ipynb index 09943840..30986765 100644 --- a/py34/python-syntax/notebook/smtplib.ipynb +++ b/py3/syntax/notebook/smtplib.ipynb @@ -24,7 +24,7 @@ "outputs": [], "source": [ "mail_username = 'ppcelery@gmail.com'\n", - "mail_password = 'yanagi0706'\n", + "mail_password = '12345'\n", "from_addr = mail_username\n", "to_addrs = (mail_username,)\n", "\n", @@ -101,4 +101,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file diff --git a/py34/python-syntax/notebook/statistics.ipynb b/py3/syntax/notebook/statistics.ipynb similarity index 100% rename from py34/python-syntax/notebook/statistics.ipynb rename to py3/syntax/notebook/statistics.ipynb diff --git a/py34/python-syntax/notebook/textwrap.ipynb b/py3/syntax/notebook/textwrap.ipynb similarity index 100% rename from py34/python-syntax/notebook/textwrap.ipynb rename to py3/syntax/notebook/textwrap.ipynb diff --git a/py34/python-syntax/notebook/weakref.ipynb b/py3/syntax/notebook/weakref.ipynb similarity index 100% rename from py34/python-syntax/notebook/weakref.ipynb rename to py3/syntax/notebook/weakref.ipynb diff --git a/py34/python-syntax/notebook/xml.ipynb b/py3/syntax/notebook/xml.ipynb similarity index 100% rename from py34/python-syntax/notebook/xml.ipynb rename to py3/syntax/notebook/xml.ipynb diff --git a/py34/python-syntax/notebook/yield & yield from.ipynb b/py3/syntax/notebook/yield & yield from.ipynb similarity index 100% rename from py34/python-syntax/notebook/yield & yield from.ipynb rename to py3/syntax/notebook/yield & yield from.ipynb diff --git a/py35/test_ipdb.py b/py3/test_ipdb.py similarity index 100% rename from py35/test_ipdb.py rename to py3/test_ipdb.py diff --git a/py36/thrift/simple_example/__init__.py b/py3/thrift/simple_example/__init__.py similarity index 100% rename from py36/thrift/simple_example/__init__.py rename to py3/thrift/simple_example/__init__.py diff --git a/py36/thrift/simple_example/client.py b/py3/thrift/simple_example/client.py similarity index 100% rename from py36/thrift/simple_example/client.py rename to py3/thrift/simple_example/client.py diff --git a/py36/thrift/simple_example/example.thrift b/py3/thrift/simple_example/example.thrift similarity index 100% rename from py36/thrift/simple_example/example.thrift rename to py3/thrift/simple_example/example.thrift diff --git a/py36/thrift/simple_example/example/__init__.py b/py3/thrift/simple_example/example/__init__.py similarity index 100% rename from py36/thrift/simple_example/example/__init__.py rename to py3/thrift/simple_example/example/__init__.py diff --git a/py36/thrift/simple_example/example/constants.py b/py3/thrift/simple_example/example/constants.py similarity index 100% rename from py36/thrift/simple_example/example/constants.py rename to py3/thrift/simple_example/example/constants.py diff --git a/py36/thrift/simple_example/example/format_data-remote b/py3/thrift/simple_example/example/format_data-remote similarity index 100% rename from py36/thrift/simple_example/example/format_data-remote rename to py3/thrift/simple_example/example/format_data-remote diff --git a/py36/thrift/simple_example/example/format_data.py b/py3/thrift/simple_example/example/format_data.py similarity index 100% rename from py36/thrift/simple_example/example/format_data.py rename to py3/thrift/simple_example/example/format_data.py diff --git a/py36/thrift/simple_example/example/ttypes.py b/py3/thrift/simple_example/example/ttypes.py similarity index 100% rename from py36/thrift/simple_example/example/ttypes.py rename to py3/thrift/simple_example/example/ttypes.py diff --git a/py36/thrift/simple_example/server.py b/py3/thrift/simple_example/server.py similarity index 100% rename from py36/thrift/simple_example/server.py rename to py3/thrift/simple_example/server.py diff --git a/py34/tornado/app.py b/py3/tornado/app.py similarity index 100% rename from py34/tornado/app.py rename to py3/tornado/app.py diff --git a/py34/tornado/notebook/async.ipynb b/py3/tornado/notebook/async.ipynb similarity index 100% rename from py34/tornado/notebook/async.ipynb rename to py3/tornado/notebook/async.ipynb diff --git a/py34/tox/requirements.txt b/py3/tox/requirements.txt similarity index 100% rename from py34/tox/requirements.txt rename to py3/tox/requirements.txt diff --git a/py34/tox/setup.py b/py3/tox/setup.py similarity index 100% rename from py34/tox/setup.py rename to py3/tox/setup.py diff --git a/py34/tox/src/tox_test/__init__.py b/py3/tox/src/tox_test/__init__.py similarity index 100% rename from py34/tox/src/tox_test/__init__.py rename to py3/tox/src/tox_test/__init__.py diff --git a/py34/tox/tests/test_tox.py b/py3/tox/tests/test_tox.py similarity index 100% rename from py34/tox/tests/test_tox.py rename to py3/tox/tests/test_tox.py diff --git a/py34/tox/tox.ini b/py3/tox/tox.ini similarity index 100% rename from py34/tox/tox.ini rename to py3/tox/tox.ini diff --git a/py36/tqdm.ipynb b/py3/tqdm.ipynb similarity index 100% rename from py36/tqdm.ipynb rename to py3/tqdm.ipynb diff --git a/py3/tutorial/abc.py b/py3/tutorial/abc.py new file mode 100644 index 00000000..dc1971e9 --- /dev/null +++ b/py3/tutorial/abc.py @@ -0,0 +1,56 @@ +from abc import ABC, abstractmethod, abstractproperty + +class ThingsABC(ABC): + @abstractproperty + def etable(self): + pass + + +class BaseFood(ThingsABC): + etable = True + + +class BirdABC(ABC): + """ + 在抽象类中定义抽象方法和属性, + 实例化的时候会自动检查这些抽象方法和方法必须已被实现,否则会抛出一场。 + + 具体实现的方法多种多样,比如直接在类里定义,或者多继承等等 + """ + @abstractmethod + def fly(self): + pass + + @abstractmethod + def eat(self, food: BaseFood): + pass + + +class BaseBird(BirdABC): + """ + 可以定义一些鸟类都应该有的通用属性和方法 + """ + pass + + +class Robin(BaseBird): + """ + 定义一些知更鸟特有的属性和方法 + """ +# def fly(self): +# pass + +# def eat(self, foold: BaseFood): +# pass + + +r = Robin() # 会报错,因为没有实现抽象方法 + +# --------------------------------------------------------------------------- +# TypeError Traceback (most recent call last) +# in +# 45 +# 46 +# ---> 47 r = Robin() # 会报错,因为没有实现抽象方法 + +# TypeError: Can't instantiate abstract class Robin with abstract methods eat, fly diff --git a/py3/tutorial/bad_link_code.py b/py3/tutorial/bad_link_code.py new file mode 100644 index 00000000..49e6762c --- /dev/null +++ b/py3/tutorial/bad_link_code.py @@ -0,0 +1,16 @@ +""" +这是很糟糕的链式调用 +""" + +def main(): + func1() + + +def func1(): + return func2() + +def func2(): + return func3() + +def func3(): + return "shit" diff --git a/py3/tutorial/good_funcs.py b/py3/tutorial/good_funcs.py new file mode 100644 index 00000000..074d3016 --- /dev/null +++ b/py3/tutorial/good_funcs.py @@ -0,0 +1,20 @@ +""" +这样写会好很多 +""" + +def step1(): + return "yoo" + + +def step2(v): + return f"hello, {v}" + + +def step3(v): + return f"you know nothing, {v}" + + +def main(): + r1 = step1() + r2 = step2(r1) + step3(r2) diff --git a/py3/tutorial/process_thread_coroutine.py b/py3/tutorial/process_thread_coroutine.py new file mode 100644 index 00000000..49f42b49 --- /dev/null +++ b/py3/tutorial/process_thread_coroutine.py @@ -0,0 +1,109 @@ +""" +✗ python process_thread_coroutine.py + +[2019-08-11 09:09:37,670Z - INFO - kipp] - main running... +[2019-08-11 09:09:37,671Z - INFO - kipp] - coroutine_main running... +[2019-08-11 09:09:37,671Z - INFO - kipp] - io_blocking_task running... +[2019-08-11 09:09:37,690Z - INFO - kipp] - coroutine_task running... +[2019-08-11 09:09:37,691Z - INFO - kipp] - coroutine_error running... +[2019-08-11 09:09:37,691Z - INFO - kipp] - coroutine_error end, cost 0.00s +[2019-08-11 09:09:37,693Z - INFO - kipp] - cpu_blocking_task running... +[2019-08-11 09:09:38,674Z - INFO - kipp] - io_blocking_task end, cost 1.00s +[2019-08-11 09:09:38,695Z - INFO - kipp] - coroutine_task end, cost 1.00s +[2019-08-11 09:09:39,580Z - INFO - kipp] - cpu_blocking_task end, cost 1.89s +[2019-08-11 09:09:39,582Z - INFO - kipp] - coroutine_main got [None, AttributeError('yo'), None, None] +[2019-08-11 09:09:39,582Z - INFO - kipp] - coroutine_main end, cost 1.91s +[2019-08-11 09:09:39,582Z - INFO - kipp] - main end, cost 1.91s +""" + + +from time import sleep, time +from asyncio import get_event_loop, sleep as asleep, gather, ensure_future, iscoroutine +from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor, wait +from functools import wraps + +from kipp.utils import get_logger + + +logger = get_logger() + + +N_FORK = 4 +N_THREADS = 10 + +thread_executor = ThreadPoolExecutor(max_workers=N_THREADS) +process_executor = ProcessPoolExecutor(max_workers=N_FORK) +ioloop = get_event_loop() + + +def timer(func): + @wraps(func) + def wrapper(*args, **kw): + logger.info(f"{func.__name__} running...") + start_at = time() + try: + r = func(*args, **kw) + finally: + logger.info(f"{func.__name__} end, cost {time() - start_at:.2f}s") + + return wrapper + + +def async_timer(func): + @wraps(func) + async def wrapper(*args, **kw): + logger.info(f"{func.__name__} running...") + start_at = time() + try: + return await func(*args, **kw) + finally: + logger.info(f"{func.__name__} end, cost {time() - start_at:.2f}s") + + return wrapper + + +@timer +def io_blocking_task(): + """I/O 型阻塞调用""" + sleep(1) + + +@timer +def cpu_blocking_task(): + """CPU 型阻塞调用""" + for _ in range(1 << 26): + pass + + +@async_timer +async def coroutine_task(): + """异步协程调用""" + await asleep(1) + + +@async_timer +async def coroutine_error(): + """会抛出异常的协程调用""" + raise AttributeError("yo") + + +@async_timer +async def coroutine_main(): + ioloop = get_event_loop() + r = await gather( + coroutine_task(), + coroutine_error(), + ioloop.run_in_executor(thread_executor, io_blocking_task), + ioloop.run_in_executor(process_executor, cpu_blocking_task), + return_exceptions=True, + ) + logger.info(f"coroutine_main got {r}") + + +@timer +def main(): + get_event_loop().run_until_complete(coroutine_main()) + + +if __name__ == "__main__": + main() diff --git a/py3/tutorial/test_demo.py b/py3/tutorial/test_demo.py new file mode 100644 index 00000000..dcab7096 --- /dev/null +++ b/py3/tutorial/test_demo.py @@ -0,0 +1,21 @@ +""" +test_demo.py +""" + +from unittest import TestCase +from typing import List + +def demo(l: List[int]) -> int: + return l[0] + +class DemoTestCase(TestCase): + + def setUp(self): + print("first run") + + def tearDown(self): + print("last run") + + def test_demo(self): + data = [] + self.assertRaises(IndexError, demo, data) diff --git a/py3/tutorial/thread_safe.py b/py3/tutorial/thread_safe.py new file mode 100644 index 00000000..bc8fe105 --- /dev/null +++ b/py3/tutorial/thread_safe.py @@ -0,0 +1,26 @@ +from concurrent.futures import ThreadPoolExecutor, wait +from typing import Dict +from threading import Event + + +V_KEY = "key" + + +def worker(evt: Event, data: Dict[str, int]): + evt.wait() + for _ in range(100000): + data[V_KEY] += 1 + + +def main(): + data = {V_KEY: 0} + evt = Event() + executor = ThreadPoolExecutor(max_workers=10) + fs = [executor.submit(worker, evt, data) for _ in range(10)] + evt.set() + wait(fs) + print(data) # not equal to 10*100000 + + +if __name__ == "__main__": + main() diff --git a/py3/twitter.ipynb b/py3/twitter.ipynb new file mode 100644 index 00000000..918a79d7 --- /dev/null +++ b/py3/twitter.ipynb @@ -0,0 +1,528 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n", + "\n", + "# sys.path.append(r'/Users/laisky/repo/laisky/ramjet/ramjet/settings')\n", + "sys.path.append(r'/opt/configs/ramjet')\n", + "sys.path\n", + "import prd" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'id': 105351466,\n", + " 'id_str': '105351466',\n", + " 'name': 'Laisky',\n", + " 'screen_name': 'ppcelery',\n", + " 'location': '♥ Shanghai',\n", + " 'profile_location': None,\n", + " 'description': '热爱文学的理科生,本质是一台高语速大存储的复读机。',\n", + " 'url': 'https://t.co/tmLO9n4B1E',\n", + " 'entities': {'url': {'urls': [{'url': 'https://t.co/tmLO9n4B1E',\n", + " 'expanded_url': 'https://about.me/laisky',\n", + " 'display_url': 'about.me/laisky',\n", + " 'indices': [0, 23]}]},\n", + " 'description': {'urls': []}},\n", + " 'protected': False,\n", + " 'followers_count': 7544,\n", + " 'friends_count': 228,\n", + " 'listed_count': 133,\n", + " 'created_at': 'Sat Jan 16 03:02:39 +0000 2010',\n", + " 'favourites_count': 849,\n", + " 'utc_offset': None,\n", + " 'time_zone': None,\n", + " 'geo_enabled': True,\n", + " 'verified': False,\n", + " 'statuses_count': 21894,\n", + " 'lang': None,\n", + " 'status': {'created_at': 'Sat Jun 22 14:23:42 +0000 2019',\n", + " 'id': 1142438015064629249,\n", + " 'id_str': '1142438015064629249',\n", + " 'text': '@Steverezero 云备份。\\nwinter is coming, it may delay, but never absent.',\n", + " 'truncated': False,\n", + " 'entities': {'hashtags': [],\n", + " 'symbols': [],\n", + " 'user_mentions': [{'screen_name': 'Steverezero',\n", + " 'name': 'D-NARUTO',\n", + " 'id': 2246680200,\n", + " 'id_str': '2246680200',\n", + " 'indices': [0, 12]}],\n", + " 'urls': []},\n", + " 'source': 'Twitter Web App',\n", + " 'in_reply_to_status_id': 1142437378176405504,\n", + " 'in_reply_to_status_id_str': '1142437378176405504',\n", + " 'in_reply_to_user_id': 2246680200,\n", + " 'in_reply_to_user_id_str': '2246680200',\n", + " 'in_reply_to_screen_name': 'Steverezero',\n", + " 'geo': None,\n", + " 'coordinates': None,\n", + " 'place': None,\n", + " 'contributors': None,\n", + " 'is_quote_status': False,\n", + " 'retweet_count': 0,\n", + " 'favorite_count': 2,\n", + " 'favorited': False,\n", + " 'retweeted': False,\n", + " 'lang': 'en'},\n", + " 'contributors_enabled': False,\n", + " 'is_translator': False,\n", + " 'is_translation_enabled': False,\n", + " 'profile_background_color': '022330',\n", + " 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme15/bg.png',\n", + " 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme15/bg.png',\n", + " 'profile_background_tile': False,\n", + " 'profile_image_url': 'http://pbs.twimg.com/profile_images/1141508587920871424/Xv6jOLul_normal.jpg',\n", + " 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1141508587920871424/Xv6jOLul_normal.jpg',\n", + " 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/105351466/1560991954',\n", + " 'profile_link_color': '0084B4',\n", + " 'profile_sidebar_border_color': 'FFFFFF',\n", + " 'profile_sidebar_fill_color': 'C0DFEC',\n", + " 'profile_text_color': '333333',\n", + " 'profile_use_background_image': True,\n", + " 'has_extended_profile': True,\n", + " 'default_profile': False,\n", + " 'default_profile_image': False,\n", + " 'following': False,\n", + " 'follow_request_sent': False,\n", + " 'notifications': False,\n", + " 'translator_type': 'regular',\n", + " 'suspended': False,\n", + " 'needs_phone_verification': False}" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from datetime import datetime\n", + "import traceback\n", + "import re\n", + "\n", + "from pymongo import MongoClient\n", + "import tweepy\n", + "from tweepy import API, OAuthHandler\n", + "\n", + "\n", + "mongo = MongoClient(\"localhost\", 27017)\n", + "tweets = mongo['twitter']['tweets']\n", + "\n", + "auth = OAuthHandler(prd.CONSUMER_KEY, prd.CONSUMER_SECRET)\n", + "auth.set_access_token(prd.ACCESS_TOKEN, prd.ACCESS_TOKEN_SECRET)\n", + "api = API(auth, wait_on_rate_limit=True, parser=tweepy.parsers.JSONParser())\n", + "api.me()" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'created_at': 'Sat Jun 22 14:23:42 +0000 2019',\n", + " 'id': 1142438015064629249,\n", + " 'id_str': '1142438015064629249',\n", + " 'text': '@Steverezero 云备份。\\nwinter is coming, it may delay, but never absent.',\n", + " 'truncated': False,\n", + " 'entities': {'hashtags': [],\n", + " 'symbols': [],\n", + " 'user_mentions': [{'screen_name': 'Steverezero',\n", + " 'name': 'D-NARUTO',\n", + " 'id': 2246680200,\n", + " 'id_str': '2246680200',\n", + " 'indices': [0, 12]}],\n", + " 'urls': []},\n", + " 'source': 'Twitter Web App',\n", + " 'in_reply_to_status_id': 1142437378176405504,\n", + " 'in_reply_to_status_id_str': '1142437378176405504',\n", + " 'in_reply_to_user_id': 2246680200,\n", + " 'in_reply_to_user_id_str': '2246680200',\n", + " 'in_reply_to_screen_name': 'Steverezero',\n", + " 'user': {'id': 105351466,\n", + " 'id_str': '105351466',\n", + " 'name': 'Laisky',\n", + " 'screen_name': 'ppcelery',\n", + " 'location': '♥ Shanghai',\n", + " 'description': '热爱文学的理科生,本质是一台高语速大存储的复读机。',\n", + " 'url': 'https://t.co/tmLO9n4B1E',\n", + " 'entities': {'url': {'urls': [{'url': 'https://t.co/tmLO9n4B1E',\n", + " 'expanded_url': 'https://about.me/laisky',\n", + " 'display_url': 'about.me/laisky',\n", + " 'indices': [0, 23]}]},\n", + " 'description': {'urls': []}},\n", + " 'protected': False,\n", + " 'followers_count': 7541,\n", + " 'friends_count': 228,\n", + " 'listed_count': 133,\n", + " 'created_at': 'Sat Jan 16 03:02:39 +0000 2010',\n", + " 'favourites_count': 848,\n", + " 'utc_offset': None,\n", + " 'time_zone': None,\n", + " 'geo_enabled': True,\n", + " 'verified': False,\n", + " 'statuses_count': 21894,\n", + " 'lang': None,\n", + " 'contributors_enabled': False,\n", + " 'is_translator': False,\n", + " 'is_translation_enabled': False,\n", + " 'profile_background_color': '022330',\n", + " 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme15/bg.png',\n", + " 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme15/bg.png',\n", + " 'profile_background_tile': False,\n", + " 'profile_image_url': 'http://pbs.twimg.com/profile_images/1141508587920871424/Xv6jOLul_normal.jpg',\n", + " 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1141508587920871424/Xv6jOLul_normal.jpg',\n", + " 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/105351466/1560991954',\n", + " 'profile_link_color': '0084B4',\n", + " 'profile_sidebar_border_color': 'FFFFFF',\n", + " 'profile_sidebar_fill_color': 'C0DFEC',\n", + " 'profile_text_color': '333333',\n", + " 'profile_use_background_image': True,\n", + " 'has_extended_profile': True,\n", + " 'default_profile': False,\n", + " 'default_profile_image': False,\n", + " 'following': False,\n", + " 'follow_request_sent': False,\n", + " 'notifications': False,\n", + " 'translator_type': 'regular'},\n", + " 'geo': None,\n", + " 'coordinates': None,\n", + " 'place': None,\n", + " 'contributors': None,\n", + " 'is_quote_status': False,\n", + " 'retweet_count': 0,\n", + " 'favorite_count': 2,\n", + " 'favorited': False,\n", + " 'retweeted': False,\n", + " 'lang': 'en'}]" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "api.user_timeline(count=1)" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> scan 999 statuses\n", + ">> scan 1999 statuses\n", + ">> scan 2999 statuses\n", + ">> scan 3999 statuses\n", + ">> scan 4999 statuses\n", + ">> scan 5999 statuses\n", + ">> scan 6999 statuses\n", + ">> scan 7999 statuses\n", + ">> scan 8999 statuses\n", + ">> scan 9999 statuses\n", + ">> scan 10999 statuses\n", + ">> scan 11999 statuses\n", + ">> scan 12999 statuses\n", + ">> scan 13999 statuses\n", + ">> scan 14999 statuses\n", + ">> scan 15999 statuses\n", + ">> scan 16999 statuses\n", + ">> scan 17999 statuses\n", + ">> scan 18999 statuses\n", + ">> scan 19999 statuses\n", + ">> scan 20999 statuses\n", + ">> scan 21999 statuses\n", + ">> scan 22999 statuses\n", + ">> scan 23999 statuses\n", + ">> scan 24999 statuses\n", + ">> scan 25999 statuses\n", + ">> scan 26999 statuses\n", + ">> scan 27999 statuses\n" + ] + }, + { + "ename": "KeyboardInterrupt", + "evalue": "", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 51\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 52\u001b[0;31m \u001b[0mdelete\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m\u001b[0m in \u001b[0;36mdelete\u001b[0;34m()\u001b[0m\n\u001b[1;32m 31\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 32\u001b[0m \u001b[0;31m# tweets = api.user_timeline(max_id=current_id, count=1000)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 33\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mtweet\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mtweets\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfind\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m'user.screen_name'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'ppcelery'\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msort\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"_id\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 34\u001b[0m \u001b[0mn\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 35\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/cursor.py\u001b[0m in \u001b[0;36mnext\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1223\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__empty\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1224\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mStopIteration\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1225\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__data\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_refresh\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1226\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__manipulate\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1227\u001b[0m \u001b[0m_db\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__collection\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdatabase\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/cursor.py\u001b[0m in \u001b[0;36m_refresh\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1160\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__collection\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdatabase\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclient\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1161\u001b[0m self.__max_await_time_ms)\n\u001b[0;32m-> 1162\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__send_message\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1163\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1164\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__data\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/cursor.py\u001b[0m in \u001b[0;36m__send_message\u001b[0;34m(self, operation)\u001b[0m\n\u001b[1;32m 1004\u001b[0m docs = self._unpack_response(\n\u001b[1;32m 1005\u001b[0m \u001b[0mreply\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__id\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__collection\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcodec_options\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1006\u001b[0;31m legacy_response=legacy_response, user_fields=user_fields)\n\u001b[0m\u001b[1;32m 1007\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mfrom_command\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1008\u001b[0m \u001b[0mfirst\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdocs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/cursor.py\u001b[0m in \u001b[0;36m_unpack_response\u001b[0;34m(self, response, cursor_id, codec_options, user_fields, legacy_response)\u001b[0m\n\u001b[1;32m 1095\u001b[0m user_fields=None, legacy_response=False):\n\u001b[1;32m 1096\u001b[0m return response.unpack_response(cursor_id, codec_options, user_fields,\n\u001b[0;32m-> 1097\u001b[0;31m legacy_response)\n\u001b[0m\u001b[1;32m 1098\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1099\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_read_preference\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/message.py\u001b[0m in \u001b[0;36munpack_response\u001b[0;34m(self, cursor_id, codec_options, user_fields, legacy_response)\u001b[0m\n\u001b[1;32m 1420\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mbson\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdecode_all\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdocuments\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcodec_options\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1421\u001b[0m return bson._decode_all_selective(\n\u001b[0;32m-> 1422\u001b[0;31m self.documents, codec_options, user_fields)\n\u001b[0m\u001b[1;32m 1423\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1424\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mcommand_response\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/bson/__init__.py\u001b[0m in \u001b[0;36m_decode_all_selective\u001b[0;34m(data, codec_options, fields)\u001b[0m\n\u001b[1;32m 991\u001b[0m \"\"\"\n\u001b[1;32m 992\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mcodec_options\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtype_registry\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_decoder_map\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 993\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mdecode_all\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcodec_options\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 994\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 995\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mfields\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/bson/objectid.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, oid)\u001b[0m\n\u001b[1;32m 61\u001b[0m \u001b[0m_type_marker\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m7\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 62\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 63\u001b[0;31m \u001b[0;32mdef\u001b[0m \u001b[0m__init__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moid\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 64\u001b[0m \"\"\"Initialize a new ObjectId.\n\u001b[1;32m 65\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mKeyboardInterrupt\u001b[0m: " + ] + } + ], + "source": [ + "# delete tweets\n", + "\n", + "\n", + "def is_status_tobe_delete(tweet):\n", + " if len(tweet.get('entities', {}).get(\"hashtags\", [])) >= 1:\n", + " return False\n", + " \n", + " if tweet['created_at'] < datetime(2017,6,5):\n", + " return True\n", + "\n", + "def delete():\n", + "# last_tweets = api.user_timeline(count=1)\n", + "# if not last_tweets:\n", + "# return\n", + " \n", + "# print(last_tweets[0].created_at < datetime(2019,7,1))\n", + "# print(last_tweets[0])\n", + "# print(dir(last_tweets[0]))\n", + "# return\n", + "\n", + "# current_id = last_tweets[0].id\n", + " current_id = \"379207474345046017\"\n", + " n = n_del = 1\n", + "# tweets = api.user_timeline(max_id=current_id, count=1000)\n", + " for tweet in tweets.find({'user.screen_name': 'ppcelery'}).sort(\"_id\", -1):\n", + " n += 1\n", + "\n", + " if is_status_tobe_delete(tweet):\n", + " n_del += 1\n", + " print(\"delete\", tweet['id'],tweet['created_at'])\n", + " try:\n", + " api.destroy_status(tweet['id'])\n", + " except Exception:\n", + " traceback.print_exc()\n", + " else:\n", + " current_id = tweet['id']\n", + "\n", + " if n % 1000 == 0:\n", + " print(\">> scan {} statuses\".format(n-1))\n", + " if n_del % 100 == 0:\n", + " print(\">> delete {} statuses\".format(n_del-1))\n", + "\n", + "\n", + "delete()" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "tweet img ok 719103735004200961 /Users/laisky/Downloads/CfrFCRcUEAIFaEe.jpg\n", + "tweet img ok 719468584750096384 /Users/laisky/Downloads/CfwQ3VxVIAAj1Yv.jpg\n", + "got error \n" + ] + }, + { + "ename": "UnboundLocalError", + "evalue": "local variable 'fpath' referenced before assignment", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mUnboundLocalError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 29\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 30\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 31\u001b[0;31m \u001b[0mdownload_images\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 32\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mdownload_images\u001b[0;34m()\u001b[0m\n\u001b[1;32m 26\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mdownload_images\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 27\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mtweet\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mtweets\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfind\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m\"entities.media\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m\"$exists\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msort\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"_id\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 28\u001b[0;31m \u001b[0mdownload_images_for_tweet\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtweet\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 29\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 30\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mdownload_images_for_tweet\u001b[0;34m(tweet)\u001b[0m\n\u001b[1;32m 21\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwrite\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcontent\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 23\u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"tweet img ok\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtweet\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'id'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfpath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 24\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 25\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mUnboundLocalError\u001b[0m: local variable 'fpath' referenced before assignment" + ] + } + ], + "source": [ + "# download image\n", + "import requests\n", + "from pathlib import Path\n", + "\n", + "dirpath = r'/var/www/uploads/twitter'\n", + "# dirpath = r'/Users/laisky/Downloads'\n", + "\n", + "\n", + "def download_images_for_tweet(tweet):\n", + " for img in tweet['entities']['media']:\n", + " with requests.get(img['media_url_https']+\":orig\") as r:\n", + " if r.status_code != 200:\n", + " print(\"got error\", r.text)\n", + " continue\n", + " \n", + " fpath = Path(dirpath, img['media_url_https'].split(\"/\")[-1])\n", + " if fpath.is_file():\n", + " continue\n", + " \n", + " with open(fpath, 'wb') as f:\n", + " f.write(r.content) \n", + " print(\"tweet img ok\", tweet['id'], fpath)\n", + " \n", + "\n", + "def download_images():\n", + " for tweet in tweets.find({\"entities.media\": {\"$exists\": 1}}).sort(\"_id\", -1):\n", + " download_images_for_tweet(tweet)\n", + " \n", + " \n", + "download_images()\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "save tweet 482450130839142400\n", + "save tweet 314018018000777216\n" + ] + }, + { + "ename": "KeyboardInterrupt", + "evalue": "", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 49\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 51\u001b[0;31m \u001b[0mdownload_relate_tweets\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m\u001b[0m in \u001b[0;36mdownload_relate_tweets\u001b[0;34m()\u001b[0m\n\u001b[1;32m 39\u001b[0m \u001b[0mrelated_ids\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfilter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m \u001b[0mid_\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtweets\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfind_one\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m\"id\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mid_\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrelated_ids\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 40\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 41\u001b[0;31m \u001b[0mrelated_ts\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mtwitter_api_parser\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_status\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mid_\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mid_\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrelated_ids\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 42\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mdocu\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrelated_ts\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 43\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"save tweet\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdocu\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'id'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 39\u001b[0m \u001b[0mrelated_ids\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfilter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m \u001b[0mid_\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtweets\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfind_one\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m\"id\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mid_\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrelated_ids\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 40\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 41\u001b[0;31m \u001b[0mrelated_ts\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mtwitter_api_parser\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_status\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mid_\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mid_\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrelated_ids\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 42\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mdocu\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrelated_ts\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 43\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"save tweet\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdocu\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'id'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m(id_)\u001b[0m\n\u001b[1;32m 37\u001b[0m \u001b[0mtweet\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"in_reply_to_status_id\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mrelated_ids\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtweet\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'in_reply_to_status_id'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 38\u001b[0m \u001b[0mtweet\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"retweeted\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mrelated_ids\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtweet\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'retweeted_status'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'id'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 39\u001b[0;31m \u001b[0mrelated_ids\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfilter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m \u001b[0mid_\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtweets\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfind_one\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m\"id\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mid_\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrelated_ids\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 40\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 41\u001b[0m \u001b[0mrelated_ts\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mtwitter_api_parser\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_status\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mid_\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mid_\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrelated_ids\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/collection.py\u001b[0m in \u001b[0;36mfind_one\u001b[0;34m(self, filter, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1267\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1268\u001b[0m \u001b[0mcursor\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfind\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilter\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1269\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mresult\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mcursor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlimit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1270\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1271\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/cursor.py\u001b[0m in \u001b[0;36mnext\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1223\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__empty\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1224\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mStopIteration\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1225\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__data\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_refresh\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1226\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__manipulate\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1227\u001b[0m \u001b[0m_db\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__collection\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdatabase\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/cursor.py\u001b[0m in \u001b[0;36m_refresh\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1138\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__session\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1139\u001b[0m self.__collection.database.client)\n\u001b[0;32m-> 1140\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__send_message\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mq\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1141\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__id\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;31m# Get More\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1142\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__limit\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/cursor.py\u001b[0m in \u001b[0;36m__send_message\u001b[0;34m(self, operation)\u001b[0m\n\u001b[1;32m 952\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 953\u001b[0m response = client._send_message_with_response(\n\u001b[0;32m--> 954\u001b[0;31m operation, exhaust=self.__exhaust, address=self.__address)\n\u001b[0m\u001b[1;32m 955\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__address\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mresponse\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maddress\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 956\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__exhaust\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/mongo_client.py\u001b[0m in \u001b[0;36m_send_message_with_response\u001b[0;34m(self, operation, exhaust, address)\u001b[0m\n\u001b[1;32m 1175\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__all_credentials\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1176\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_event_listeners\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1177\u001b[0;31m exhaust)\n\u001b[0m\u001b[1;32m 1178\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1179\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_reset_on_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mserver\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/mongo_client.py\u001b[0m in \u001b[0;36m_reset_on_error\u001b[0;34m(self, server, func, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1186\u001b[0m \"\"\"\n\u001b[1;32m 1187\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1188\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1189\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mNetworkTimeout\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1190\u001b[0m \u001b[0;31m# The socket has been closed. Don't reset the server.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/server.py\u001b[0m in \u001b[0;36msend_message_with_response\u001b[0;34m(self, operation, set_slave_okay, all_credentials, listeners, exhaust)\u001b[0m\n\u001b[1;32m 104\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 105\u001b[0m \u001b[0msock_info\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msend_message\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmax_doc_size\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 106\u001b[0;31m \u001b[0mreply\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msock_info\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreceive_message\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrequest_id\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 107\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mexc\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 108\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mpublish\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/pool.py\u001b[0m in \u001b[0;36mreceive_message\u001b[0;34m(self, request_id)\u001b[0m\n\u001b[1;32m 615\u001b[0m self.max_message_size)\n\u001b[1;32m 616\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0merror\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 617\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_raise_connection_failure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0merror\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 618\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 619\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_raise_if_not_writable\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0munacknowledged\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/pool.py\u001b[0m in \u001b[0;36m_raise_connection_failure\u001b[0;34m(self, error)\u001b[0m\n\u001b[1;32m 748\u001b[0m \u001b[0m_raise_connection_failure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maddress\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merror\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 749\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 750\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0merror\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 751\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 752\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__eq__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mother\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/pool.py\u001b[0m in \u001b[0;36mreceive_message\u001b[0;34m(self, request_id)\u001b[0m\n\u001b[1;32m 613\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 614\u001b[0m return receive_message(self.sock, request_id,\n\u001b[0;32m--> 615\u001b[0;31m self.max_message_size)\n\u001b[0m\u001b[1;32m 616\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0merror\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 617\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_raise_connection_failure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0merror\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/network.py\u001b[0m in \u001b[0;36mreceive_message\u001b[0;34m(sock, request_id, max_message_size)\u001b[0m\n\u001b[1;32m 179\u001b[0m \u001b[0;31m# Ignore the response's request id.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 180\u001b[0m length, _, response_to, op_code = _UNPACK_HEADER(\n\u001b[0;32m--> 181\u001b[0;31m _receive_data_on_socket(sock, 16))\n\u001b[0m\u001b[1;32m 182\u001b[0m \u001b[0;31m# No request_id for exhaust cursor \"getMore\".\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 183\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mrequest_id\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/.virtualenvs/36/lib/python3.6/site-packages/pymongo/network.py\u001b[0m in \u001b[0;36m_receive_data_on_socket\u001b[0;34m(sock, length)\u001b[0m\n\u001b[1;32m 238\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0mbytes_read\u001b[0m \u001b[0;34m<\u001b[0m \u001b[0mlength\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 239\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 240\u001b[0;31m \u001b[0mchunk_length\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msock\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrecv_into\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmv\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mbytes_read\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 241\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mIOError\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mOSError\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mexc\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 242\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0m_errno_from_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mexc\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0merrno\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mEINTR\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mKeyboardInterrupt\u001b[0m: " + ] + } + ], + "source": [ + "# download related tweets\n", + "\n", + "def twitter_api_parser(tweet):\n", + " reg_topic = re.compile(r\"[\\b|\\s]#(\\S+)\")\n", + " tweet['topics'] = reg_topic.findall(\n", + " tweet['text'].replace('.', '_')\n", + " )\n", + " tweet['created_at'] = datetime.strptime(\n", + " tweet['created_at'], '%a %b %d %H:%M:%S +0000 %Y'\n", + " )\n", + "\n", + " # replace url\n", + " t = tweet['text']\n", + " if 't.co' in t:\n", + " # parse entities media\n", + " if 'media' in tweet['entities']:\n", + " for media in tweet['entities']['media']:\n", + " surl = media['url']\n", + " eurl = media['media_url']\n", + " t = t.replace(surl, eurl)\n", + "\n", + " # parse entities urls\n", + " if 'urls' in tweet['entities']:\n", + " for d in tweet['entities']['urls']:\n", + " surl = d['url']\n", + " eurl = d['expanded_url']\n", + " t = t.replace(surl, eurl)\n", + "\n", + " tweet['text'] = t\n", + "\n", + " return tweet\n", + "\n", + "\n", + "def save_relate_tweets(status):\n", + " related_ids = []\n", + " status.get(\"in_reply_to_status_id\") and related_ids.append(status['in_reply_to_status_id'])\n", + " status.get(\"retweeted_status\") and related_ids.append(status['retweeted_status']['id'])\n", + " status.get(\"quoted_status\") and related_ids.append(status['quoted_status']['id'])\n", + " related_ids = filter(lambda id_: not tweets.find_one({\"id\": id_}), related_ids)\n", + " \n", + " for id_ in related_ids:\n", + " try:\n", + " docu = api.get_status(id_)\n", + " except Exception:\n", + " print(f\"load tweet {id_} got error\")\n", + " else:\n", + " print(f\"save tweet [{docu['user']['screen_name']}]{docu['id']}\")\n", + " save_tweet(docu)\n", + " save_relate_tweets(docu)\n", + " \n", + "def save_tweet(docu):\n", + " docu = twitter_api_parser(docu)\n", + " tweets.update_one(\n", + " {'id': docu['id']},\n", + " {'$set': docu},\n", + " upsert=True\n", + " )\n", + "\n", + "def download_relate_tweets():\n", + " for tweet in tweets.find(no_cursor_timeout=True):\n", + " save_relate_tweets(tweet)\n", + "\n", + " \n", + "download_relate_tweets()\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/py35/typing.ipynb b/py3/typing.ipynb similarity index 100% rename from py35/typing.ipynb rename to py3/typing.ipynb diff --git a/py34/unittest/app.py b/py3/unittest/app.py similarity index 100% rename from py34/unittest/app.py rename to py3/unittest/app.py diff --git a/py3/unittest/tests/test_fixtures.py b/py3/unittest/tests/test_fixtures.py new file mode 100644 index 00000000..e69de29b diff --git a/py34/unittest/tests/test_simple.py b/py3/unittest/tests/test_simple.py similarity index 100% rename from py34/unittest/tests/test_simple.py rename to py3/unittest/tests/test_simple.py diff --git a/py3/utf-fp.txt b/py3/utf-fp.txt new file mode 100644 index 00000000..d800886d --- /dev/null +++ b/py3/utf-fp.txt @@ -0,0 +1 @@ +123 \ No newline at end of file diff --git a/py36/variables.ipynb b/py3/variables.ipynb similarity index 100% rename from py36/variables.ipynb rename to py3/variables.ipynb diff --git a/py35/web_bench/test_aiohttp.py b/py3/web_bench/test_aiohttp.py similarity index 100% rename from py35/web_bench/test_aiohttp.py rename to py3/web_bench/test_aiohttp.py diff --git a/py35/web_bench/test_flask.py b/py3/web_bench/test_flask.py similarity index 100% rename from py35/web_bench/test_flask.py rename to py3/web_bench/test_flask.py diff --git a/py35/web_bench/test_flaskmeinheld.py b/py3/web_bench/test_flaskmeinheld.py similarity index 100% rename from py35/web_bench/test_flaskmeinheld.py rename to py3/web_bench/test_flaskmeinheld.py diff --git a/py35/web_bench/test_meinheld.py b/py3/web_bench/test_meinheld.py similarity index 100% rename from py35/web_bench/test_meinheld.py rename to py3/web_bench/test_meinheld.py diff --git a/py35/web_bench/test_sanic.py b/py3/web_bench/test_sanic.py similarity index 100% rename from py35/web_bench/test_sanic.py rename to py3/web_bench/test_sanic.py diff --git a/py35/web_bench/test_tornado.py b/py3/web_bench/test_tornado.py similarity index 100% rename from py35/web_bench/test_tornado.py rename to py3/web_bench/test_tornado.py diff --git a/py36/webp.ipynb b/py3/webp.ipynb similarity index 100% rename from py36/webp.ipynb rename to py3/webp.ipynb diff --git a/py35/zipapp.ipynb b/py3/zipapp.ipynb similarity index 100% rename from py35/zipapp.ipynb rename to py3/zipapp.ipynb diff --git a/py34/README.md b/py34/README.md deleted file mode 100644 index 577d2ab9..00000000 --- a/py34/README.md +++ /dev/null @@ -1,6 +0,0 @@ -Fun in Python3.x ---- - -Python 是门好语言 - -写过篇介绍文:https://blog.laisky.com/p/whats-new-in-python3-4/ diff --git a/py35/README.md b/py35/README.md deleted file mode 100644 index b04ef6f2..00000000 --- a/py35/README.md +++ /dev/null @@ -1,7 +0,0 @@ -与时俱进 Python 3.5 -=== - -## Reference - - - [What’s New In Python 3.5](https://docs.python.org/3.5/whatsnew/3.5.html) - - 写过篇介绍:https://blog.laisky.com/p/whats-new-in-python3-5/ diff --git a/py35/requirements.txt b/py35/requirements.txt deleted file mode 100644 index 6ff4269b..00000000 --- a/py35/requirements.txt +++ /dev/null @@ -1,35 +0,0 @@ -ipython - -# crawler -selenium -lxml -pyquery -pyspider - -# profile -vprof -line_profiler -memory_profiler -pytest-benchmark -pprofile - -celery - -jieba -pymongo - -# web -gunicorn -aiohttp -meinheld -tornado -sanic - -# syntax -mypy-lang - -# test -ipdb - -# time -arrow diff --git a/py36/README.md b/py36/README.md deleted file mode 100644 index 03424b65..00000000 --- a/py36/README.md +++ /dev/null @@ -1,6 +0,0 @@ -Python 3.6 -=== - -Embrace Asynchronous - -写过篇博文:https://blog.laisky.com/p/whats-new-in-python3-6/ diff --git a/py36/requirements.txt b/py36/requirements.txt deleted file mode 100644 index e853d5d2..00000000 --- a/py36/requirements.txt +++ /dev/null @@ -1,17 +0,0 @@ -ipython[all] - -# time -maya -pytz - -# image -pillow - -# framework -japronto - -# aws -aiobotocore - -# markdown -markdown2 diff --git a/rpm/src/go.mod b/rpm/src/go.mod new file mode 100644 index 00000000..ec4cee23 --- /dev/null +++ b/rpm/src/go.mod @@ -0,0 +1,3 @@ +module github.com/Laisky/test + +go 1.14 diff --git a/rpm/src/main.go b/rpm/src/main.go new file mode 100644 index 00000000..d8fa9292 --- /dev/null +++ b/rpm/src/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("hello") +} diff --git a/rpm/src/test b/rpm/src/test new file mode 100755 index 00000000..7b0df9fb Binary files /dev/null and b/rpm/src/test differ diff --git a/rpm/test.spec b/rpm/test.spec new file mode 100644 index 00000000..9c6ae2d2 --- /dev/null +++ b/rpm/test.spec @@ -0,0 +1,77 @@ +Name: rpm-test +Version: 1.0.5 +Release: 1 +Summary: Most simple RPM package +License: FIXME + +%description +Test RPM + +# %prep +# # %setup -q -n %{name}-%{version} +# echo "pwd $PWD" +# echo "env $ENV" +# echo "RPM_BUILD_ROOT $RPM_BUILD_ROOT" + +# %build +# # go build -a --ldflags '-extldflags "-static"' ./SOURCE/ +# echo "pwd $PWD" +# echo "env $ENV" +# echo "RPM_BUILD_ROOT $RPM_BUILD_ROOT" + +# ls -aFl + +%install +# [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT + +# make DESTDIR=$RPM_BUILD_ROOT install +# rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name} + +# echo "install" +# mv $RPM_BUILD_ROOT/test /usr/bin/. +# chmod +x /usr/bin/test +# /usr/bin/test + +echo "buildroot: %{buildroot}" + +mkdir -p %{buildroot}/usr/bin/ +mkdir -p %{buildroot}/usr/local/testdata + +install -m 755 test %{buildroot}/usr/bin/rpm-test +install -d -m 755 data %{buildroot}/usr/local/testdata/ +# install -m 440 test %{buildroot}/usr/bin/112 +# install -m 440 test %{buildroot}/usr/bin/113 +# install -m 440 test %{buildroot}/usr/bin/114 + +%clean + +# echo "install" +# $RPM_BUILD_ROOT/test + + +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT + +%files + +/usr/bin/rpm-test +/usr/local/testdata +# /usr/bin/111 +# /usr/bin/112 +# /usr/bin/113 +# /usr/bin/114 + + +# %defattr(-,root,root) +# %doc README AUTHORS COPYING NEWS TODO ChangeLog +# %doc doc/*.html +# %doc doc/*.jpg +# %doc doc/*.css +# %config(noreplace) /etc/%{name}.xml +# %{_bindir}/icecast +# %{_prefix}/share/icecast/* + +%changelog + +* Tue Jan 24 2012 Laisky + +yahoo diff --git a/spring/simpleapp/jvm-service/.settings/org.eclipse.buildship.core.prefs b/spring/simpleapp/jvm-service/.settings/org.eclipse.buildship.core.prefs index 03dfab77..e8895216 100644 --- a/spring/simpleapp/jvm-service/.settings/org.eclipse.buildship.core.prefs +++ b/spring/simpleapp/jvm-service/.settings/org.eclipse.buildship.core.prefs @@ -1,2 +1,2 @@ -#Thu Apr 12 08:59:17 CST 2018 connection.project.dir= +eclipse.preferences.version=1 diff --git a/utils/google-slides/yarn.lock b/utils/google-slides/yarn.lock index 00309c3f..66a96e2c 100644 --- a/utils/google-slides/yarn.lock +++ b/utils/google-slides/yarn.lock @@ -1,5 +1,7 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 + + abbrev@1: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" @@ -31,8 +33,10 @@ asap@~2.0.3: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.5.tgz#522765b50c3510490e52d7dcfe085ef9ba96958f" asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + dependencies: + safer-buffer "~2.1.0" assert-plus@^0.2.0: version "0.2.0" @@ -83,7 +87,7 @@ babel-runtime@^6.9.1: core-js "^2.4.0" regenerator-runtime "^0.10.0" -base64url@^2.0.0, base64url@2.0.0: +base64url@2.0.0, base64url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb" @@ -99,8 +103,8 @@ base64url@~1.0.4: meow "~2.0.0" bcrypt-pbkdf@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" dependencies: tweetnacl "^0.14.3" @@ -130,7 +134,7 @@ boom@2.x.x: dependencies: hoek "2.x.x" -buffer-equal-constant-time@^1.0.1, buffer-equal-constant-time@1.0.1: +buffer-equal-constant-time@1.0.1, buffer-equal-constant-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" @@ -180,8 +184,8 @@ commander@^2.9.0: graceful-readlink ">= 1.0.0" concat-stream@~1.4.7: - version "1.4.10" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.4.10.tgz#acc3bbf5602cb8cc980c6ac840fa7d8603e3ef36" + version "1.4.11" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.4.11.tgz#1dc9f666f2621da9c618b1e7f8f3b2ff70b5f76f" dependencies: inherits "~2.0.1" readable-stream "~1.1.9" @@ -216,7 +220,7 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -debug@^2.2.0, debug@2: +debug@2, debug@^2.2.0: version "2.5.1" resolved "https://registry.yarnpkg.com/debug/-/debug-2.5.1.tgz#9107bb4a506052ec2a02314bc606313ed2b921c1" dependencies: @@ -227,12 +231,13 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" dependencies: jsbn "~0.1.0" + safer-buffer "^2.1.0" -ecdsa-sig-formatter@^1.0.0, ecdsa-sig-formatter@1.0.9: +ecdsa-sig-formatter@1.0.9, ecdsa-sig-formatter@^1.0.0: version "1.0.9" resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz#4bc926274ec3b5abb5016e7e1d60921ac262b2a1" dependencies: @@ -307,8 +312,8 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" getpass@^0.1.1: - version "0.1.6" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" dependencies: assert-plus "^1.0.0" @@ -438,14 +443,14 @@ is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -454,15 +459,9 @@ jju@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jju/-/jju-1.3.0.tgz#dadd9ef01924bc728b03f2f7979bdbd62f7a2aaa" -jodid25519@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" - dependencies: - jsbn "~0.1.0" - jsbn@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" json-parse-helpfulerror@^1.0.3: version "1.0.3" @@ -668,14 +667,14 @@ mime@^1.2.11: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" -minimist@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" +minimist@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -891,6 +890,10 @@ safe-buffer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" +safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" @@ -921,18 +924,17 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0" + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" ecc-jsbn "~0.1.1" - jodid25519 "^1.0.0" + getpass "^0.1.1" jsbn "~0.1.0" + safer-buffer "^2.0.2" tweetnacl "~0.14.0" steno@^0.4.1: @@ -947,10 +949,6 @@ stream-parser@~0.3.1: dependencies: debug "2" -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - string-template@~0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" @@ -959,6 +957,10 @@ string-template@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/string-template/-/string-template-1.0.0.tgz#9e9f2233dc00f218718ec379a28a5673ecca8b96" +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -1020,4 +1022,3 @@ verror@1.3.6: xtend@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" -