how to get the last data ?

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
anggun123
Posts: 55
Joined: Tue Aug 03, 2021 2:39 pm

how to get the last data ?

Post by anggun123 » Sat Aug 21, 2021 12:26 am

Code: Select all

Browser Firefox 48.0
iMacros for Firefox 8.9.7
Windows 10 32-bit Operating system
i want to get data from elements
but I want to take the last elements

Code: Select all

TAG POS=1 TYPE=div ATTR=class:"message-text-box" extract=txt
TAG POS=1 is the top element
I can't count the last element

any idea ?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: how to get the last data ?

Post by chivracq » Sat Aug 21, 2021 11:54 am

anggun123 wrote:
Sat Aug 21, 2021 12:26 am

Code: Select all

Browser Firefox 48.0
iMacros for Firefox 8.9.7
Windows 10 32-bit Operating system
i want to get data from elements
but I want to take the last elements

Code: Select all

TAG POS=1 TYPE=div ATTR=class:"message-text-box" extract=txt
TAG POS=1 is the top element
I can't count the last element

any idea ?

Yep, use (Negative!)`Relative Positioning`... :idea:
=> "TAG POS=1" is the Top Element like you mention, and "TAG POS=R-1" will be the Last Element, with choosing an `Anchor` located after/below that Last Element... 8)

>>>

+ Parallel on SOF:
- how to get the last data using imacros?

Same OP except FCI not mentioned, I wanted to post the same Answer, but FCI not mentioned, => Qt got a '-1' from me instead, oops...! :P
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
anggun123
Posts: 55
Joined: Tue Aug 03, 2021 2:39 pm

Re: how to get the last data ?

Post by anggun123 » Sat Aug 21, 2021 12:44 pm

elements
elements
hmmm... not working

i want to take the value 3

Code: Select all

<div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>3</span></span></div></div>

Code: Select all

Browser Firefox 48.0
iMacros for Firefox 8.9.7
Windows 10 32-bit Operating system
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: how to get the last data ?

Post by chivracq » Sat Aug 21, 2021 1:20 pm

anggun123 wrote:
Sat Aug 21, 2021 12:44 pm
Screenshot_4.png

hmmm... not working

i want to take the value 3

Code: Select all

<div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>3</span></span></div></div>

Code: Select all

Browser Firefox 48.0
iMacros for Firefox 8.9.7
Windows 10 32-bit Operating system

Yeah...!, "not working" is a bit vague if you don't post your Script and what you tried, ah-ah...! :roll:
I can't see/guess what you chose for `Anchor`, tja!, ah-ah...!

