Вверх ↑
Этот топик читают: Гость
Ответов: 17
Рейтинг: 4
#1: 2023-02-24 18:28:32 ЛС | профиль | цитата
Здравствуйте!
Помогите, пожалуйста, с парсингом. Никак не получается по столбцам разложить данные из html страницы
Make(delphi)
ver(4.05 build 186)
Add(MainForm,2953706,21,105)
{
Width=1053
Height=532
link(onCreate,10817619:doData,[(72,125)(72,209)])
}
Add(StrList,10403654,91,119)
{
Strings=#45: <tr class="rowlink accepted">|46: <td class="id">236942</td>|39: <td>21.02.2023</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 3</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 4</td>|24: <td>|75:&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446;5 </td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 6</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 7</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 8</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 9</td>|31: <td>74</td>|81: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 11</td>|29: <td></td>|21: </tr>|45: <tr class="rowlink accepted">|46: <td class="id">236943</td>|39: <td>21.02.2023</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 3</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 4</td>|24: <td>|75:&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446;5 </td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 6</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 7</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 8</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 9</td>|31: <td>54</td>|81: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 11</td>|29: <td></td>|21: </tr>|45: <tr class="rowlink accepted">|46: <td class="id">236944</td>|39: <td>21.02.2023</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 3</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 4</td>|24: <td>|75:&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446;5 </td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 6</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 7</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 8</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 9</td>|32: <td>322</td>|81: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 11</td>|29: <td></td>|21: </tr>|0:|0:|
}
Add(DoData,10817619,91,203)
{
link(onEventData,13481499:doMultiReplace,[])
link(Data,10403654:Text,[])
}
Add(BlockFind,1127144,378,203)
{
IncludeBlock=1
StartBlock="<td class="id">"
EndBlock="</td>"
link(onSearch,473472:doEvent1,[])
}
Add(MultiReplace,13481499,161,203)
{
link(onResult,13127920:doSearch,[])
link(ReplaceList,2004256:Text,[])
}
Add(Hub,9664333,315,203)
{
link(onEvent1,1127144:doSearch,[])
link(onEvent2,1720921:doSearch,[(353,216)(353,265)])
}
Add(BlockFind,1720921,378,259)
{
IncludeBlock=1
StartBlock="<td>"
EndBlock="</td>"
link(onSearch,473472:doEvent2,[(471,265)(471,216)])
}
Add(Hub,473472,497,203)
{
InCount=2
OutCount=1
link(onEvent1,16214236:doAdd,[])
}
Add(StringTable,16214236,819,203)
{
Left=35
Top=10
Width=975
Height=440
Columns=#6:Код=80|7:Дата=80|12:Столбец 3=80|12:Столбец 4=80|12:Столбец 5=80|12:Столбец 6=80|12:Столбец 7=80|12:Столбец 8=80|12:Столбец 9=80|13:Столбец 10=80|13:Столбец 11=80|
}
Add(StrList,2004256,168,119)
{
Strings=#23:&#x410; =А; &#x430; =а;|23:&#x411; =Б; &#x431; =б;|23:&#x412; =В; &#x432; =в;|23:&#x413; =Г; &#x433; =г;|23:&#x414; =Д; &#x434; =д;|23:&#x415; =Е; &#x435; =е;|23:&#x401; =Ё; &#x451; =ё;|23:&#x416; =Ж; &#x436; =ж;|23:&#x417; =З; &#x437; =з;|23:&#x418; =И; &#x438; =и;|23:&#x419; =Й; &#x439; =й;|23:&#x41A; =К; &#x43A; =к;|23:&#x41B; =Л; &#x43B; =л;|23:&#x41C; =М; &#x43C; =м;|23:&#x41D; =Н; &#x43D; =н;|23:&#x41E; =О; &#x43E; =о;|23:&#x41F; =П; &#x43F; =п;|23:&#x420; =Р; &#x440; =р;|23:&#x421; =С; &#x441; =с;|23:&#x422; =Т; &#x442; =т;|23:&#x423; =У; &#x443; =у;|23:&#x424; =Ф; &#x444; =ф;|23:&#x425; =Х; &#x445; =х;|23:&#x426; =Ц; &#x446; =ц;|23:&#x427; =Ч; &#x447; =ч;|23:&#x428; =Ш; &#x448; =ш;|23:&#x429; =Щ; &#x449; =щ;|23:&#x42A; =Ъ; &#x44A; =ъ;|23:&#x42B; =Ы; &#x44B; =ы;|23:&#x42C; =Ь; &#x44C; =ь;|23:&#x42D; =Э; &#x44D; =э;|23:&#x42E; =Ю; &#x44E; =ю;|23:&#x42F; =Я; &#x44F; =я;|0:|
}
Add(BlockFind,13127920,245,203)
{
IncludeBlock=1
StartBlock="<tr class="rowlink accepted">"
EndBlock="</tr>"
link(onSearch,9664333:doEvent1,[])
}

Благодарю за помощь!

