diff --git a/adata/__version__.py b/adata/__version__.py index 40c6a3e..5a37300 100644 --- a/adata/__version__.py +++ b/adata/__version__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -VERSION = (2, 4, 0) +VERSION = (2, 4, 1) PRERELEASE = None # alpha, beta or rc REVISION = None diff --git a/adata/common/headers/baidu_headers.py b/adata/common/headers/baidu_headers.py index cc1e89d..cb82ab8 100644 --- a/adata/common/headers/baidu_headers.py +++ b/adata/common/headers/baidu_headers.py @@ -5,6 +5,7 @@ @time: 2023/3/29 @log: change log """ +cookie = 'BAIDUID=FB17C036F6F79E647798CCDBF10D0A3A:FG=1; BIDUPSID=72A958B07427F9F9CB3F63FD8B6C6565; PSTM=1721131010; BA_HECTOR=21252ka18l04ah0g0k8k84a4brl9d31j9co021u; ZFY=RDRljN0vytzynS1BEIuC:A79HiL:AOmQZYkiXI4VbDvTo:C; ab_sr=1.0.1_ZDg2NTdmYTk5MjE3MDhiMzNhMDRiZDQyNzJhOWQwZTcwMDkzMjU2YzFiOTNiNjZlODU1ODcwYTMzMjRlYjVkODlhY2UwZWFkYmM1MmM1MGUxMDVmYWM4YWMyYTdmOWFjN2JiZWQyMjUzMDVkMmNhNzg1ZjIzNjk1ZDlmZjQyZTdmNjkwNjFmMDk0YjEzY2Y1NTkxNzI2ZWQ2NGY3MzEzNw==' json_headers = { 'Host': 'finance.pae.baidu.com', @@ -12,15 +13,11 @@ 'Accept': 'application/vnd.finance-web.v1+json', 'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', 'Accept-Encoding': 'gzip, deflate, br', - 'Acs-Token': '1680073602136_1680187152773_uZ76rU6tKjd6HavzqUwLS+LsRmCm+fagieEZzD622QiLe/Sfrq5cqVY6phLw7Vm/MGvLdp6eJI1R/Egp6PEB4E6agGNB91g61mfdylADtKBaq4zV4ZC/SOfrjh9TxMb6i6WwY5S1WFg/wPK2fPCoCZMkVSTJ704skNglDoLsPm+9RjCM4PJK68GKE7ZG1p13P5iAMk9ndAJ7HZ3FJAnBQCQeI82Q+fAOAtxrXtGf7eAoblBlgX7OaTJD97PIm9zy1yE37KVyfCngWZNp5VwP3OWGU6jCLeeq2vKpg2hS6TkgbUgqom57ZGSlIezfwQ7vltRiGG3cnpoPSBxrfiEXwz5iulsLGeubIzjOj1yYIBPWVYNBhSn7aM0P/dBq0Ug4cf3xmTvUI/GVMq9PXHGqBss1Px0Yl+hiSc1+vbgz7vQ=', + 'Content-Type': 'application/josn', 'Origin': 'https://gushitong.baidu.com', 'Connection': 'keep-alive', 'Referer': 'https://gushitong.baidu.com/', - 'Cookie': 'BAIDUID=054924A85233268C182D09EC253E676F:SL=0:NR=10:FG=1; BIDUPSID=19DB8A6DEBD5A452CE6A10E90276DE7C; PSTM=1572438578; MCITY=-75%3A; BDUSS=V-UmF5S1pXNVd1Um15S0Y1MXc0S20wZ3FGYzhIVjlUZUFoczVvRlVjUTB1dTVnRVFBQUFBJCQAAAAAAAAAAAEAAADIruQqaV~EwdPjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQtx2A0LcdgS3; __yjs_duid=1_0e624b9d24290650971c8590bcfe96361619270097027; ZFY=KxKVSFoJLIz0l23rNHW:AV1udt6Ern2XM0p4sN7:AJdw8:C; H_PS_PSSID=38185_36546_38409_38470_38439_38468_38289_38380_37931_38382_26350_22157_38282_37881; BDRCVFR[feWj1Vr5u3D]=I67x6TjHwwYf0; delPer=0; PSINO=6; BDORZ=B490B5EBF6F3CD402E515D22BCDA1598; ZD_ENTRY=baidu; __bid_n=184332335315a549634207; FPTOKEN=0G8DZh7ruaz1dUnw7eFAGwkkafhUBvTOkCNkScDsJi6ucyCKBDttk2Tv233PFjFcYDQH/nqo0eEZY9g0psSI5FwqsV/lPlXLoPcGR6EQ3I9iV5fhRVGwx/xKTmJ1O7b09GcBwac2qYSO1tDSfR20KFkYKdZihCdiCAHUPhhniaMVTFa/d2JywSFgXh5ksnMGNkQXY0fS8bKzsP/UTJdtSvg8J8WuYoh7g6EDHeXRVlt5t13dTO8A6DMCNOYlxzGLSDomP/3UOsH+T/4iGsNubZL+y3016UY0ehJa8meg2mAq+wS0DdmsJxYao0qTDaAT/5LfNM4j3LoVRAMUYtOzM/9V4ajJfK7atGKQXFSn+VnANgwuvUvfZGCOdF8oMn4N7Jv6jvQ5XocYTAOb7MZJgOocxgPsL5zDGIcXYmUPAxoPn2/9SsgFLR4mxU+D++F9|c5qXUXOqFRs5f/aOsOlP9AY4If8rgdZFdcLJjdaX0Is=|10|3c9b5f41e931d2d8783fbcce14863165; BAIDU_WISE_UID=wapp_1680175629815_954; arialoadData=false; BCLID=8799370053103418941; BCLID_BFESS=8799370053103418941; BDSFRCVID=A1tOJeC62wVF227f5qXouQCuMHnCdsrTH6aoWSjyl4QjjjGKIQ2REG0Pnf8g0KuMn6bMogKKXgOTHw0F_2uxOjjg8UtVJeC6EG0Ptf8g0f5; BDSFRCVID_BFESS=A1tOJeC62wVF227f5qXouQCuMHnCdsrTH6aoWSjyl4QjjjGKIQ2REG0Pnf8g0KuMn6bMogKKXgOTHw0F_2uxOjjg8UtVJeC6EG0Ptf8g0f5; H_BDCLCKID_SF=JnIOoCIMtID3qnFkKJL_-P4DePLD-URZ5mAqot3C3D_KMnLGKq7o5q_d5tc72fJb-5rnaIQqaM36j4T1jhQ8M4I1yPrIJqj43bRTWJLy5KJvfq6kj45YhP-Uyn7MWh37bbRlMKoaMp78jR093JO4y4Ldj4oxJpOJ5JbMonLafJOKHICweMK; H_BDCLCKID_SF_BFESS=JnIOoCIMtID3qnFkKJL_-P4DePLD-URZ5mAqot3C3D_KMnLGKq7o5q_d5tc72fJb-5rnaIQqaM36j4T1jhQ8M4I1yPrIJqj43bRTWJLy5KJvfq6kj45YhP-Uyn7MWh37bbRlMKoaMp78jR093JO4y4Ldj4oxJpOJ5JbMonLafJOKHICweMK', - 'Sec-Fetch-Dest': 'empty', - 'Sec-Fetch-Mode': 'cors', - 'Sec-Fetch-Site': 'same-site', - 'TE': 'trailers', + 'Cookie': cookie } text_headers = { @@ -30,7 +27,7 @@ 'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', - 'Cookie': 'BAIDUID=DC08E09E609EB9778F0574D4518A5507:SL=0:NR=10:FG=1; BIDUPSID=72A958B07427F9F9CB3F63FD8B6C6565; PSTM=1677461180; MCITY=-%3A; BDUSS=toZjl2NTY0NFNwQWVyaUpFREJlSS1NWmVranN5YzdMSXpEcTZkNTRaTjA4amhrSVFBQUFBJCQAAAAAAAAAAAEAAADIruQqaV~EwdPjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHRlEWR0ZRFkN0; H_PS_PSSID=38185_36554_38470_38353_38359_38396_38468_38289_36807_38263_37929_38382_26350_38421_38283_37881; BDSFRCVID=5OPOJexroG07v97fK16bU1LKNeKK0PQTDYrEeU9ooveGPK0Vc8uvEG0PtDQMefIb1DMtogKKXgOTHw0F_2uxOjjg8UtVJeC6EG0Ptf8g0M5; H_BDCLCKID_SF=tJPf_CK5JIL3H48k-4QEbbQH-UnLq-jyBgOZ04n-ah02MI5Y04jBynDv3HQrBM69agQN_hcm3UTdsq76Wh35K5tTQP6rLtJHHG74KKJxbn7EKDjHLP5DDbLehUJiBhvMBan7LKJIXKohJh7FM4tW3J0ZyxomtfQxtNRJ0DnjtpChbC_mjT_hjT3BeU5eetjK2CntsJOOaCv-ht5Oy4oWK441DattaljhMm3P5fKhBpvF8nR_06Jk3M04X-o9-hvT-54e2p3FBUQjq66bQft20b0eMeFD0xJaKJRtWb7jWhviep72ybt2QlRX5q79atTMfNTJ-qcH0KQpsIJM5-DWbT8IjHCHtT-tJRkJ_Dvt-5rDHJTg5DTjhPrMyxCjWMT-MTryKKt5JRTCe4To3JblDfAUX4nQBqDfWHnRhlRNB-3iV-OxDUvnyxAZ-pKLQMQxtNRJWbIEtl5THR_x5tnobUPUWMJ9LUvftgcdot5yBbc8eIna5hjkbfJBQttjQn3hfIkj2CKLtK-WbK_wj6t3-t0_qx5Ka43tHD7yWCvdMU7cOR5Jj65ED5-sbx5hBM3kKaID2pvkbUnDSbIC3MA--t4YKGJeQUJ82TAHhDoD5qcHsq0x0h3We-bQypouQb_H0COMahv95h7xO-0xQlPK5JkgMx6MqpQJQeQ-5KQN3KJmfbL9bT3tjjTXjH8JJ60ttR3MB4bH56rjDnCrjfnmXUI82h5y058fbJKf0qkhJJolhqRoX4ovyT8r0JORXRj45GI8Wb7K5l3mOIJK-T7h5xL1Db3J0pou5CcA3DjgB4boepvoW-Jc3MkWD-jdJJQOBKQB0KnGbUQkeq8CQft20b0EeMtjW6LEK5r2SC_XtKDh3j; Hm_lvt_c8bd3584daa59ca83c2ec1247d343576=1679365029; Hm_lpvt_c8bd3584daa59ca83c2ec1247d343576=1680096200; BDORZ=FFFB88E999055A3F8A630C64834BD6D0; ab_sr=1.0.1_OTVlZTQ5MzFhYTMyY2FjZTY5M2NiYTJjMzUwMTVkNTE0OGM1MzUwMWQzZjk4NTNjMmE5NjJiODM3OGI2MzFlNWFlMDZjOTYzNWIxOTE0MmY2MzI4YjM0OGMwNGFmN2NmNzg1MjA1M2E2ODUwYzFlNmI4NThiZmRlNWJiMmU0NDMwOGI0MDY1ZGRiODNjZWM3ZjY0ZDhlM2VmNjIzYTdlOQ==; BA_HECTOR=24akak252l042g848500208u1i28dic1n; delPer=0; PSINO=7; ZFY=a4MO01qoxt3fSy8GE2fVF3isnJZvFcG4BOxTOLYMkmo:C; BDRCVFR[gltLrB7qNCt]=mk3SLVN4HKm', + 'Cookie': cookie, 'Upgrade-Insecure-Requests': '1', 'Sec-Fetch-Dest': 'document', 'Sec-Fetch-Mode': 'navigate', diff --git a/adata/stock/info/concept/stock_concept_baidu.py b/adata/stock/info/concept/stock_concept_baidu.py index 09e5f03..222fc53 100644 --- a/adata/stock/info/concept/stock_concept_baidu.py +++ b/adata/stock/info/concept/stock_concept_baidu.py @@ -64,4 +64,4 @@ def get_concept_baidu(self, stock_code='000001'): if __name__ == '__main__': - print(StockConceptBaidu().get_concept_baidu(stock_code=["600020", '300059', '300033']).to_string()) + print(StockConceptBaidu().get_concept_baidu(stock_code="600020").to_string())