From your mini/limited Screenshot, maybe (but it's a BIG "maybe"...!), the `<div class="message-read-type">` will "do the Job", but nope if every `<div class="message-text-box">` has its own corresponding `<div class="message-read-type">`, then that won't work, => you need to choose a "clear" (not ambigue) `Anchor` reliably identified by "TAG POS=1", and I can't tell from your (too) limited Screenshot, I would need to see the HTML Structure at a much higher Level... :|

=> As an Example, if this current Thread/Case is still related to your 'shopee' Site, then for example, the "Layanan Pelanggan" Element from the Footer of the Page (on this Page you had provided the URL in some previous Thread...) would be a "good Candidate" to choose as `Anchor`, to tag "directly" the last "Iklan" Element with "TAG POS=R-1"... :idea:

>>>

No "Need" to repeat your FCI in your previous Post, the "FCI missing" Mention was about your Thread/Qt on SOF, not here, ah-ah...! :?
(I wouldn't even have replied "here" if FCI was not mentioned in your OP anyway... :wink: )
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
anggun123
Posts: 55
Joined: Tue Aug 03, 2021 2:39 pm

Re: how to get the last data ?

Post by anggun123 » Sat Aug 21, 2021 1:32 pm

I can't give the url because it's on a private website :D

I hope these elements can help

Code: Select all


<div class="message-view"><div class="message-content"><div class="simple-scroller chat-list message-list custom-scroll-bar"><div class="scroll-content" style="width: 470px; height: 331px;"><div class="top-holder invisible"><i class="im-components-icon im-components-icon-loading im-components-icon-medium"></i></div><div class="message-row user-type-0 row-card-system"><div class="avatar-holder"></div><div class="message-contain"><div class="lzd-message-item card-system"><div class="lzd-system-text">19:22</div></div><div class="message-read-type"></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-1 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/ebf238e7aa294b55f5198f2a709efa42.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>tes</span></span></div></div></div><div class="message-read-type"><span class="read-type">Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-2 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/0f460c08eaf10eaaada4bd51ef2af6ea.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>Hai kak, Mohon Maaf saat ini kami sedang Off </span><span>
</span><span>
</span><span>Silahkan Tinggalkan Pesan.. :)</span><span>
</span><span>
</span><span>Kami akan segera membalas pesan Anda...</span></span></div></div></div><div class="message-read-type"><span class="read-type">Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-2 row-card-text"><div class="avatar-holder"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>tes456</span></span></div></div></div><div class="message-read-type"><span class="read-type">Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-1 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/ebf238e7aa294b55f5198f2a709efa42.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>1</span></span></div></div></div><div class="message-read-type"><span class="read-type unread-type">Belum Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-1 row-card-text"><div class="avatar-holder"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>1</span></span></div></div></div><div class="message-read-type"><span class="read-type unread-type">Belum Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-2 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/0f460c08eaf10eaaada4bd51ef2af6ea.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>tes456</span></span></div></div></div><div class="message-read-type"><span class="read-type">Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-1 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/ebf238e7aa294b55f5198f2a709efa42.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>3</span></span></div></div></div><div class="message-read-type"><span class="read-type unread-type">Belum Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-1 row-card-text"><div class="avatar-holder"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>3</span></span></div></div></div><div class="message-read-type"><span class="read-type unread-type">Belum Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-2 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/0f460c08eaf10eaaada4bd51ef2af6ea.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>tes456</span></span></div></div></div><div class="message-read-type"><span class="read-type">Dibaca</span></div></div><div class="avatar-holder"></div></div></div><div class="scrollbar-track"><div class="scrollbar-thumb" style="height: 136px; top: 185px;"></div></div><div class="scrollbar-track horizontal none"><div class="scrollbar-thumb horizontal" style="width: 20px;"></div></div></div></div><div class="message-fields"><div class="translation-bar hidden"><div class="translation-box"><div class="translation-icon state-0"><div class="red"></div><div class="blue"></div></div><div class="translation-info"><span class="tip hidden">Menerjemahkan...</span><input class="text editable" placeholder="Terjemahan" value=""><div class="text hidden"><span>Terjemahan gagal</span><span class="retry">Klik untuk mencoba lagi</span></div></div><div class="language-mapping"><span class="language-mapping-item">EN</span><span class="language-mapping-item">ID</span></div></div></div><div class="message-fields__box"><div class="message-fields__ballon"><div class="im-icon im-icon-emoji im-icon-small"><svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-429.000000, -550.000000)" class="im-icon-emoji-fill im-icon-emoji-stroke" stroke-width="0.15"><g transform="translate(408.000000, 533.000000)"><g transform="translate(20.000000, 16.000000)"><path d="M10,1.63690476 C11.1321554,1.63690476 12.2336801,1.86237046 13.2559655,2.29451452 C14.2500626,2.71509408 15.1529471,3.3250078 15.9135489,4.08645112 C16.6756803,4.84858257 17.2852444,5.75073734 17.7055585,6.74420712 C18.1376295,7.7663199 18.3630952,8.86784463 18.3630952,10 C18.3630952,11.1321554 18.1376295,12.2336801 17.7054855,13.2559655 C17.2852444,14.2492627 16.6756803,15.1514174 15.9137931,15.9133045 C15.1529471,16.6749922 14.2500626,17.2849059 13.2559655,17.7054855 L13.2559655,17.7054855 L12.7689155,16.5542764 C13.6141447,16.1966795 14.3822055,15.6778413 15.0296654,15.0296654 C15.6783822,14.3809486 16.1969918,13.6134064 16.5542034,12.7690881 C16.9214887,11.9002333 17.1130952,10.9641295 17.1130952,10 C17.1130952,9.03587053 16.9214887,8.09976666 16.5542764,7.23108452 C16.1969918,6.38659364 15.6783822,5.61905136 15.0294212,4.97009023 C14.3822055,4.32215866 13.6141447,3.80332055 12.7690881,3.44579657 C11.9002333,3.07851128 10.9641295,2.88690476 10,2.88690476 C9.0362881,2.88690476 8.09946833,3.07865781 7.23168574,3.44579657 C6.3867533,3.80296935 5.6192142,4.32145499 4.9703346,4.9703346 C4.32161783,5.61905136 3.80300818,6.38659364 3.44579657,7.23091193 C3.07851128,8.09976666 2.88690476,9.03587053 2.88690476,10 C2.88690476,10.9641295 3.07851128,11.9002333 3.44572358,12.7689155 C3.80300818,13.6134064 4.32161783,14.3809486 4.9703346,15.0296654 C5.6192142,15.678545 6.3867533,16.1970307 7.23185833,16.5542764 C8.09946833,16.9213422 9.0362881,17.1130952 10,17.1130952 L10,17.1130952 L10,18.3630952 C8.86820087,18.3630952 7.76583073,18.1374565 6.74498093,17.7055585 C5.75109093,17.2854178 4.84882246,16.6759202 4.08645112,15.9135489 C3.32431967,15.1514174 2.71475563,14.2492627 2.29444153,13.2557929 C1.86237046,12.2336801 1.63690476,11.1321554 1.63690476,10 C1.63690476,8.86784463 1.86237046,7.7663199 2.29451452,6.74403453 C2.71475563,5.75073734 3.32431967,4.84858257 4.08645112,4.08645112 C4.84882246,3.32407978 5.75109093,2.71458216 6.74480834,2.29451452 C7.76583073,1.8625435 8.86820087,1.63690476 10,1.63690476 Z M6.75595238,10.0112976 C6.75595238,11.803095 8.20840327,13.2553452 10,13.2553452 C11.7920839,13.2553452 13.2440476,11.8033816 13.2440476,10.0112976 L13.2440476,10.0112976 L14.4940476,10.0112976 C14.4940476,12.4937375 12.4824399,14.5053452 10,14.5053452 C7.51808599,14.5053452 5.50595238,12.4934896 5.50595238,10.0112976 L5.50595238,10.0112976 Z M7.8422619,6.13095238 C8.3603869,6.13095238 8.7797619,6.55095238 8.7797619,7.06845238 C8.7797619,7.58595238 8.3603869,8.00595238 7.8422619,8.00595238 C7.3247619,8.00595238 6.9047619,7.58595238 6.9047619,7.06845238 C6.9047619,6.55095238 7.3247619,6.13095238 7.8422619,6.13095238 Z M11.7113095,6.13095238 C12.2294345,6.13095238 12.6488095,6.55095238 12.6488095,7.06845238 C12.6488095,7.58595238 12.2294345,8.00595238 11.7113095,8.00595238 C11.1938095,8.00595238 10.7738095,7.58595238 10.7738095,7.06845238 C10.7738095,6.55095238 11.1938095,6.13095238 11.7113095,6.13095238 Z"></path></g></g></g></g></svg></div><div class="im-icon im-icon-image im-icon-small"><svg width="18px" height="14px" viewBox="0 0 18 14" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g class="im-icon-image-fill" transform="translate(-501.000000, -552.000000)" fill-rule="nonzero"><g transform="translate(408.000000, 533.000000)"><g transform="translate(92.000000, 16.000000)"><path d="M17.1734581,3 C18.1791169,3 19,3.81855515 19,4.82318501 L19,4.82318501 L19,16.0714286 L17.7142857,16.0714286 L17.7142857,4.82318501 C17.7142857,4.52945421 17.4698526,4.28571429 17.1734581,4.28571429 L17.1734581,4.28571429 L2.82654185,4.28571429 C2.53014741,4.28571429 2.28571429,4.52945421 2.28571429,4.82318501 L2.28571429,4.82318501 L2.28571429,12.0392793 L3.29762076,10.7244913 L4.67375135,9.11867991 C5.48002214,8.1975833 6.4054197,7.71428571 7.42857143,7.71428571 C8.47505966,7.71428571 9.48607206,8.21979192 10.462757,9.19662713 L10.462757,9.19662713 L16.2484713,15.1966271 C16.6421202,15.6048556 16.3528209,16.2857143 15.7857143,16.2857143 L15.7857143,16.2857143 L2.82654185,16.2857143 C1.82088312,16.2857143 1,15.4671591 1,14.4625293 L1,14.4625293 L1,4.82318501 C1,3.81855515 1.82088312,3 2.82654185,3 L2.82654185,3 Z M7.42857143,9 C6.77836351,9 6.16528183,9.33440819 5.5595221,10.061223 L5.5595221,10.061223 L4.29525828,11.5348141 L2.28571429,14.1472213 L2.28571429,14.4625293 C2.28571429,14.7562601 2.53014741,15 2.82654185,15 L2.82654185,15 L14.2727929,15 L9.54543135,10.0974258 C8.79964222,9.35163665 8.09636891,9 7.42857143,9 Z M14.1785714,5.57142857 C15.4210759,5.57142857 16.4285714,6.57892409 16.4285714,7.82142857 C16.4285714,9.06393305 15.4210759,10.0714286 14.1785714,10.0714286 C12.9360669,10.0714286 11.9285714,9.06393305 11.9285714,7.82142857 C11.9285714,6.57892409 12.9360669,5.57142857 14.1785714,5.57142857 Z M14.1785714,6.85714286 C13.6461473,6.85714286 13.2142857,7.28900448 13.2142857,7.82142857 C13.2142857,8.35385266 13.6461473,8.78571429 14.1785714,8.78571429 C14.7109955,8.78571429 15.1428571,8.35385266 15.1428571,7.82142857 C15.1428571,7.28900448 14.7109955,6.85714286 14.1785714,6.85714286 Z"></path></g></g></g></g></svg></div><div class="im-icon im-icon-dialogue im-icon-small"><svg width="20px" height="18px" viewBox="0 0 20 18" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g class="im-icon-dialogue-fill im-icon-dialogue-stroke" transform="translate(-572.000000, -550.000000)" stroke-width="0.15"><g transform="translate(408.000000, 533.000000)"><g transform="translate(164.000000, 16.000000)"><path d="M12.0057206,1.89606605 C13.9853258,1.89606605 15.8429341,2.68193057 17.2165571,4.05476335 C18.5892058,5.42820237 19.375,7.28584645 19.375,9.26604798 C19.375,11.2463846 18.5890924,13.1040948 17.2164299,14.4767573 C15.8435073,15.8496798 13.9859341,16.6353274 12.0057206,16.6353274 L12.0057206,16.6353274 L6.95664392,16.6353274 L6.95664392,15.3853274 L12.0057206,15.3853274 C13.6510143,15.3853274 15.191726,14.7336942 16.3325464,13.5928738 C17.473135,12.4522852 18.125,10.9114219 18.125,9.26604798 C18.125,7.62073321 17.473181,6.07981088 16.3326736,4.93864679 C15.1913136,3.7979435 13.6504209,3.14606605 12.0057206,3.14606605 L12.0057206,3.14606605 L7.99498193,3.14606605 C6.34966716,3.14606605 4.80874484,3.79788508 3.66758074,4.93839243 C2.52681903,6.07981088 1.875,7.62073321 1.875,9.26604798 C1.875,10.9114219 2.52686502,12.4522852 3.66745358,13.5928738 L3.66745358,13.5928738 L3.99206246,13.9174827 L1.80390243,18.103934 L0.69609757,17.5249103 L2.4659746,14.1387302 C1.29037177,12.8065401 0.625,11.0882036 0.625,9.26604798 C0.625,7.28584645 1.41079416,5.42820237 2.7836973,4.05450899 C4.15713633,2.68186021 6.01478041,1.89606605 7.99498193,1.89606605 L7.99498193,1.89606605 Z M10.625,10.0847169 L10.625,11.3347169 L5.625,11.3347169 L5.625,10.0847169 L10.625,10.0847169 Z M14.375,7.2722169 L14.375,8.5222169 L5.625,8.5222169 L5.625,7.2722169 L14.375,7.2722169 Z"></path></g></g></g></g></svg></div><div class="translation-tool hidden"><div class="im-icon im-icon-translation im-icon-small"><svg width="20px" height="18px" viewBox="0 0 20 18" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g class="im-icon-translation-fill im-icon-translation-stroke" transform="translate(-608.000000, -550.000000)" stroke-width="0.15"><g transform="translate(408.000000, 533.000000)"><g transform="translate(200.000000, 16.000000)"><g transform="translate(0.625000, 1.250000)"><path d="M0.973794384,9.58078464 C1.15701688,9.15854349 1.64879766,8.9641395 2.07239367,9.15907682 L2.07239367,9.15907682 L4.05864367,10.0820398 L3.53189047,11.2156319 L2.69288218,10.8260999 C2.89670174,11.5346473 3.20156099,12.1992621 3.59697686,12.8034155 C4.09995701,13.5710442 4.74192528,14.2299943 5.4850047,14.7457276 C6.22646512,15.25914 7.05674335,15.6207121 7.92938227,15.8079451 C8.82433414,15.9994862 9.75154645,16.0045793 10.6693449,15.8153854 C11.5868628,15.6263649 12.4428786,15.2530065 13.2016898,14.719505 C13.9414631,14.1982061 14.5771278,13.5322008 15.0738868,12.7606655 C15.5717671,11.9882888 15.9229297,11.1215886 16.1050489,10.2093381 L16.1050489,10.2093381 L17.3308602,10.4540558 C17.1180057,11.5202617 16.7073944,12.5336866 16.1247018,13.437635 C15.5415793,14.3433048 14.7938356,15.1267388 13.9211733,15.7416807 C13.0228382,16.3732784 12.0082311,16.8158078 10.9216383,17.0396599 C9.83358318,17.2639503 8.73136011,17.2578959 7.667464,17.0301966 C6.63243051,16.8081204 5.64959888,16.3801139 4.77284448,15.7730189 C3.89744533,15.1654497 3.14244524,14.3904779 2.55125425,13.4882251 C2.12703028,12.840056 1.79203298,12.1334041 1.5555363,11.3837273 L1.23156521,12.1371427 L0.0839689253,11.6416401 Z M9.30675318,4.71147473 L9.33896156,4.72381385 L9.37175318,4.71147473 L9.98175318,4.71147473 L12.6557532,11.9038139 L11.3217532,11.9038139 L10.8017532,10.5064747 L7.87475318,10.5064747 L7.35575318,11.9038139 L6.02375318,11.9038139 L8.69675318,4.71147473 L9.30675318,4.71147473 Z M9.33896156,6.56981385 L8.33975318,9.25647473 L10.3367532,9.25647473 L9.33896156,6.56981385 Z M7.72421101,0.460912722 C8.81256681,0.235869982 9.91506794,0.241925968 10.9787576,0.470299169 C12.0133109,0.692272287 12.9954885,1.12006873 13.8730973,1.72728279 C14.7482431,2.33396977 15.5035644,3.10962498 16.0943424,4.01227069 C16.5652302,4.73173713 16.9263032,5.5228315 17.164695,6.36440053 L17.5183781,5.54444656 L18.6660311,6.03981771 L17.7756049,8.10270186 C17.5915806,8.52414031 17.0979868,8.71958352 16.6784232,8.522549 L16.6784232,8.522549 L14.6915482,7.60023419 L15.2178609,6.46643749 L15.99502,6.82541643 C15.7921259,6.06067609 15.4722864,5.34439783 15.0484418,4.69680839 C14.545816,3.92884986 13.9038212,3.26957209 13.161404,2.75489765 C12.4188205,2.24110737 11.5890433,1.87969029 10.7164449,1.6924661 C9.82180545,1.50038784 8.8948603,1.49529618 7.97687678,1.68511034 C7.0583418,1.87434035 6.20251176,2.24746781 5.44425897,2.78118292 C4.70555068,3.30114115 4.06963072,3.96741395 3.57245472,4.73899606 C3.07379014,5.51319146 2.72250468,6.37998569 2.54124648,7.29078752 L2.54124648,7.29078752 L1.31528766,7.04681008 C1.52725546,5.98169607 1.9380416,4.96808435 2.52163977,4.06202639 C3.10540823,3.15605887 3.85345414,2.37230828 4.72477517,1.75900727 C5.62227722,1.1272781 6.63693081,0.684906254 7.72421101,0.460912722 Z"></path></g></g></g></g></g></svg></div><span class="translation-tip">Ali Translation is off</span></div><div class="im-icon im-icon-zoom im-icon-small"><svg class="obverse" viewBox="0 0 1024 1024" version="1.1" p-id="5328" width="8" height="7"><path d="M195.890257 677.081355l677.081355-677.081355 111.234233 111.234232-677.081356 677.081355H903.887492v157.332719H38.557538v-865.329953h157.332719v596.684336z" p-id="5329"></path></svg><svg class="reverse" viewBox="0 0 1024 1024" version="1.1" p-id="5328" width="8" height="7"><path d="M195.890257 677.081355l677.081355-677.081355 111.234233 111.234232-677.081356 677.081355H903.887492v157.332719H38.557538v-865.329953h157.332719v596.684336z" p-id="5329"></path></svg></div></div><div class="message-fields__input"><textarea class="message-fields__autosize" placeholder="Ketik pesan disini, enter untuk kirim pesan" rows="1" style="max-height: 340px; overflow: hidden; overflow-wrap: break-word; outline: 1px solid blue; height: 108px;">
</textarea><div class="message-fields__bottom"><span class="keypress-tip">Press Enter to send</span><div class="im-icon im-icon-paper-plane im-icon-normal disabled"><svg width="19px" height="21px" viewBox="0 0 19 21" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g class="im-icon-paper-plane-fill" transform="translate(-653.000000, -647.000000)"><g transform="translate(20.000000, 447.000000)"><g transform="translate(633.000000, 200.000000)"><path d="M18.08,8.885 L2.58,0.385 C2.11540364,0.130794631 1.5511907,0.140419605 1.09553518,0.410323658 C0.639879673,0.680227711 0.360318669,1.17040578 0.36,1.7 L0.36,18.7 C0.360318669,19.2295942 0.639879673,19.7197723 1.09553518,19.9896763 C1.5511907,20.2595804 2.11540364,20.2692054 2.58,20.015 L18.08,11.515 C18.56001,11.2515795 18.8583526,10.74754 18.8583526,10.2 C18.8583526,9.65246004 18.56001,9.14842053 18.08,8.885 L18.08,8.885 Z M1.86,18.7 L1.86,11.2 L8.36,11.2 C8.77421356,11.2 9.11,10.8642136 9.11,10.45 C9.11,10.0357864 8.77421356,9.7 8.36,9.7 L1.86,9.7 L1.86,1.7 L17.36,10.2 L1.86,18.7 Z"></path></g></g></g></g></svg></div></div></div></div></div><div class="message-mask hidden"></div></div>

chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: how to get the last data ?

Post by chivracq » Sat Aug 21, 2021 2:39 pm

anggun123 wrote:
Sat Aug 21, 2021 1:32 pm
I can't give the url because it's on a private website :D

I hope these elements can help

Code: Select all


<div class="message-view"><div class="message-content"><div class="simple-scroller chat-list message-list custom-scroll-bar"><div class="scroll-content" style="width: 470px; height: 331px;"><div class="top-holder invisible"><i class="im-components-icon im-components-icon-loading im-components-icon-medium"></i></div><div class="message-row user-type-0 row-card-system"><div class="avatar-holder"></div><div class="message-contain"><div class="lzd-message-item card-system"><div class="lzd-system-text">19:22</div></div><div class="message-read-type"></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-1 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/ebf238e7aa294b55f5198f2a709efa42.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>tes</span></span></div></div></div><div class="message-read-type"><span class="read-type">Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-2 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/0f460c08eaf10eaaada4bd51ef2af6ea.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>Hai kak, Mohon Maaf saat ini kami sedang Off </span><span>
</span><span>
</span><span>Silahkan Tinggalkan Pesan.. :)</span><span>
</span><span>
</span><span>Kami akan segera membalas pesan Anda...</span></span></div></div></div><div class="message-read-type"><span class="read-type">Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-2 row-card-text"><div class="avatar-holder"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>tes456</span></span></div></div></div><div class="message-read-type"><span class="read-type">Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-1 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/ebf238e7aa294b55f5198f2a709efa42.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>1</span></span></div></div></div><div class="message-read-type"><span class="read-type unread-type">Belum Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-1 row-card-text"><div class="avatar-holder"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>1</span></span></div></div></div><div class="message-read-type"><span class="read-type unread-type">Belum Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-2 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/0f460c08eaf10eaaada4bd51ef2af6ea.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>tes456</span></span></div></div></div><div class="message-read-type"><span class="read-type">Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-1 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/ebf238e7aa294b55f5198f2a709efa42.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>3</span></span></div></div></div><div class="message-read-type"><span class="read-type unread-type">Belum Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-1 row-card-text"><div class="avatar-holder"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>3</span></span></div></div></div><div class="message-read-type"><span class="read-type unread-type">Belum Dibaca</span></div></div><div class="avatar-holder"></div></div><div class="message-row user-type-2 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/0f460c08eaf10eaaada4bd51ef2af6ea.png"></div><div class="message-contain"><div class="lzd-message-item card-text"><div class="message-text-box"><div class="lzd-message-text"><span class="emoji-face has-text"><span>tes456</span></span></div></div></div><div class="message-read-type"><span class="read-type">Dibaca</span></div></div><div class="avatar-holder"></div></div></div><div class="scrollbar-track"><div class="scrollbar-thumb" style="height: 136px; top: 185px;"></div></div><div class="scrollbar-track horizontal none"><div class="scrollbar-thumb horizontal" style="width: 20px;"></div></div></div></div><div class="message-fields"><div class="translation-bar hidden"><div class="translation-box"><div class="translation-icon state-0"><div class="red"></div><div class="blue"></div></div><div class="translation-info"><span class="tip hidden">Menerjemahkan...</span><input class="text editable" placeholder="Terjemahan" value=""><div class="text hidden"><span>Terjemahan gagal</span><span class="retry">Klik untuk mencoba lagi</span></div></div><div class="language-mapping"><span class="language-mapping-item">EN</span><span class="language-mapping-item">ID</span></div></div></div><div class="message-fields__box"><div class="message-fields__ballon"><div class="im-icon im-icon-emoji im-icon-small"><svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-429.000000, -550.000000)" class="im-icon-emoji-fill im-icon-emoji-stroke" stroke-width="0.15"><g transform="translate(408.000000, 533.000000)"><g transform="translate(20.000000, 16.000000)"><path d="M10,1.63690476 C11.1321554,1.63690476 12.2336801,1.86237046 13.2559655,2.29451452 C14.2500626,2.71509408 15.1529471,3.3250078 15.9135489,4.08645112 C16.6756803,4.84858257 17.2852444,5.75073734 17.7055585,6.74420712 C18.1376295,7.7663199 18.3630952,8.86784463 18.3630952,10 C18.3630952,11.1321554 18.1376295,12.2336801 17.7054855,13.2559655 C17.2852444,14.2492627 16.6756803,15.1514174 15.9137931,15.9133045 C15.1529471,16.6749922 14.2500626,17.2849059 13.2559655,17.7054855 L13.2559655,17.7054855 L12.7689155,16.5542764 C13.6141447,16.1966795 14.3822055,15.6778413 15.0296654,15.0296654 C15.6783822,14.3809486 16.1969918,13.6134064 16.5542034,12.7690881 C16.9214887,11.9002333 17.1130952,10.9641295 17.1130952,10 C17.1130952,9.03587053 16.9214887,8.09976666 16.5542764,7.23108452 C16.1969918,6.38659364 15.6783822,5.61905136 15.0294212,4.97009023 C14.3822055,4.32215866 13.6141447,3.80332055 12.7690881,3.44579657 C11.9002333,3.07851128 10.9641295,2.88690476 10,2.88690476 C9.0362881,2.88690476 8.09946833,3.07865781 7.23168574,3.44579657 C6.3867533,3.80296935 5.6192142,4.32145499 4.9703346,4.9703346 C4.32161783,5.61905136 3.80300818,6.38659364 3.44579657,7.23091193 C3.07851128,8.09976666 2.88690476,9.03587053 2.88690476,10 C2.88690476,10.9641295 3.07851128,11.9002333 3.44572358,12.7689155 C3.80300818,13.6134064 4.32161783,14.3809486 4.9703346,15.0296654 C5.6192142,15.678545 6.3867533,16.1970307 7.23185833,16.5542764 C8.09946833,16.9213422 9.0362881,17.1130952 10,17.1130952 L10,17.1130952 L10,18.3630952 C8.86820087,18.3630952 7.76583073,18.1374565 6.74498093,17.7055585 C5.75109093,17.2854178 4.84882246,16.6759202 4.08645112,15.9135489 C3.32431967,15.1514174 2.71475563,14.2492627 2.29444153,13.2557929 C1.86237046,12.2336801 1.63690476,11.1321554 1.63690476,10 C1.63690476,8.86784463 1.86237046,7.7663199 2.29451452,6.74403453 C2.71475563,5.75073734 3.32431967,4.84858257 4.08645112,4.08645112 C4.84882246,3.32407978 5.75109093,2.71458216 6.74480834,2.29451452 C7.76583073,1.8625435 8.86820087,1.63690476 10,1.63690476 Z M6.75595238,10.0112976 C6.75595238,11.803095 8.20840327,13.2553452 10,13.2553452 C11.7920839,13.2553452 13.2440476,11.8033816 13.2440476,10.0112976 L13.2440476,10.0112976 L14.4940476,10.0112976 C14.4940476,12.4937375 12.4824399,14.5053452 10,14.5053452 C7.51808599,14.5053452 5.50595238,12.4934896 5.50595238,10.0112976 L5.50595238,10.0112976 Z M7.8422619,6.13095238 C8.3603869,6.13095238 8.7797619,6.55095238 8.7797619,7.06845238 C8.7797619,7.58595238 8.3603869,8.00595238 7.8422619,8.00595238 C7.3247619,8.00595238 6.9047619,7.58595238 6.9047619,7.06845238 C6.9047619,6.55095238 7.3247619,6.13095238 7.8422619,6.13095238 Z M11.7113095,6.13095238 C12.2294345,6.13095238 12.6488095,6.55095238 12.6488095,7.06845238 C12.6488095,7.58595238 12.2294345,8.00595238 11.7113095,8.00595238 C11.1938095,8.00595238 10.7738095,7.58595238 10.7738095,7.06845238 C10.7738095,6.55095238 11.1938095,6.13095238 11.7113095,6.13095238 Z"></path></g></g></g></g></svg></div><div class="im-icon im-icon-image im-icon-small"><svg width="18px" height="14px" viewBox="0 0 18 14" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g class="im-icon-image-fill" transform="translate(-501.000000, -552.000000)" fill-rule="nonzero"><g transform="translate(408.000000, 533.000000)"><g transform="translate(92.000000, 16.000000)"><path d="M17.1734581,3 C18.1791169,3 19,3.81855515 19,4.82318501 L19,4.82318501 L19,16.0714286 L17.7142857,16.0714286 L17.7142857,4.82318501 C17.7142857,4.52945421 17.4698526,4.28571429 17.1734581,4.28571429 L17.1734581,4.28571429 L2.82654185,4.28571429 C2.53014741,4.28571429 2.28571429,4.52945421 2.28571429,4.82318501 L2.28571429,4.82318501 L2.28571429,12.0392793 L3.29762076,10.7244913 L4.67375135,9.11867991 C5.48002214,8.1975833 6.4054197,7.71428571 7.42857143,7.71428571 C8.47505966,7.71428571 9.48607206,8.21979192 10.462757,9.19662713 L10.462757,9.19662713 L16.2484713,15.1966271 C16.6421202,15.6048556 16.3528209,16.2857143 15.7857143,16.2857143 L15.7857143,16.2857143 L2.82654185,16.2857143 C1.82088312,16.2857143 1,15.4671591 1,14.4625293 L1,14.4625293 L1,4.82318501 C1,3.81855515 1.82088312,3 2.82654185,3 L2.82654185,3 Z M7.42857143,9 C6.77836351,9 6.16528183,9.33440819 5.5595221,10.061223 L5.5595221,10.061223 L4.29525828,11.5348141 L2.28571429,14.1472213 L2.28571429,14.4625293 C2.28571429,14.7562601 2.53014741,15 2.82654185,15 L2.82654185,15 L14.2727929,15 L9.54543135,10.0974258 C8.79964222,9.35163665 8.09636891,9 7.42857143,9 Z M14.1785714,5.57142857 C15.4210759,5.57142857 16.4285714,6.57892409 16.4285714,7.82142857 C16.4285714,9.06393305 15.4210759,10.0714286 14.1785714,10.0714286 C12.9360669,10.0714286 11.9285714,9.06393305 11.9285714,7.82142857 C11.9285714,6.57892409 12.9360669,5.57142857 14.1785714,5.57142857 Z M14.1785714,6.85714286 C13.6461473,6.85714286 13.2142857,7.28900448 13.2142857,7.82142857 C13.2142857,8.35385266 13.6461473,8.78571429 14.1785714,8.78571429 C14.7109955,8.78571429 15.1428571,8.35385266 15.1428571,7.82142857 C15.1428571,7.28900448 14.7109955,6.85714286 14.1785714,6.85714286 Z"></path></g></g></g></g></svg></div><div class="im-icon im-icon-dialogue im-icon-small"><svg width="20px" height="18px" viewBox="0 0 20 18" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g class="im-icon-dialogue-fill im-icon-dialogue-stroke" transform="translate(-572.000000, -550.000000)" stroke-width="0.15"><g transform="translate(408.000000, 533.000000)"><g transform="translate(164.000000, 16.000000)"><path d="M12.0057206,1.89606605 C13.9853258,1.89606605 15.8429341,2.68193057 17.2165571,4.05476335 C18.5892058,5.42820237 19.375,7.28584645 19.375,9.26604798 C19.375,11.2463846 18.5890924,13.1040948 17.2164299,14.4767573 C15.8435073,15.8496798 13.9859341,16.6353274 12.0057206,16.6353274 L12.0057206,16.6353274 L6.95664392,16.6353274 L6.95664392,15.3853274 L12.0057206,15.3853274 C13.6510143,15.3853274 15.191726,14.7336942 16.3325464,13.5928738 C17.473135,12.4522852 18.125,10.9114219 18.125,9.26604798 C18.125,7.62073321 17.473181,6.07981088 16.3326736,4.93864679 C15.1913136,3.7979435 13.6504209,3.14606605 12.0057206,3.14606605 L12.0057206,3.14606605 L7.99498193,3.14606605 C6.34966716,3.14606605 4.80874484,3.79788508 3.66758074,4.93839243 C2.52681903,6.07981088 1.875,7.62073321 1.875,9.26604798 C1.875,10.9114219 2.52686502,12.4522852 3.66745358,13.5928738 L3.66745358,13.5928738 L3.99206246,13.9174827 L1.80390243,18.103934 L0.69609757,17.5249103 L2.4659746,14.1387302 C1.29037177,12.8065401 0.625,11.0882036 0.625,9.26604798 C0.625,7.28584645 1.41079416,5.42820237 2.7836973,4.05450899 C4.15713633,2.68186021 6.01478041,1.89606605 7.99498193,1.89606605 L7.99498193,1.89606605 Z M10.625,10.0847169 L10.625,11.3347169 L5.625,11.3347169 L5.625,10.0847169 L10.625,10.0847169 Z M14.375,7.2722169 L14.375,8.5222169 L5.625,8.5222169 L5.625,7.2722169 L14.375,7.2722169 Z"></path></g></g></g></g></svg></div><div class="translation-tool hidden"><div class="im-icon im-icon-translation im-icon-small"><svg width="20px" height="18px" viewBox="0 0 20 18" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g class="im-icon-translation-fill im-icon-translation-stroke" transform="translate(-608.000000, -550.000000)" stroke-width="0.15"><g transform="translate(408.000000, 533.000000)"><g transform="translate(200.000000, 16.000000)"><g transform="translate(0.625000, 1.250000)"><path d="M0.973794384,9.58078464 C1.15701688,9.15854349 1.64879766,8.9641395 2.07239367,9.15907682 L2.07239367,9.15907682 L4.05864367,10.0820398 L3.53189047,11.2156319 L2.69288218,10.8260999 C2.89670174,11.5346473 3.20156099,12.1992621 3.59697686,12.8034155 C4.09995701,13.5710442 4.74192528,14.2299943 5.4850047,14.7457276 C6.22646512,15.25914 7.05674335,15.6207121 7.92938227,15.8079451 C8.82433414,15.9994862 9.75154645,16.0045793 10.6693449,15.8153854 C11.5868628,15.6263649 12.4428786,15.2530065 13.2016898,14.719505 C13.9414631,14.1982061 14.5771278,13.5322008 15.0738868,12.7606655 C15.5717671,11.9882888 15.9229297,11.1215886 16.1050489,10.2093381 L16.1050489,10.2093381 L17.3308602,10.4540558 C17.1180057,11.5202617 16.7073944,12.5336866 16.1247018,13.437635 C15.5415793,14.3433048 14.7938356,15.1267388 13.9211733,15.7416807 C13.0228382,16.3732784 12.0082311,16.8158078 10.9216383,17.0396599 C9.83358318,17.2639503 8.73136011,17.2578959 7.667464,17.0301966 C6.63243051,16.8081204 5.64959888,16.3801139 4.77284448,15.7730189 C3.89744533,15.1654497 3.14244524,14.3904779 2.55125425,13.4882251 C2.12703028,12.840056 1.79203298,12.1334041 1.5555363,11.3837273 L1.23156521,12.1371427 L0.0839689253,11.6416401 Z M9.30675318,4.71147473 L9.33896156,4.72381385 L9.37175318,4.71147473 L9.98175318,4.71147473 L12.6557532,11.9038139 L11.3217532,11.9038139 L10.8017532,10.5064747 L7.87475318,10.5064747 L7.35575318,11.9038139 L6.02375318,11.9038139 L8.69675318,4.71147473 L9.30675318,4.71147473 Z M9.33896156,6.56981385 L8.33975318,9.25647473 L10.3367532,9.25647473 L9.33896156,6.56981385 Z M7.72421101,0.460912722 C8.81256681,0.235869982 9.91506794,0.241925968 10.9787576,0.470299169 C12.0133109,0.692272287 12.9954885,1.12006873 13.8730973,1.72728279 C14.7482431,2.33396977 15.5035644,3.10962498 16.0943424,4.01227069 C16.5652302,4.73173713 16.9263032,5.5228315 17.164695,6.36440053 L17.5183781,5.54444656 L18.6660311,6.03981771 L17.7756049,8.10270186 C17.5915806,8.52414031 17.0979868,8.71958352 16.6784232,8.522549 L16.6784232,8.522549 L14.6915482,7.60023419 L15.2178609,6.46643749 L15.99502,6.82541643 C15.7921259,6.06067609 15.4722864,5.34439783 15.0484418,4.69680839 C14.545816,3.92884986 13.9038212,3.26957209 13.161404,2.75489765 C12.4188205,2.24110737 11.5890433,1.87969029 10.7164449,1.6924661 C9.82180545,1.50038784 8.8948603,1.49529618 7.97687678,1.68511034 C7.0583418,1.87434035 6.20251176,2.24746781 5.44425897,2.78118292 C4.70555068,3.30114115 4.06963072,3.96741395 3.57245472,4.73899606 C3.07379014,5.51319146 2.72250468,6.37998569 2.54124648,7.29078752 L2.54124648,7.29078752 L1.31528766,7.04681008 C1.52725546,5.98169607 1.9380416,4.96808435 2.52163977,4.06202639 C3.10540823,3.15605887 3.85345414,2.37230828 4.72477517,1.75900727 C5.62227722,1.1272781 6.63693081,0.684906254 7.72421101,0.460912722 Z"></path></g></g></g></g></g></svg></div><span class="translation-tip">Ali Translation is off</span></div><div class="im-icon im-icon-zoom im-icon-small"><svg class="obverse" viewBox="0 0 1024 1024" version="1.1" p-id="5328" width="8" height="7"><path d="M195.890257 677.081355l677.081355-677.081355 111.234233 111.234232-677.081356 677.081355H903.887492v157.332719H38.557538v-865.329953h157.332719v596.684336z" p-id="5329"></path></svg><svg class="reverse" viewBox="0 0 1024 1024" version="1.1" p-id="5328" width="8" height="7"><path d="M195.890257 677.081355l677.081355-677.081355 111.234233 111.234232-677.081356 677.081355H903.887492v157.332719H38.557538v-865.329953h157.332719v596.684336z" p-id="5329"></path></svg></div></div><div class="message-fields__input"><textarea class="message-fields__autosize" placeholder="Ketik pesan disini, enter untuk kirim pesan" rows="1" style="max-height: 340px; overflow: hidden; overflow-wrap: break-word; outline: 1px solid blue; height: 108px;">
</textarea><div class="message-fields__bottom"><span class="keypress-tip">Press Enter to send</span><div class="im-icon im-icon-paper-plane im-icon-normal disabled"><svg width="19px" height="21px" viewBox="0 0 19 21" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g class="im-icon-paper-plane-fill" transform="translate(-653.000000, -647.000000)"><g transform="translate(20.000000, 447.000000)"><g transform="translate(633.000000, 200.000000)"><path d="M18.08,8.885 L2.58,0.385 C2.11540364,0.130794631 1.5511907,0.140419605 1.09553518,0.410323658 C0.639879673,0.680227711 0.360318669,1.17040578 0.36,1.7 L0.36,18.7 C0.360318669,19.2295942 0.639879673,19.7197723 1.09553518,19.9896763 C1.5511907,20.2595804 2.11540364,20.2692054 2.58,20.015 L18.08,11.515 C18.56001,11.2515795 18.8583526,10.74754 18.8583526,10.2 C18.8583526,9.65246004 18.56001,9.14842053 18.08,8.885 L18.08,8.885 Z M1.86,18.7 L1.86,11.2 L8.36,11.2 C8.77421356,11.2 9.11,10.8642136 9.11,10.45 C9.11,10.0357864 8.77421356,9.7 8.36,9.7 L1.86,9.7 L1.86,1.7 L17.36,10.2 L1.86,18.7 Z"></path></g></g></g></g></svg></div></div></div></div></div><div class="message-mask hidden"></div></div>


