123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- # !/usr/bin/env/python
- # -*- coding:utf-8 -*-
- from flask import Flask, render_template, request
- from datetime import timedelta
- import requests
- from utils.img2latex import get_ocrlatex_by_url
- headers = {'Pragma': 'no-cache', 'Cache-Control': 'no-cache',
- 'X-USER-TOKEN': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyMCIsInVzZXJOYW1lIjoiSFgwMDEyMTM4IiwiZXhwIjoxNTY2Mzg3ODA1LCJ1c2VySWQiOiIyMCIsImlhdCI6MTU2NjM3MzQwNX0.9w__2RGncpdMvbiQAmk75ThgPwDaTXF1VyY1xKVs_zFduUEoJ3_6X2q3ZVYsFIpChKeLEWelhwlmMxEP4lU9QA',
- 'Origin': 'http://xx.cn',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36',
- 'Accept': '*/*',
- # 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundarycDnnz7eKalCPv6GJ',
- 'Referer': '', 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8'}
- url = "http://192.168.1.140:18085/upload"
- import json
- data = {'callback_url': "http://zsytk.dev.xueping.com/wordapi/index/wid/9668",
- "mydata": json.dumps([{"file_type": "", "file_url": "http://zsytk.dev.xueping.com/data/word/2020/08/5f327c08f3576.doc"}],ensure_ascii=False).encode("utf-8")
- }
- # print(requests.Request('POST', url, data=data, json=json).prepare().body.decode(
- # 'ascii')) # 打印字段名和类型
- # r = requests.post(url, data=data, headers=headers)
- # print(r.text)
- #
- # { %
- # for sub in item[2:5] %}
- # { % if "src" in sub %}
- # < img
- # src = "data:;base64,{{ img_stream }}" >
- # { % endif %}
- # { % endfor %}
- import re
- pattern_2 = re.compile(
- r"(([CDE]\s*[..、、]|\([CDE]\)).+?)(?<![::])\s\(([1-9]|1[0-9])\)(.+?([是为有]|等于)[((]\s*[))]\n)")
- w1 = "C.jfg (3)mvm等于()\n"
- # p1=re.search(r"每(小?题|空)[\u4e00-\u9fa5]{,5}(\d[\d.]{,2}\d{,2})分", "二、填空题(每空2分,共8分)")
- # print(p1)
- # p2 = re.findall("([1-9]|[1-4][0-9])[))]?\s*(?=题)", "33题")
- # print(p2)
- #
- # print(list(range(1,2)))
- # print("{0}{1}".format(3,5))
- # def fun1(nn, **kwargs):
- # print(kwargs)
- # print(kwargs['index'])
- # fun1(1, all_type=1, num=2, index=3)
- # print(2==2>3)
- # p1 = re.search("(?<![::..、、])\s+([1-9]|[1-4][0-9])\s*[..、、](?!png)", 'yy 49.png')
- # print(p1)
- # items_str = '\n1.yy22.pn'
- #
- # for no in re.findall(r'\n+\s*([1-9]|[1-4][0-9])\s*[..、、]|(?<![::..、、])\s*([1-9]|[1-4][0-9])\s*[..、、](?!png)', items_str):
- # print(no)
- #
- # con_id_line = [] # 题号的行索引,第几行
- # topicno = [] # 题号序列
- # topicno_line_dict = dict(zip([], [])) # 题号to行索引字典
- # print(len(topicno_line_dict))
- # print("$\\frac")
- #
- # w_info = re.search(' width="(\d+[.\d]*?)\s*([pxt]?)"', ' width="16"')
- # print(w_info.group(1),w_info.group(2))
- #
- # ee = [1,2,3]
- # ee=sorted(ee,reverse=True)
- # print(ee)
- # from PIL import Image
- # local_p = r"F:\zwj\Text_Structure\img_folder\5fc64a514994183dda7e74ea\new_image1624343877418770.png"
- # w = Image.open(local_p)
- # w.close()
- from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor
- #
- # kk = open(r"F:\zwj\parse_online58\res_folder\76736f316fe30323c8ddc51cf2b3f392__2021_08_30_10_15_58__828__1870.json",
- # 'r', encoding='utf-8')
- # con=json.loads(kk.read())
- # item_str = str(con['items'][4])
- # item_str = re.sub('(<img src=".*?".*? data-latex=)"\$.+?\$"',r'\1""', item_str)
- # print(eval(item_str))
- # print('------------------------------------')
- # all_imgs_no_latex = re.findall(r'(<img src="(.*?)".*? data-latex="\$?\s*\$?")', item_str)
- # if all_imgs_no_latex:
- # imgurl_no_latex = [k[1] for k in all_imgs_no_latex]
- # imgurl_no_latex = list(set(imgurl_no_latex))
- # print(imgurl_no_latex)
- # print('--------------------------------')
- # # mathpixs = []
- # # if len(imgurl_no_latex) <= 20:
- # # mathpixs.extend([get_ocrlatex_by_url(i) for i in imgurl_no_latex])
- # # else:
- # # if len(imgurl_no_latex) <= 50:
- # # executor = ThreadPoolExecutor(max_workers=2) # 开2个线程会稍微快点
- # # else:
- # # executor = ThreadPoolExecutor(max_workers=4)
- # # for data in executor.map(get_ocrlatex_by_url, imgurl_no_latex):
- # # mathpixs.append(data)
- # mathpixs = [' 1: 1 ', ' b ', ')', ' 1: 1 ', '', ' a^{2}: b^{2} ', '(', 'R _ { 1 } = \\frac { p h } { a ^ { 2 } }', 'R _ { 2 } = \\frac { p b } { b h } = \\frac { p } { h }', ' a: b ', ' h ', ' R_{1}: R_{2}=b^{2}: a^{2} ', ' R_{2}=\\frac{\\rho h}{b^{2}} ', ' a: b ', ' a ']
- #
- # def sub1(ss):
- # new_ss = ss.group(1) + ' data-type="math-ocr" ocr-latex="$'+mathpixs[mi]+'$"'+ss.group(2)
- # return new_ss.replace(' data-type="math"', "")
- # # r'\1 ocr-latex="${}$"'.format(mathpixs[mi])
- # for mi, m in enumerate(imgurl_no_latex):
- # # item_str = re.sub(r'(<img src="' + m + r'".*?) data-latex="\$?\s*\$?"',
- # # sub1, item_str)
- # if mathpixs[mi]:
- # item_str = re.sub(r'(<img src="{}".*?) data-latex="\$?\s*\$?"(.*?(?<=")\s*/?>)'.format(m),
- # sub1, item_str)
- #
- # items_list = eval(item_str)
- # print(items_list)
- # 入库时将latex替换为图片测试
- from pprint import pprint
- ltx2url = {"\\begin{array}{cccccccc}& \\text{CO}& \\text{+}& {\\text{H}}_{\\text{2}}\\text{S}& \\stackrel{}{⇌}& \\text{COS}& \\text{+}& {\\text{H}}_{\\text{2}}\\\\ 开始\\text{/mol}& \\text{a}& & \\text{a}& & \\text{0}& & \\text{0}\\\\ 转化\\text{/mol}& \\text{x}& & \\text{x}& & \\text{x}& & \\text{x}\\\\ 平衡\\text{/mol}& \\text{a-x}& & \\text{a-x}& & \\text{x}& & \\text{x}\\end{array}": "<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146164642.png\" width=\"293.5\" height=\"87.5\" data-latex=\"$\\begin{array}{cccccccc}& \\text{CO}& \\text{+}& {\\text{H}}_{\\text{2}}\\text{S}& \\stackrel{}{⇌}& \\text{COS}& \\text{+}& {\\text{H}}_{\\text{2}}\\\\ 开始\\text{/mol}& \\text{a}& & \\text{a}& & \\text{0}& & \\text{0}\\\\ 转化\\text{/mol}& \\text{x}& & \\text{x}& & \\text{x}& & \\text{x}\\\\ 平衡\\text{/mol}& \\text{a-x}& & \\text{a-x}& & \\text{x}& & \\text{x}\\end{array}$\" />",}
- def sub2(s):
- if s:
- all_ltx = re.findall(r'\$.*?\$', s) # 查找试题结构中的公式
- all_ltx.extend(re.findall('\\\\\(.*?\\\\\)', s))
- all_ltx = list(set(all_ltx))
- for ltx in all_ltx:
- new_ltx = ltx.replace("$", "").replace("\\(", "").replace("\\)", "").replace("&", "&")
- if new_ltx in ltx2url: # 将latex换为其渲染图片的线上可访问地址
- s = s.replace(ltx, ltx2url[new_ltx])
- return s
- items_res_to_xbk = [
- {"repeat_res": [],
- "topic_type_id": 40,
- "stem": "含硫废气的处理越来越成为化工生产等领域的重要课题。回答下列问题:<br/>Ⅰ.CO可将工业尾气中的<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146482015.png\" width=\"26.0\" height=\"14.5\" data-latex=\"${\\text{H}}_{2}\\text{S}$\" />转化为化工原料羰基硫(COS):<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146530797.png\" width=\"240.5\" height=\"20.5\" data-latex=\"${\\text{CO(g)+H}}_{\\text{2}}\\text{S(g)}\\stackrel{}{⇌}{\\text{COS(g)+H}}_{\\text{2}}\\text{(g)}\\text{ }\\text{ΔH}$\" />。<br/>(1)恒温恒容条件下,密闭容器中发生上述反应,下列事实不能说明反应达到平衡状态的是_______(填序号)。<br/>a.<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146716339.png\" width=\"111.0\" height=\"19.5\" data-latex=\"${\\text{v}}_{\\text{正}}{\\text{(CO)=v}}_{\\text{正}}\\left({\\text{H}}_{\\text{2}}\\right)$\" /><br/>b.COS和<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146675305.png\" width=\"17.5\" height=\"14.5\" data-latex=\"${\\text{H}}_{2}$\" />的浓度之和保持不变<br/>c.混合气体的平均相对分子质量不变<br/>d.单位时间内断裂<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146920796.png\" width=\"36.0\" height=\"13.5\" data-latex=\"$\\text{H}-\\text{S}$\" />键与断裂<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/image187.png\" width=\"30px\" height=\"14px\" data-type=\"math\" data-latex=\"$$\">键数目相等<br/>(2)T℃时,在恒容的密闭容器中充入等物质的量CO和<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146482015.png\" width=\"26.0\" height=\"14.5\" data-latex=\"${\\text{H}}_{2}\\text{S}$\" />发生反应,实验测得反应前容器内压强为<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146672571.png\" width=\"39.5\" height=\"16.5\" data-latex=\"${\\text{p}}_{\\text{0}}\\text{kPa}$\" />,10min达到平衡时<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146675305.png\" width=\"17.5\" height=\"14.5\" data-latex=\"${\\text{H}}_{2}$\" />的分压为<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146310577.png\" width=\"39.5\" height=\"15.5\" data-latex=\"${\\text{p}}_{\\text{1}}\\text{kPa}$\" />。<br/>①CO的平衡转化率为_______(用含<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146661244.png\" width=\"14.5\" height=\"12.5\" data-latex=\"${\\text{p}}_{\\text{0}}$\" />、<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146698360.png\" width=\"14.5\" height=\"12.5\" data-latex=\"${\\text{p}}_{\\text{1}}$\" />的代数式表示),<br/>②该反应的平衡常数<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146139140.png\" width=\"30.0\" height=\"16.5\" data-latex=\"${\\text{K}}_{\\text{p}}\\text{=}$\" />_______(用含<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146661244.png\" width=\"14.5\" height=\"12.5\" data-latex=\"${\\text{p}}_{\\text{0}}$\" />、<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146698360.png\" width=\"14.5\" height=\"12.5\" data-latex=\"${\\text{p}}_{\\text{1}}$\" />的代数式表示,列出表达式即可)。<br/>(3)在某密闭容器中,以一定投料比进行上述反应,相同时间内<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146482015.png\" width=\"26.0\" height=\"14.5\" data-latex=\"${\\text{H}}_{2}\\text{S}$\" />的转化率与温度(T)的关系如图所示,<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146464435.png\" width=\"22.5\" height=\"13.5\" data-latex=\"$\\text{ΔH}$\" />_______(填“>”或“<”)0,其原因是_______。<br/><img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/image194.png\" width=\"156px\" height=\"124px\"><br/>Ⅱ.工业尾气中的<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806145613125.png\" width=\"26.0\" height=\"14.5\" data-latex=\"${\\text{SO}}_{2}$\" />是环境污染的主要原因之一,工业上可采用钙基固硫法或电解法降低尾气中的含硫量。<br/>(4)已知:<br/>a.<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146475676.png\" width=\"201.0\" height=\"17.5\" data-latex=\"$\\text{CaO}\\left(\\text{s}\\right)+{\\text{CO}}_{2}\\left(\\text{g}\\right)={\\text{CaCO}}_{3}\\left(\\text{s}\\right)$\" /><img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146423692.png\" width=\"148.5\" height=\"17.5\" data-latex=\"$\\text{ΔH=}-178.3\\text{kJ}\\cdot {\\text{mol}}^{-1}$\" /><br/>b.<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146176891.png\" width=\"365.5\" height=\"17.5\" data-latex=\"$2{\\text{CaCO}}_{3}\\left(\\text{s}\\right)+2{\\text{SO}}_{2}\\left(\\text{g}\\right)+{\\text{O}}_{2}\\left(\\text{g}\\right)=2{\\text{CaSO}}_{4}\\left(\\text{s}\\right)+2{\\text{CO}}_{2}\\left(\\text{g}\\right)$\" /><img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146792016.png\" width=\"156.0\" height=\"17.5\" data-latex=\"$\\text{ΔH=}-2762.2\\text{kJ}\\cdot {\\text{mol}}^{-1}$\" /><br/>c.<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146273320.png\" width=\"216.5\" height=\"17.5\" data-latex=\"$2{\\text{CaSO}}_{3}\\left(\\text{s}\\right)+{\\text{O}}_{2}\\left(\\text{g}\\right)=2{\\text{CaSO}}_{4}\\left(\\text{s}\\right)$\" /><img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146340678.png\" width=\"156.0\" height=\"17.5\" data-latex=\"$\\text{ΔH=}-2314.8\\text{kJ}\\cdot {\\text{mol}}^{-1}$\" /><br/>则<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146990429.png\" width=\"195.5\" height=\"17.5\" data-latex=\"$\\text{CaO}\\left(\\text{s}\\right)+{\\text{SO}}_{2}\\left(\\text{g}\\right)={\\text{CaSO}}_{3}\\left(\\text{s}\\right)$\" /><img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146895880.png\" width=\"34.0\" height=\"13.5\" data-latex=\"$\\text{ΔH=}$\" />_______。在一定温度下,该反应达到平衡时向容器中通入少量<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806145613125.png\" width=\"26.0\" height=\"14.5\" data-latex=\"${\\text{SO}}_{2}$\" />,则反应再次达到平衡时<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146856073.png\" width=\"45.5\" height=\"17.5\" data-latex=\"$\\text{c}\\left({\\text{SO}}_{\\text{2}}\\right)$\" />将_______(填“增大”“减小”或“不变”)。<br/>(5)利用如图所示装置可吸收工业尾气中的<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806145613125.png\" width=\"26.0\" height=\"14.5\" data-latex=\"${\\text{SO}}_{2}$\" />,同时还可吸收尾气中的NO。电解池中膜c为_______(填“阴”或“阳”)离子交换膜,阴极的电极反应为_______,当利用此装置吸收标准状况下2.24LNO时,阳极区溶液质量变化量为_______。<br/><img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/image204.png\" width=\"243px\" height=\"111px\">",
- "key": "(1)acd<br/>(2) <img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146744789.png\" width=\"60.0\" height=\"25.0\" data-latex=\"$\\frac{{\\text{2p}}_{\\text{1}}}{{\\text{p}}_{\\text{0}}}×100%$\" /> <img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146629454.png\" width=\"50.0\" height=\"39.5\" data-latex=\"$\\frac{{\\text{p}}_{\\text{1}}^{\\text{2}}}{{\\left(\\frac{{\\text{p}}_{\\text{0}}}{\\text{2}}{\\text{-p}}_{\\text{1}}\\right)}^{\\text{2}}}$\" /><br/>(3) < 反应达平衡后,温度升高,<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146482015.png\" width=\"26.0\" height=\"14.5\" data-latex=\"${\\text{H}}_{2}\\text{S}$\" />的转化率降低,升温平衡逆向移动,故正反应方向为放热反应<br/>(4) -402kJ/mol 不变<br/>(5) 阳 <img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146203698.png\" width=\"246.5\" height=\"19.5\" data-latex=\"$2{\\text{HSO}}_{3}^{-}+2{\\text{e}}^{-}+2{\\text{H}}^{+}={\\text{S}}_{2}{\\text{O}}_{4}^{2-}+2{\\text{H}}_{2}\\text{O}$\" /> 6.2g",
- "parse": "(1)a.任意时刻均有<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146716339.png\" width=\"111.0\" height=\"19.5\" data-latex=\"${\\text{v}}_{\\text{正}}{\\text{(CO)=v}}_{\\text{正}}\\left({\\text{H}}_{\\text{2}}\\right)$\" />,反应不一定达到了平衡,a符合题意;<br/>b.COS和<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146675305.png\" width=\"17.5\" height=\"14.5\" data-latex=\"${\\text{H}}_{2}$\" />的浓度之和保持不变,说明正逆反应速率相等,达到了平衡,b不符合题意;<br/>c.反应物生成物都是气体,质量守恒不变,气体的物质的量不变,故混合气体的平均相对分子质量永远不变,故混合气体的平均相对分子质量不变不一定达到了平衡,c符合题意;<br/>d.反应达到平衡时,单位时间内断裂2个<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146920796.png\" width=\"36.0\" height=\"13.5\" data-latex=\"$\\text{H}-\\text{S}$\" />键同时断裂1个<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146590734.png\" width=\"41.5\" height=\"12.5\" data-latex=\"$\\text{C}=\\text{O}$\" />,故断裂<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146920796.png\" width=\"36.0\" height=\"13.5\" data-latex=\"$\\text{H}-\\text{S}$\" />键与断裂<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146590734.png\" width=\"41.5\" height=\"12.5\" data-latex=\"$\\text{C}=\\text{O}$\" />键数目相等时,没有达到了平衡,d符合题意;<br/>答案选acd;<br/>(2)根据题意,设初始的CO的物质的量为amol,转化了xmol,可得$\\begin{array}{cccccccc}& \\text{CO}& \\text{+}& {\\text{H}}_{\\text{2}}\\text{S}& \\stackrel{}{⇌}& \\text{COS}& \\text{+}& {\\text{H}}_{\\text{2}}\\\\ 开始\\text{/mol}& \\text{a}& & \\text{a}& & \\text{0}& & \\text{0}\\\\ 转化\\text{/mol}& \\text{x}& & \\text{x}& & \\text{x}& & \\text{x}\\\\ 平衡\\text{/mol}& \\text{a-x}& & \\text{a-x}& & \\text{x}& & \\text{x}\\end{array}$<br/>测得反应前容器内压强为<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146672571.png\" width=\"39.5\" height=\"16.5\" data-latex=\"${\\text{p}}_{\\text{0}}\\text{kPa}$\" />,10min达到平衡时<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146675305.png\" width=\"17.5\" height=\"14.5\" data-latex=\"${\\text{H}}_{2}$\" />的分压为<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146310577.png\" width=\"39.5\" height=\"15.5\" data-latex=\"${\\text{p}}_{\\text{1}}\\text{kPa}$\" />,则P<sub>0</sub><img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146129186.png\" width=\"15.5\" height=\"18.5\" data-latex=\"$\\frac{\\text{x}}{\\text{2a}}$\" />=P<sub>1</sub>,<br/>①CO的平衡转化率为<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146613037.png\" width=\"10.0\" height=\"17.5\" data-latex=\"$\\frac{\\text{x}}{\\text{a}}$\" />×100%=<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146744789.png\" width=\"60.0\" height=\"25.0\" data-latex=\"$\\frac{{\\text{2p}}_{\\text{1}}}{{\\text{p}}_{\\text{0}}}×100%$\" />;<br/>②该反应的平衡常数<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146711255.png\" width=\"100.0\" height=\"35.0\" data-latex=\"${\\text{K}}_{\\text{p}}\\text{=}\\frac{\\frac{\\mathrm{x}}{2\\mathrm{a}}{\\text{p}}_{0}×\\frac{\\mathrm{x}}{2\\mathrm{a}}{\\mathrm{p}}_{0}}{\\frac{\\mathrm{a}-\\mathrm{x}}{2\\mathrm{a}}{\\text{p}}_{0}×\\frac{\\mathrm{a}-\\mathrm{x}}{2\\mathrm{a}}{\\mathrm{p}}_{0}}$\" />=<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146629454.png\" width=\"50.0\" height=\"39.5\" data-latex=\"$\\frac{{\\text{p}}_{\\text{1}}^{\\text{2}}}{{\\left(\\frac{{\\text{p}}_{\\text{0}}}{\\text{2}}{\\text{-p}}_{\\text{1}}\\right)}^{\\text{2}}}$\" />;<br/>(3)反应达平衡后,温度升高,<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146482015.png\" width=\"26.0\" height=\"14.5\" data-latex=\"${\\text{H}}_{2}\\text{S}$\" />的转化率降低,升温平衡逆向移动,故正反应方向为放热反应。<br/>(4)已知:<br/>a.<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146475676.png\" width=\"201.0\" height=\"17.5\" data-latex=\"$\\text{CaO}\\left(\\text{s}\\right)+{\\text{CO}}_{2}\\left(\\text{g}\\right)={\\text{CaCO}}_{3}\\left(\\text{s}\\right)$\" /><img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146423692.png\" width=\"148.5\" height=\"17.5\" data-latex=\"$\\text{ΔH=}-178.3\\text{kJ}\\cdot {\\text{mol}}^{-1}$\" /><br/>b.<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146176891.png\" width=\"365.5\" height=\"17.5\" data-latex=\"$2{\\text{CaCO}}_{3}\\left(\\text{s}\\right)+2{\\text{SO}}_{2}\\left(\\text{g}\\right)+{\\text{O}}_{2}\\left(\\text{g}\\right)=2{\\text{CaSO}}_{4}\\left(\\text{s}\\right)+2{\\text{CO}}_{2}\\left(\\text{g}\\right)$\" /><img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146792016.png\" width=\"156.0\" height=\"17.5\" data-latex=\"$\\text{ΔH=}-2762.2\\text{kJ}\\cdot {\\text{mol}}^{-1}$\" /><br/>c.<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146273320.png\" width=\"216.5\" height=\"17.5\" data-latex=\"$2{\\text{CaSO}}_{3}\\left(\\text{s}\\right)+{\\text{O}}_{2}\\left(\\text{g}\\right)=2{\\text{CaSO}}_{4}\\left(\\text{s}\\right)$\" /><img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146340678.png\" width=\"156.0\" height=\"17.5\" data-latex=\"$\\text{ΔH=}-2314.8\\text{kJ}\\cdot {\\text{mol}}^{-1}$\" />根据盖斯定律(b-c)/2+a即得到CaO(s)与SO<sub>2</sub>(g)反应生成CaSO<sub>3</sub>(s)的热化学方程式<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146990429.png\" width=\"195.5\" height=\"17.5\" data-latex=\"$\\text{CaO}\\left(\\text{s}\\right)+{\\text{SO}}_{2}\\left(\\text{g}\\right)={\\text{CaSO}}_{3}\\left(\\text{s}\\right)$\" /><img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146895880.png\" width=\"34.0\" height=\"13.5\" data-latex=\"$\\text{ΔH=}$\" />-402kJ/mol;<br/>(5)b电极为H<sub>2</sub>O放电生成O<sub>2</sub>与H<sup>+</sup>,稀硫酸进入生成了浓硫酸,故电解池中膜c为阳离子交换膜;阴极得到电子发生还原反应,根据图可知是HSO<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146412419.png\" width=\"9.0\" height=\"18.5\" data-latex=\"${}_{3}^{-}$\" />在酸性条件下发生还原反应,生成S<sub>2</sub>O<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146227735.png\" width=\"14.5\" height=\"19.5\" data-latex=\"${}_{4}^{2-}$\" />,其电极反应式为<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146203698.png\" width=\"246.5\" height=\"19.5\" data-latex=\"$2{\\text{HSO}}_{3}^{-}+2{\\text{e}}^{-}+2{\\text{H}}^{+}={\\text{S}}_{2}{\\text{O}}_{4}^{2-}+2{\\text{H}}_{2}\\text{O}$\" />;根据图示,吸收池中S<sub>2</sub>O<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146227735.png\" width=\"14.5\" height=\"19.5\" data-latex=\"${}_{4}^{2-}$\" />和NO是反应物,N<sub>2</sub>和HSO<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146412419.png\" width=\"9.0\" height=\"18.5\" data-latex=\"${}_{3}^{-}$\" />是生成物,则吸收池中除去NO的原理是2NO+2S<sub>2</sub>O<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146227735.png\" width=\"14.5\" height=\"19.5\" data-latex=\"${}_{4}^{2-}$\" />+2H<sub>2</sub>O=N<sub>2</sub>+4HSO<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146412419.png\" width=\"9.0\" height=\"18.5\" data-latex=\"${}_{3}^{-}$\" />,标准状况下2.24LNO即0.1molNO时,需要0.1molS<sub>2</sub>O<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6221c7e9a7d375f4518b99b5/MJMATH-1646806146227735.png\" width=\"14.5\" height=\"19.5\" data-latex=\"${}_{4}^{2-}$\" />,则转移0.2mol电子,根据反应2SO<sub>2</sub>+O<sub>2</sub>=2SO<sub>3</sub>,阳极吸收0.1molSO<sub>2</sub>,质量增加为0.1mol×64g/mol=6.4g,通过阳离子交换膜的H<sup>+</sup>为0.2mol,质量减少0.2mol×1g/mol=0.2g,阳极区溶液质量变化量为6.4g-0.2g=6.2g。<br/>"}
- ]
- for one_items in items_res_to_xbk:
- keys_items = ["stem", "key", "parse", "analysis", "options"]
- # if one_items['img_status'] == 1 and ("stem_img" in one_items and one_items["stem_img"].strip()):
- # keys_items = ["stem_img", "key_img", "parse_img", "options_img"]
- for k in keys_items:
- if k in one_items:
- if k == "options":
- one_items[k] = list(map(sub2, one_items[k]))
- else:
- one_items[k] = sub2(one_items[k])
- # pprint(items_res_to_xbk[0])
- # ^(\s*<imgsrc.*?[/\"]>\s*)+?(参考|考试|试[题卷]|物理|理综|数学|化学|生物)(答案|解析|答案[及与和]评分(标准|意见|细则))\s*$'
- # r'|^(\s*<imgsrc.*?[/\"]>\s*)+?评分标准'
- print(99999999999999)
- # ss1 = r"<imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/>第Ⅱ卷非选择题,共分"
- # ss = "<imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/><imgsrcw_h=*/>第Ⅱ卷非选择题,共分"
- # if re.search(r'^(\s*<imgsrcw_h=[^/\"]*?(data-latex=.*?)?[/\"]>\s*)+?(?=errr)',ss1):
- # print(222222222222222222)
- bb = """
- 一列简谐横波沿直线传播, 该直线上的 a、b 两点相距 4.42 m. 图中实、虚两条曲线分 别表示平衡位置在 a、b 两点处质点的振动曲线.从图示可知( )
- A.此列波的频率一定是 10Hz
- B.此列波的波长一定是 0.1m
- C.此列波的传播速度可能是 34 m/s
- D .a 点一定比b 点距波源近
- <imgsrc37 w_h=1*6/><imgsrc38 w_h=133*197/><imgsrc39 w_h=11*13/><imgsrc40 w_h=12*13/><imgsrc41 w_h=11*13/><imgsrc42 w_h=97*49/><imgsrc43 w_h=28*4/><imgsrc44 w_h=10*11/><imgsrc45 w_h=12*13/><imgsrc46 w_h=2*7/><imgsrc47 w_h=17*15/><imgsrc48 w_h=177*51/><imgsrc49 w_h=1*111/><imgsrc51 w_h=26*27/><imgsrc52 w_h=34*1/><imgsrc53 w_h=1*28/><imgsrc54 w_h=13*13/><imgsrc55 w_h=29*57/><imgsrc56 w_h=1*9/><imgsrc57 w_h=1*8/><imgsrc58 w_h=3*13/><imgsrc59 w_h=2*12/><imgsrc60 w_h=3*13/><imgsrc61 w_h=13*11/><imgsrc62 w_h=5*2/><imgsrc63 w_h=5*2/><imgsrc64 w_h=1*20/><imgsrc65 w_h=235*1/><imgsrc66 w_h=3*26/><imgsrc67 w_h=21*13/><imgsrc60 w_h=3*13/><imgsrc68 w_h=5*2/><imgsrc69 w_h=28*7/><imgsrc70 w_h=14*6/><imgsrc71 w_h=14*6/><imgsrc72 w_h=19*24/><imgsrc73 w_h=17*1/><imgsrc74 w_h=2*7/><imgsrc75 w_h=26*23/>第Ⅱ卷 (非选择题,共 52 分)
- 【未识别图片】
- """
- # end_pic = re.findall(r"\n(<imgsrc\d+ w_h=[\d.]+\*[\d.]+(\sdata-latex=.*?\")?\s*/>\s*"
- # r"(<imgsrc\d+ w_h=[\d.]+\*[\d.]+(\sdata-latex=.*?\")?\s*/>)*?)\n?$",
- # bb)
- #
- # print(end_pic)
- print(chr(ord('@')+1))
- option_con = """
- 一列简谐横波沿直线传播, 该直线上的 a、b 两点相距 4.42 m. 图中实、虚两条曲线分 别表示平衡位置在 a、b 两点处质点的振动曲线.从图示可知( )
- A.此列波的频率一定是 10Hz
- B.此列波的波长一定是 0.1m
- C.此列波的传播速度可能是 34 m/s
- D .a 点一定比b 点距波源近
- <img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image37.png" width="1px" height="6px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image38.png" width="133px" height="197px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image39.png" width="11px" height="13px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image40.png" width="12px" height="13px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image41.png" width="11px" height="13px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image42.png" width="97px" height="49px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image43.png" width="28px" height="4px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image44.png" width="10px" height="11px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image45.png" width="12px" height="13px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image46.png" width="2px" height="7px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image47.png" width="17px" height="15px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image48.png" width="177px" height="51px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image49.png" width="1px" height="111px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image51.png" width="26px" height="27px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image52.png" width="34px" height="1px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image53.png" width="1px" height="28px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image54.png" width="13px" height="13px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image55.png" width="29px" height="57px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image56.png" width="1px" height="9px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image57.png" width="1px" height="8px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image58.png" width="3px" height="13px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image59.png" width="2px" height="12px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image60.png" width="3px" height="13px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image61.png" width="13px" height="11px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image62.png" width="5px" height="2px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image63.png" width="5px" height="2px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image64.png" width="1px" height="20px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image65.png" width="235px" height="1px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image66.png" width="3px" height="26px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image67.png" width="21px" height="13px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image60.png" width="3px" height="13px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image68.png" width="5px" height="2px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image69.png" width="28px" height="7px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image70.png" width="14px" height="6px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image71.png" width="14px" height="6px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image72.png" width="19px" height="24px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image73.png" width="17px" height="1px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image74.png" width="2px" height="7px" /><img src="http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/6258cc7af84c0e279ac64301/image75.png" width="26px" height="23px" />第Ⅱ卷 (非选择题,共 52 分)
- 【未识别图片】
- """
- # option_con = re.sub(r"(\n\s*(<img\s*src=.+?[\"/]>\s*)+?\s*)(A[、、..::].+?)",
- # r"\1\n\3", str(option_con),flags=re.S)
- # print(option_con)
- pkk = "二、(每小题有4个选项)"
- pkk = re.sub(r'([一二三四五六七八九十])\s*[、..、,,::]?\s*([((]\s*(每小题|本大?题)((?!选项).)+?[))]|综合题)',
- r"\1" + "、" + "解答题", pkk)
- print(pkk)
- # callback_url = "http://zsyte.zhixinhuixue.com/parseapi/index/sid/2510/wid/190969"
- # fp = open(r"E:\Text_Structure\res_folder\6290b90df84c0e279ac64824__2022_05_30_09_35_33.json", 'r',encoding='utf-8').read()
- # res_xbk = json.loads(fp)
- # # print(res_xbk)
- # r = requests.post(callback_url,
- # # json=res, # 可以,但是会进行转义
- # data=json.dumps(res_xbk, ensure_ascii=False).encode("utf-8"), # 文件开头有编码显示
- # )
- # print(r.status_code,r.text)
- chachong_item_dict = {'topic_id': 3, 'subject_id': 41, 'topic_type_id': 20, 'content': '下列各组数中,能作为直角三角形边长的是( )',
- 'options': ['$4$,$5$,$6$', '$12$,$16$,$20$', '$5$,$10$,$13$', '$8$,$40$,$41$']}
- chachong_item_dict1 = {'topic_id': 2, 'subject_id': 41, 'topic_type_id': 20, 'content': '点$A\\left(-3,4\\right)$所在象限为( )', 'options': ['第一象限', '第二象限', '第三象限', '第四象限']}
- chachong_item_dict2 = {'topic_id': 2, 'subject_id': 41, 'topic_type_id': 20,
- 'content': '<p>点<img src=\"http://10.19.1.7:11088/ser_static/26693/files/image8.png\" style=\"width: 43.2pt; height: 14.4pt\" data-type=\"math\" data-latex=\"$A( - 3,4)$\" width=\"58\" height=\"19\" />所在象限为( )</p>',
- 'options': ['<p>第一象限</p>', '<p>第二象限</p>', '<p>第三象限</p', '<p>第四象限</p>']}
- chachong_item_dict3 = {'topic_id': 2, 'subject_id': 41, 'topic_type_id': 20,
- 'content': '点<img src=\"http://zxhx-pro-1302712961.cos.ap-beijing.myqcloud.com/zyk/uploadfiles/wording/62afe8286c6aff2279345f13/MJMATH-1655780770452801.png\" width=\"57.0\" height=\"17.5\" data-type=\"math\" data-latex=\"$A\\left(-3,4\\right)$\" />所在象限为( )',
- 'options': ['第一象限', '第二象限', '第三象限', '第四象限']}
- import configs
- # repeat_ip = "http://82.156.68.22:8888/api/repeat/subject" 保存入库查重
- repeat_ip = "http://82.156.68.22:8888/repeat/subject" # 全学科查重
- # repeat_r = requests.post(url=configs.repeat_ip, json={"topics":[chachong_item_dict2],
- # "callback":"http://192.168.1.140:8888/kk"})
- # repeat_r = requests.post(url=configs.repeat_ip, json=[chachong_item_dict1])
- # print(repeat_r.content)
- import os
- print(os.environ.get('APPDATA'))
|