I have a problem with this part, I got a script to allow download data from a website (scrape):
the big problem is the className, i want only the date but in some tag (from the list are not the same)
Code: Select all
[color=#FF0000]<div class="content-type-text">[/color]
<h2 class="job-list-title">....</h2>
<h3 class="job-list-subtitle">...</h3>
<ul class="tag-group"> ;-----> I can't select this className because it uses it in another tag, thats why I get all the content from the <div class="content-type-text"> with that className
<li class="tag-divider tag-ellipsis-cols2">
<span class="ellipsis">Barcelona</span>
</li>
<li>
<span class="marked">Hace 27m</span>
<span class="badge-marked-sticker">Nueva</span>
</li>
</ul>
...</div>
I've look for information and i've found Regex way:
Code: Select all
an := IE.document.getElementsByClassname("content-type-text")[a_index].Innerhtml
RegExMatch(an,"></li.*?(?=</ul>)", exp) ; --> i wanted to select the date from here, but i couldn't, only cut out the code html
; exp = "></li><li><span class=""marked"">Hace 7m</span><span class=""badge-marked-sticker"">Nueva</span></li>[/c]"
; in another elements exp= "></li><li><span>01 de jun</span></li>"
n4 := RegExReplace(exp, ".*?i><s.*?>(.*?)<", "$1") ; --> and after i use this method to encapsulate waht i need (the date), but it doesn't anything
it's so wird becuase when i try to get "Barcelona" it does it:
Code: Select all
RegExMatch(an,"col[^>]*>.*?(?=</span></li>)", reg)
n3 := RegExReplace(reg, ".*>(.*)", "$1")
; n3 = "Barcelona"