Yeah, alright, just getting some Friend visiting, so I'm replying "a bit quick", good-good for the "a bit full" HTML Source, even if it's not really-really easy to read as it requires a lot of Horizontal Scrolling, and contains too many Levels of Nested `DIV`'s to keep track "mentally" of the HTML Structure, but OK, I (manually) simplified it and formatted it a bit to some more readable View...: 8)

Code: Select all

<div class="message-view">
   <div class="message-content">
      <div class="simple-scroller chat-list message-list custom-scroll-bar">
         <div class="scroll-content" style="width: 470px; height: 331px;">
            <div class="top-holder invisible"><i class="im-components-icon im-components-icon-loading im-components-icon-medium"></i></div>
            <div class="message-row user-type-0 row-card-system">
               <div class="avatar-holder"></div>
               <div class="message-contain">
                  <div class="lzd-message-item card-system">
                     <div class="lzd-system-text">19:22</div></div>
                     <div class="message-read-type"></div>
                  </div>
                  <div class="avatar-holder"></div>
               </div>
               <div class="message-row user-type-1 row-card-text"><div class="simple-avatar circle "><img src="//sg-live.slatic.net/original/ebf238e7aa294b55f5198f2a709efa42.png"></div>
               <div class="message-contain">
                  <div class="lzd-message-item card-text">
                     <div class="message-text-box">
                        <div class="lzd-message-text">
                           <span class="emoji-face has-text"><span>tes</span></span>
                        </div>
                     </div>
                  </div>

                  <div class="message-read-type"><span class="read-type">Dibaca</span></div>
               </div>
               <div class="avatar-holder"></div>
            </div>

