sina股票接口更新:Kinsoku jikou desu

2022年1月21日以来,新浪股票接口更新后,原来的http://hq.sinajs.cn/list=sh600519接口访问返回403,直接网页访问返回提示“Kinsoku jikou desu!”
本次更新增加了 http_head refer 的验证;
HttpClient调用解决方案如下:
getMethod.setRequestHeader("Referer", "http://finance.sina.com.cn");
增加了RequestHeader的表头参数"Referer"值为:http://finance.sina.com.cn

再次调用成功返回状态码为200,返回值:
var hq_str_sh600519="贵州茅台,2040.000,2038.200,2048.000,2063.000,2040.000,2047.980,2048.000,1743079,3570928372.000,100,2047.980,200,2047.970,100,2047.360,700,2047.340,300,2046.500,919,2048.000,200,2048.010,4000,2048.140,500,2048.630,500,2048.830,2021-12-22,15:00:03,00,";

  • 10
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 15
    评论
您可以使用Python的python-docx模块来设置表格的边框磅数。具体来说,您可以使用Table对象的style属性来设置表格的样式,然后使用TableStyle对象来设置样式的属性,包括边框磅数。 下面是一个例子,展示如何使用python-docx模块来设置表格的边框磅数: ```python from docx import Document from docx.shared import Pt from docx.enum.table import WD_TABLE_ALIGNMENT from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.oxml.ns import qn # 创建一个新的文档 document = Document() # 添加一个表格 table = document.add_table(rows=3, cols=3) # 设置表格的样式 table.style = 'Table Grid' # 获取表格的样式 style = table.style # 设置表格样式的边框磅数 style.font.size = Pt(12) style.font.name = '宋体' style.paragraph_format.alignment = WD_ALIGN_PARAGRAPH.CENTER style.table_alignment = WD_TABLE_ALIGNMENT.CENTER style.borders.top.size = Pt(1) style.borders.bottom.size = Pt(1) style.borders.left.size = Pt(1) style.borders.right.size = Pt(1) style.borders.top.color.rgb = (0, 0, 0) style.borders.bottom.color.rgb = (0, 0, 0) style.borders.left.color.rgb = (0, 0, 0) style.borders.right.color.rgb = (0, 0, 0) style.paragraph_format.space_before = Pt(0) style.paragraph_format.space_after = Pt(0) style.paragraph_format.line_spacing = 1.5 style.paragraph_format.first_line_indent = Pt(0) style.paragraph_format.keep_together = True style.paragraph_format.keep_with_next = True style.paragraph_format.widow_control = True style.paragraph_format.kinsoku = True style.paragraph_format.kinsoku_locale_id = qn('ja-JP') # 保存文档 document.save('table.docx') ``` 在上述代码中,我们首先创建了一个新的文档,然后添加了一个3行3列的表格。接着,我们设置了表格的样式为“Table Grid”,并获取了表格的样式对象。最后,我们使用样式对象的borders属性来设置表格的边框磅数。在这个例子中,我们将表格的边框磅数设置为1磅。 请注意,以上代码仅供参考,您可以根据自己的需求进行修改和定制。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 15
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值