Редактировалось 10 раз(а), последний 2023-02-24 18:49:28
карма: 0

0
Ответов: 784
Рейтинг: 168
#2: 2023-02-24 19:04:46 ЛС | профиль | цитата
faramir777 писал(а):
Никак не получается по столбцам разложить данные из html страницы


Add(MainForm,4956910,133,182)
{
Width=1053
Height=532
link(onCreate,10817619:doData,[])
}
Add(StrList,10403654,203,112)
{
Strings=#45: <tr class="rowlink accepted">|46: <td class="id">236942</td>|39: <td>21.02.2023</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 3</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 4</td>|24: <td>|75:&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446;5 </td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 6</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 7</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 8</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 9</td>|31: <td>74</td>|81: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 11</td>|29: <td></td>|21: </tr>|45: <tr class="rowlink accepted">|46: <td class="id">236943</td>|39: <td>21.02.2023</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 3</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 4</td>|24: <td>|75:&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446;5 </td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 6</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 7</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 8</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 9</td>|31: <td>54</td>|81: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 11</td>|29: <td></td>|21: </tr>|45: <tr class="rowlink accepted">|46: <td class="id">236944</td>|39: <td>21.02.2023</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 3</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 4</td>|24: <td>|75:&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446;5 </td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 6</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 7</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 8</td>|80: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 9</td>|32: <td>322</td>|81: <td>&#x421;&#x442;&#x43E;&#x43B;&#x431;&#x435;&#x446; 11</td>|29: <td></td>|21: </tr>|0:|0:|
}
Add(DoData,10817619,203,196)
{
link(onEventData,13481499:doMultiReplace,[])
link(Data,10403654:Text,[])
}
Add(MultiReplace,13481499,273,196)
{
link(onResult,13127920:doSearch,[])
link(ReplaceList,2004256:Text,[])
}
Add(StringTable,16214236,532,196)
{
Left=35
Top=10
Width=975
Height=440
Columns=#6:Код=80|7:Дата=80|12:Столбец 3=80|12:Столбец 4=80|12:Столбец 5=80|12:Столбец 6=80|12:Столбец 7=80|12:Столбец 8=80|12:Столбец 9=80|13:Столбец 10=80|13:Столбец 11=80|
}
Add(StrList,2004256,280,112)
{
Strings=#23:&#x410; =А; &#x430; =а;|23:&#x411; =Б; &#x431; =б;|23:&#x412; =В; &#x432; =в;|23:&#x413; =Г; &#x433; =г;|23:&#x414; =Д; &#x434; =д;|23:&#x415; =Е; &#x435; =е;|23:&#x401; =Ё; &#x451; =ё;|23:&#x416; =Ж; &#x436; =ж;|23:&#x417; =З; &#x437; =з;|23:&#x418; =И; &#x438; =и;|23:&#x419; =Й; &#x439; =й;|23:&#x41A; =К; &#x43A; =к;|23:&#x41B; =Л; &#x43B; =л;|23:&#x41C; =М; &#x43C; =м;|23:&#x41D; =Н; &#x43D; =н;|23:&#x41E; =О; &#x43E; =о;|23:&#x41F; =П; &#x43F; =п;|23:&#x420; =Р; &#x440; =р;|23:&#x421; =С; &#x441; =с;|23:&#x422; =Т; &#x442; =т;|23:&#x423; =У; &#x443; =у;|23:&#x424; =Ф; &#x444; =ф;|23:&#x425; =Х; &#x445; =х;|23:&#x426; =Ц; &#x446; =ц;|23:&#x427; =Ч; &#x447; =ч;|23:&#x428; =Ш; &#x448; =ш;|23:&#x429; =Щ; &#x449; =щ;|23:&#x42A; =Ъ; &#x44A; =ъ;|23:&#x42B; =Ы; &#x44B; =ы;|23:&#x42C; =Ь; &#x44C; =ь;|23:&#x42D; =Э; &#x44D; =э;|23:&#x42E; =Ю; &#x44E; =ю;|23:&#x42F; =Я; &#x44F; =я;|0:|
}
Add(BlockFind,13127920,322,196)
{
IncludeBlock=1
StartBlock="<tr class="rowlink accepted">"
EndBlock="</tr>"
link(onSearch,14092989:doReplace,[])
}
Add(MultiBlockFind,8876038,420,196)
{
TagList="{**s} <td> {**x} </td> {**e}\r\n"
link(onResult1,10292374:doStr,[])
}
Add(Replace,14092989,371,196)
{
SubStr="<td class="id">"
DestStr="<td>"
link(onReplace,8876038:doMultiBlockFind,[])
}
Add(MT_String,10292374,476,196)
{
link(onResult,16214236:doAdd,[])
}

карма: 15

0
Ответов: 17
Рейтинг: 4
#3: 2023-02-24 19:10:29 ЛС | профиль | цитата
Благодарю!!! Все оказалось намного проще, чем я думал.
карма: 0

0
3
Сообщение
...
Прикрепленные файлы
(файлы не залиты)