[...]

                     <div class="message-text-box">
                        <div class="lzd-message-text"><span class="emoji-face has-text"><span>tes456</span></span></div>
                     </div>
                  </div>
                  <div class="message-read-type"><span class="read-type">Dibaca</span></div>
               </div>
               <div class="avatar-holder"></div>
            </div>
         </div>

         <div class="scrollbar-track">
            <div class="scrollbar-thumb" style="height: 136px; top: 185px;"></div></div>
            <div class="scrollbar-track horizontal none">
               <div class="scrollbar-thumb horizontal" style="width: 20px;"></div>
            </div>
         </div>
      </div>

      <div class="message-fields">
         <div class="translation-bar hidden">
            <div class="translation-box">
               <div class="translation-icon state-0">
                  <div class="red"></div>
                  <div class="blue"></div>
               </div>
               <div class="translation-info"><span class="tip hidden">Menerjemahkan...</span>
                  <input class="text editable" placeholder="Terjemahan" value="">
                  <div class="text hidden">
                     <span>Terjemahan gagal</span>
                     <span class="retry">Klik untuk mencoba lagi</span>
                  </div>
               </div>
               <div class="language-mapping"><span class="language-mapping-item">EN</span><span class="language-mapping-item">ID</span></div>
            </div>
         </div>
         <div class="message-fields__box">
            <div class="message-fields__ballon">
               <div class="im-icon im-icon-emoji im-icon-small">

[...]

               </div>
            </div>
         </div>
      </div>
   </div>
   <div class="message-mask hidden"></div>
</div>
Then, OK, not "complicated" to find and tag some Element located after that last `<div class="message-text-box">`, easier actually would be to select directly some Element even outside the big Containing `<div class="message-view">`, but even inside it, => many possible "Candidates" to use as `Anchor`:

Code: Select all

<div class="scrollbar-track">
<div class="message-fields">
<div class="translation-bar hidden">
<div class="translation-box">
<div class="translation-info">
<span class="retry">Klik untuk mencoba lagi</span>
<div class="message-fields__box">
<div class="message-fields__ballon">
<div class="message-mask hidden">
=> Choose the one you want, ah-ah...! 8) I think I would go for the "Klik untuk mencoba lagi" Element that you can specify by its 'TXT' Attribute..., well if that Element is always present of course...!, oh...!, and unique also...! :idea:

>>>

EDIT:
OK, Friend just gone, even if some other one is then coming soon, hum, and a 3rd one also passed by the meantime, well, I'm always quite "popular" during WE's, ah-ah...!, + DJ tomorrow for some mini-Festival... :P

But then, OK, applied to that `SPAN` Element I mentioned, then that would give stg like:

Code: Select all

TAG POS=1 TYPE=SPAN ATTR=TXT:Klik<SP>untuk<SP>mencoba<SP>lagi EXTRACT=TXT
SET !EXTRACT NULL
TAG POS=R-1 TYPE=DIV ATTR=CLASS:message-text-box EXTRACT=TXT
>>>

+ (-1) retracted from Thread on SOF as FCI was added to Qt... :D
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
anggun123
Posts: 55
Joined: Tue Aug 03, 2021 2:39 pm

Re: how to get the last data ?

Post by anggun123 » Sat Aug 21, 2021 10:47 pm

thanks a lot

I edited my code like this
this code works :)

Code: Select all

TAG POS=1 TYPE=SPAN ATTR=class:retry
TAG POS=R-1 TYPE=DIV ATTR=CLASS:message-text-box EXTRACT=TXT
thanks :D
+ (-1) retracted from Thread on SOF as FCI was added to Qt... :D
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: how to get the last data ?

Post by chivracq » Sun Aug 22, 2021 2:30 am

anggun123 wrote:
Sat Aug 21, 2021 10:47 pm
thanks a lot

I edited my code like this
this code works :)

Code: Select all

TAG POS=1 TYPE=SPAN ATTR=class:retry
TAG POS=R-1 TYPE=DIV ATTR=CLASS:message-text-box EXTRACT=TXT
thanks :D
+ (-1) retracted from Thread on SOF as FCI was added to Qt... :D

Oh...!?, yep-yep, very good, "your" "TYPE=SPAN ATTR=class:retry" Element is the same one like "my" "TYPE=SPAN ATTR=TXT:Klik<SP>untuk<SP>mencoba<SP>lagi", that I had "privileged" among the x9 I mentioned because it could be tagged using its 'TXT' Attr, which is usually "easier" for the one who wrote the Script to "later" (weeks/months/years!) re-understand what you had "intended" to do when you had written the Script and you "later" need to go digging in the Script again to check/edit it again because "stg" doesn't work anymore, but if you prefer to identify that Element by its Class, then yep-yep, is perfectly fine also... Good... :|

And that Element is then apparently Not Clickable, I thought that was the Case, from the "Klik" in the Text, ah-ah...!, hence my "fake" `EXTRACT`, + the "SET !EXTRACT NULL" to make sure your "real" `EXTRACT` would then be "clean", ah-ah...! :idea:

Well, then, very good, perfect...! :D

>>>

About `TXT` Attr/Content/Label vs `CLASS` vs `ID`, well..., it's always a "Feeling" about (choosing) which one will "last" longer before "breaking", ah-ah...! :idea:
... And they all break "eventually", Web-Sites get maintained and edited, and "revamped" and "modernized", with sometimes the HTML Structure completely changed, so iMacros Script usually get broken then, when that happens... :oops:

>>>

If you want to get 15 "easy" Rep-Pts on SOF, you can post yourself the Solution as "Answer" (and accept your own Answer + post a Cross-Link to this parallel Thread on our Forum), you "need" the Rep more than me, you are at 50-Rep, and me at 555-Rep, the next "Big" Threshold for me is at 1000-Rep, I "make" 50-100 Rep-Pts per year approx by answering the 'iMacros' Tag, so I still need about 5-7 years before reaching the 1000-Rep, ah-ah...! :shock: 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
anggun123
Posts: 55
Joined: Tue Aug 03, 2021 2:39 pm

Re: how to get the last data ?

Post by anggun123 » Sun Aug 22, 2021 8:42 am

Sorry for this late question

How to know if a new element is entered

while in that area there is already the same element ?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: how to get the last data ?

Post by chivracq » Sun Aug 22, 2021 12:41 pm

anggun123 wrote:
Sun Aug 22, 2021 8:42 am
Sorry for this late question

How to know if a new element is entered

while in that area there is already the same element ?

Euh..., I don't understand what you mean by "new element" + "entered" + "area" + "same element"...? :? :(

Would be easier and clearer if you used the corresponding `<div class="...?...">` for the "Element(s)" and the "Area", then I can "place" them in the HTML Structure that you had posted for the Source within the `<div class="message-view">`. :idea:

But all I can say is that:

Code: Select all

TAG POS=1 TYPE=SPAN ATTR=class:retry
TAG POS=R-1 TYPE=DIV ATTR=CLASS:message-text-box EXTRACT=TXT
... will always "catch" the Last "Element", if your "Element" means the `<div class="message-text-box">` or the `<span>` inside it that contains the Text Content, => "tes456" from the Source you had posted...

And I'm not sure I understand what you want, but make your Script "remember"/store this "tes456", and when you "check again later", in the same Script/Run, or in a next Loop if you loop your Script, compare the New Extracted Value if it's the same like "tes456" or if it's a different (=> = new Value).

Or another Way that I had already mentioned in one of your previous Threads would be to count the total Nb of `<div class="message-text-box">` Elements (using `EXTRACT=HTM` on one of the Containing `DIV`'s, => `<div class="message-view">` for example (but I think there were also a few other "smaller" inner-'DIV''s), + 'split()' on "message-text-box", and the Length of the Array returned by 'split()' -1 would give you that Nb of Occurrences..., that you could also have used with "TAG POS=n" to access it (= the last one) directly, without using 'Neg R-POS`... :idea:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
anggun123
Posts: 55
Joined: Tue Aug 03, 2021 2:39 pm

Re: how to get the last data ?

Post by anggun123 » Sun Aug 22, 2021 1:40 pm

Post Reply