It is currently June 23rd, 2024, 11:42 pm

Web Parser on Amazon

Get help with creating, editing & fixing problems with skins
RicardoTM
Posts: 292
Joined: December 28th, 2022, 9:30 pm
Location: México

Web Parser on Amazon

Post by RicardoTM »

So, I was thinking about making a little skin to display some products prices I want to buy, but I found that WebParser won't work with amazon.

RainRegExp won't return anything and Debug=2 returns:

WebParserDump.txt

Code: Select all

‹      ÿtMKÃ@†ïùÓ½4¡Œ±ÁÖÝ=ù½ËL¾ÈnÂî¤F菗¤Õ‚èå…žá}½)‡B>G†F\oõ’Г¯âˆnVPô£Q„~À.*(I÷šèÐUF•­¯eõâx¬˜d
|l˜JŒBA Ñ&z™­ŽEhG±'
@/Tóë
H=À3	§YvW³¼µŽÓìIç×íXŠ†Bd1j’
Un“ïVö%þ×üK¬ˆî‚#{)È~å’«,ß0[áYòŽNtÙnWç‰ßåÞ¬y>ïnÎ7Ñ?~*¿   ÿÿœP»Â0ÜùŠ*K&§;"üK”º4"¶CbPÕ¯G^bóI÷ðÝ[äçk E¥%h¾snÍ'Õx:§‹·3Ü TQãQX«dÛ­²z+l÷›]N|ì*fožé¦›*ŽÞ¬†mÛ÷‰Âpp­ex @avQÈülDŽpHá/m*×ÊîUþuKr  ÿÿŒ:iwÛ¶²ßõ+$œ¸„iÊ·MR2¸>Žã,½ÎÒ,M[UõAp©¸È)Ùõß߀i7}ïéƒHƒáÌ`f0ÀCýŸ*>1xÿ»†'Û´Ë­ÓÈ«4	À*ïÚvz ¤EZÀ%S{:÷'iô›16“én2é,G¨|Ê:
t2N˜”0ÑØ”&8j
߆C²ƒ±’…NcþÚv·§T§(·m{À%»JÖMUHí}é„ìÐôÓ“#œº¼ª]˜ªn‚2åd—Fx,øÒ0!ØbéC“¦ÎºQ	^Ge©ŽàY†y7¹,jE¨tBL¨ž'
—d¯	8•\güökQYaí|΄£’4ª1ñI€ùÂ]R¾˜ÃßɁBª>¿ó=°.o¤xÀzÿ¥§uuÛC‡¯×Ù-®“TсٽàµH° »F^–ñEU•tÇëºJƒèx¼mQS„2J"š•ñ¥ÜÈÌC_Ï>¾C{²ßï÷]2ÑZîÔ/«êJ$¼˜²é£¿”¬ª£jû螶©$»¾5MpD£Ì)þÝüFËŠÈŽ;µ¬Œè#â, ³ð–"§çªmƒÃ»/,KÌ[™Gn…y¬Ûf°íkeÚ‘mû³æ±üòñ’!dcéd¥ÐËîtxu`-{˜Ž	?pF‚cѸŒš>wd•™ÏÙÉ/¢i•^ â<ˆ#ÃœTPIc²ƒ:¨h—{œF^@3OPá!dK*«Ê‹iT•ùûBcysдòêÞÓøôžjã1KƒfãÃ7í½M™†S—øÆŽfó=H|ÅÐ˳Ïg—ˆæ]|üøþ#¢3A×½xÿõÝ«g/.^ ÊÙN
Ï¥RDžK'kݨ@ªÌ[,i-+xM™·üFz?¸TG3ˆ‰•7²iîÔʶ}%ë7E-«
Ïð¨„dYÜYKñÔiY ¹Áˆ×ˆøÎ ¾§ó‹ïÉ~ïgŽZ¥ëÏ’ÍýäA«_rþXø,ÑM°mÆ}é”…Ôàì°
¨ñwz1t!
a	œÿüÜýù—ÇŸç¿:yõöäëó‹“wn±©2@:®ÂãFBÆ1t|§l:?@sCõl~ööÉÓóÇßyëþöt¤L÷üûÇG?º?žÌŸ>9rŸüðÄ=á襹ÝnGAÈÉo„¨ã*ÊtÀü,ÕaõÁ­)xœÞÇ?žË
X!D¾\åN!o%²Tµ³®Êp š&¹/B³;Iþ}hWëìªPÀˆÙQµÎZax}oh´Ž´°¿õaÇóã ãñüøý‡ãûòõ¾!Oï[ŠýÎ(‘)o$§ Ióõ=FÒ ºÿ•JmóZÝý¥ò:º/Š¢ÉÖ*²éc×`Ey%ÊV‰º7c¦Ãï£ùˆ­¿”ºtr€màÜï-x“ލ£ Ÿˆ†#'Â2žáõ4-¦!i[÷Y¸X/‰eᾯ—d?
 B»ÿÀi¤³IïœLq<ÛZÖ¬21b%ä2¾`Â)«4Nž]€eùÇF¥h”sìÔR՘˖……S—™Ø¶Â9jV2ãµ?ó*–5i[ÌYŒÉi´P˶Å(Èš
1AP/›š§µ×¯¦Fµ'ç6òéÈ‘î®]B(g¬±,óa©Ê,«sJ´bsN¿K*æÒh7”Óͨ¢¶@ˆ¢­Vi(*E¹‚¿ò-©d.ÍÙœ6mR•™D´f(IÃPÚ§E!«¯iX'ˆ^wÍ×2“Ñ-;qiÁ\¿x¶éÄmY3é¶MÒs6Ù,Š%]1ÌO¹^#%ˆØ¨£.
Ê2“¼@Œ^Êh-VK’1n~Ò,­o!ˆ%¢ª£óòÐFÓé1>Õ¼–ÈOðnO|iY‘ÃÃP+ö2Uµ,d…3šP—ø¹ÖÐÜsýðï8¨’*½“ˆŽŒÕØM?(Ÿ1Æ-çŒS=ÙÓÝš+•n¤7s÷Ô!ŒÈ^_ü’Þ±v`^F×U¹~†ÞjO§oNX
mûvöþä^Ú“Ðw£5ó	‡ ¦ÓE!G¯øøÏ?”Ýþ¡ìïŽcŠÐhÕ4ÃèQ¦ÆúàêsH)†ÔSÀJH°Ø,±€ÅÉbÉ‚…/Ê7@rI°wŽ(ËU*\çŽe|q³ÆÿÙN	²¹^üé/m‚ña-“>]œ,ºJs<Ê;GéÎ{¼‚tǨëšáÈðˆYìi„Q(7©hƘhÛ“c×–5‡YYînÆýW¥![Ñ­eá-Û2ÄØùשGv'{‚ÿØÚäx0-˜žU{µ'„¾°,,1JCD_С/,å ˆþ°¦‹ÿضGľGu"d… YͪJC*@Å51+;ReS	é![thÑ:bÛAFÖ¼Ûû3þ€ì­Ã`Éæ#/–þ=MsÂ{MÆc‰>³›#MÜâP'ž×dwÍ®»]ÿ…N¶cšk¥¶mƒÑÎ:$0IÄ,8•Õˆ¤m»7ºÛ;5á’]SAp‘Ë’8‡‰ùòÀÇõˆiøèw„e3­àSî(±–÷eÛbɺ6ßúbŒ…Æûÿ¢èhK`@´-<‡Y>v_«ÓlÁPY [èÍõRðQ:ZSùi¢v ™/Gر‰%›V@vñ)–˜šcNˆ‡áA@2øš…€]Þ™°ùhù}2Ë”q€­ñA,![K1—Æl·§9M|qŠC£^”³9"4næÄ‹µœ´M$Z]àácPFBúe'1Úˆ&„®™Q`Bô¼ÐM×´¹S»4K€µk,å4²m!¿Ÿ]	d_Ûˆ!;!zÖf]“¯Ù’´mÑdcZmۍʺ!ç¨ ä@®î©­!ÀÀä#Q†¥ã$‡Mòì'ËÊ!ÿ7cE€(zK¿Ê´ÀÈûѤJ#cÚsíÌn§Ï÷MâßTDH˚ŖX–û,8N,ÙË(*QÛäI(¨J°€rG§e°ðõFëRÕ+=ê“Ž^=IBüí)ŽYâÈB”¡üòñÍy™¯ËB5ÑÓcɆسöŽÃŽq@F)ÉÅQ_ýø6g°J³2Öv•1(29,¢»Â›ï»a‘â¯,k¶rjeY+gدaØjg+Æø^àŠæx¥¥kҝ^æg½”»9½ÑÎÞ{ICv¢½<wRõüeY¼UI¹¦‚	Ëš…4²QZ¤`³Ÿ{´s.I"Ëš?‹`9ÙYA•,* µÓxŸYt47< 5 ôÝݳmçðÅJmAU¤E3b©k¿ûøü%›¸„6‡&SˆCJm1wÊ4.Ák†Î†g¤ãFœ?Ó°S׶F4ÚÖ0XTAĐ}€zàgÖ‡©;Ôç/?¼;ˆŠ;kÞ(©?¼sàC. ×fç›3í›3훳%¨sôÑm{‹ÑZ íšýŒ¡LûÛ•¶ÆnD;PźðhŸ‘†~Ö¶Š1¦EÒ¶øhÀ±¢x:苶µ;:¼’ Lk9Ñø`!M•ÙèÙ+Y-’¬4dÈVô'Ö»Ž`p¡wþO–…#$xdÿDüº‡¤á	CvM|P˜)‡ZÖ¤ëÌ,<€jß4à ˜È5Ò%&Á”‰›Fn+“[%‹ÿ.-þM°,
²O—ސ¨1qDR•¹Ôa·f®_?»ì¼…_Û6ùŒ_ÑËE½$>®Ù;Xñà[BYK.£î!£W0¿FÚ¶:WTʲðëÞ11úÏØ|ϝ« êÅÑÙäUaí¤Çu
ËŠMî¤e¬(‚0ôw+ª¢/éKú–vþ`½·í—¶Å±e=ǐ=ì
~åÅNÁ7i¬‹pú…6@›"+¹Ù	ðU“Ý_!­BÀ­d˜VRôˆU8‚V$Kí
J¶@Xæ<-.ËrÕ¬
|r•­tÀxQº(‹b˜D”p” %ESÉs>|Qum¸¼n¤êÆWÊ€Ôº,”ìW#
³ŽÏË’Ã	
Ó ke\ÔéFÒPvÀssvÈòžèBùO0ËU(ún}‚!i¦ÅúPY8ÂÈ¢=<$S³C2unêú
~KN]O‡*üÖÖPLÈ‘rŽ=¡7ƒ¨o=1t­„wsPä9DÖ~ÈÈØVG#)s&”MJÙ7ä^ˆªÃâ*H ö·xE'&Óž¨¢85³²™j[Áq@|,L֐àK…# àÏ2CM7aÑd§½ë¡'Ä낉¿iÈ^cELÞTéìÝQ¶9ë“´Š ’|î&Ó>…;ªÛnù[ãˆÿ!3%§b P1c°Ž;Âè-½3Ü݁ÿÔÀ¸VâGìŠîš~ж¹ÏÓɈ!Ë
%…îYTKÿŽ¹>w®ªƒ­L|ºª´K¡¸v˜™e	Mº Ò‡þÁñégí` rB*ˆUÈ£œW+DC¾(–m[ÐjQ,	(DÂ\Š‹CG e+tu¸Ð•bóŽuƒAƒjF%¸thÚðÎn­ˆÐ»Qô ÆËkïò>d¥No&yÈŒöc¼]í¿x²øoâ:ÚPuÖ<îwdÈ@MðRyÍc¥%múM¾Ûj7\ó˜} éŒCõªmKW¬è“Ξý@j
G]Ø¥Õˆñ³ë^×·ªèëú¶„ ¶‘¥Fe@ë:pRó%Aö“Ö:Fw@èåQôð®ùw®šôRÍü¦q³"¸á1+ƒ¶E®>à,òsѽ£l瑪+°©a{XÖÔ'-Byó>ÂH(î!È]Ûº©à°³3e‘Ä1Ÿ«NoÆhõê}Xe¹Å‚rú’>¨³œ™ã؃Š¶MôæjñË’ÀŸîšÍ‰¯W²îù
=_—XïW¡x1Púü-J¿þ¯ß¢ôôüöMJ¿ãÑ®“ë–²ø’áJ€¿yø(
¨ð`súIït÷&Ñßía‹å©Ë:"]ó¢¸ù’A³Éñ%Û©º\{F¥Bdï÷‰Ð)>ï('ô²+ÃâÉÅ«%3´bЁ$tËúˆ]šÐ˜ÊE¼ì’—MzgY扉†/D
_ÄŸÜbÔÈñ~1àXõ‰øàðéÚ85š³µe­1úôáÁ~Ú´ÆṄLÉáñ›þ©wö~nY°¹È1*ä ºë2‚7¡'i]ñB¥ÀÅgØ1!UF5Úºî!0t<ÖÄïJM0ÏÑ€€È¾Ï\îßÚÖ%öÜ7Ŧ{gñ@Åe‰3\f½»ÞXúºúÖ•â|ƒ³~Ï웢ÜÐÉB¾ÙúÜI˜¦¬Øèw
až©Ì –evŸæ
<“yaÈuNž>}üãSÇBf‹Ãf†÷
C	Wï·Å‡ª\˪¾EôCŒÊJšìÑÿššÏ+úCëɈN~e¨’y¹‘:¾2Äëš‹DÃý¡PŽÚ!g;yHTi
ž½475呇xPnäçD¾,³Ñ¨ðyύ֊ÒJÕx
¤"Ѻœ,j²®+<”áís§¢4Í‹ÎêCO±Ñž^°ÄC	zÎg-+ØóBȶMs´ða Ò˜áón+¦M•Þ CNß2?šôoËú*ý™¹ôsé%[,¡„J_úzûÇ^c“^ôÙNß‚ûF`cþ!R™TŒ%N]®gŒ%Ž’YŒGÏewš£‹ûC…D¬L«ˆùÜ1ÚaŸu5ÙuÝ#×üŽž>~òÿÝuÕ°«Íš5ý›¼ÁH„ÅQ•†:9{ƒ‘’J¥eq ÿ;ËâܲÞãï(çpûåÄ~×~%aõS1©Ÿ5»ÕÏö	–„„Ë]ï{»ªˆ!œuw¶îýßñߏºk5ô±scn·àFR¤O-ñÇ°²øÔ¨$ýbVÀ7û^fJPwfeü7ôæÛT¢ž W¨ïv¥ìÁ³Æ;´-S%«¬Tm‹ThDph÷T]ë
|?6׃ó4D{ßÓg›]M+Ð'k£d ?sÙN —&lΘA¡úÜãŽÄÆQ¢\KuhšËÆ!éã»9ÑPÁÞí)…ĆÆPËrƒ½€/nøÒìÅYäK§f.é+*fÊ®ªtà`ÑÁ—ßêDšë€:7·:cQ8.‚¥,òCæš)õ^?„ÍSÒ¶ñi™Š¬ŒÛvÆóâÎÛ6>íꇦ|(é	•ëOCt'¼9
"/ԇ ŒûM´»#¼€n¼hOöþ¡dp%³´çFp'ˆÂ¦Öæ®õ­ßpŒ‰žéçüÓÛçÝXí§ïuJÜ‘Õ—žß§è\s7‡“Â{7ú³ñ¤”/´í'÷¯Í±é½›rþd¸=i®ò­êÛ¹¼þÁ}²z¼	Ÿ*L7×îÍ“ñ¾ÿHL-kÚtV3~ǏÎ?½½LƒŠW·PG~D§swþäGòÿ¼«ù?   ÿÿì]ys⺖ÿ?ŸÂñ›âÙa kÇ\7!$MV:K§ÓCɶ c;¶ÙÜÏ>u$y§ïåMÕTMU*X‹eI>’Îò;Ç›ØÁ
Œ!žX%$Xq‚tÂ…M‚!!áŸc$9þ²Ü*W«ÍÖ·ÃÖå;¾QzU¥Jc`Ï7Š¨Rµ/öœ’×Æ,}P}œ½´½»C^¾_-þü²oa3ªßz¹øÓàK”~rŸ¬÷Fû8J¿·íƒáÇí·žîŒ/þõIÔþþ÷étÿòþŽ¥«Õ§ÖdñøîEõfÅoÏGQùÛáÁôéìÛ<*÷ôë+ïÐÔãöÍkãlr÷oQúqj·Š{,½WÝüyõåg±•»çû­çþüÃê{_]žÄÏÿÑþz5:ª”¢´9‹«I+JŸKÃï/ó¨ý{{ïؼ=	£þ^=üÜN+*ŸßNç×oQùó—Ëýá„Dí5.žÁié5šï£ÆyѼRTÿ(,¾œï?GéÉËÅWû~ü¥§_^Ï/¬~”vÃûS¿ºQû³›âøêÛ}T~wœ¯ÍŸQÿšÅÁ·Ö܈Ê7?^?D÷ïõ«}caéñxJ÷U¯øÕÿñµx|4½ý¥‡Óæóz÷÷â¡Uúö´µ÷å¤Rü>Åôóåèàæýà0¦Cܾ®V£ç]|9ÄãÊâ"*?zœï.ªEšîÁ¿úés«AÑMAù”®çÖß7,…¾eÂÁ,”3+Éó	=Mh"[´¢`øn0°‹&bÇucwüg–ÚQu~eÜ]_ßü¸QÞr;õömBüÅÿRwªÕ×âá¼8=±•Xm·wßÛº	ÝCÕêâúþaZº|âÉËÁ]µØ8Òd¥Zü(NZäªÄ“ßn¿ï_œ±{÷ªgWäüdñfðRã±ÞßxSþÃÛùyú&«Ï÷~ûÇëeÀKÓᏏÁó˜'ŸïÚ'Žñc“ÇO÷Õ»ãKžœ¸Çï?Üûý¨Ãëý·Ÿ°øi7<|Iö+ó¨“'•›£Å™ÃŸ»÷³ñýÑ,b^zõúÕØs[6MîWþõ…Ý?⥣ð¡Þ¿_ó–>^çw{‡ï†ÞüØûÞzõù½îÞÝåӏ§h®|Ožˆwuãeø~r?§÷ö>!…ÂËýÙôæFÿú·ã/G_öJOÕÿ%º8¬ž½ý¼u¼I¦
ì›WÁÃÄ	­19›||4\oq6±l“u-:ßÒÀ4Œ€¦Y}IÎ/È­W€ÈmS$ÄlHøõÉ „;ô&:¯šø>¨µéj€ÖƲ¸à!ƒàüÓ>P)&Æ]£#ž
†ë-·/´…!lû›A'Ę„&¸Ž èlp Šˆ"„­ÁnÕ=Épb˜0rMJÃXبÅI@Pl!ˆÅ=ï‘„­4Jw䤿Ұ‰ZèÝl4l*½`–nX"oš2C4AghˆèÐ-䥷ZIž¶[AŠgŸ„DHˆ-›jˆxŸÄ¹œ+!>h˜êb¿PÀu	kˈe}Ú`/`­õf´¹Þ˜€
îxŒSÅkÄÄŠÚÔÁ*ž4«€‰þ–ÞDA*. à0SƒoŒI¡o+ºNA5b!kšÂg
…?í•Aø0€:y?ᚉ¬æ,Uc:ªòèki¸r-˜Y`<Œ—ˆ ’\$܈0œ‘Ĺ`¹PØ1IQ`iÄ* Ô+*¿;yÙ!’–C<ˆ[
ñ€Ú@¨¾š¥%š’‘Nû:G\E>’tX‘¹Ý(Z‹j*öi“|ê…¾´ä×jœ› Ú
ÅfÞZ=‚7²8}N‚Yò[owfFtë½Ð·˜B°`
Ë]­v
%ô	éþÀnfƒÝ ×ãK)º
¥oR%F`³P[A Ê(“Œ¿B<Ò·F5IOìPe7Nœ`ây®3&YN”dÓšíi7‹E€ˆ"ÓP kBãçÑ:ŒvPI,sº.1ºVÞQVÂ!qÒp}Š˜
&†A`|kYav!/°F~)bçô¹%<¾t…lÙÄBW‹zQøÓö4UQô¦?ÝQä}|[6håäujÑ6%yi+}×oât°¼|—p¦¦“Fn*ö0E³Z$P¬€8§žGRº;¦ïZfÒÎE¤²§¸#
3„	<AÆÚÆO³zðÂ`éð*
6˜ÿFBŽß3T“0(”#m¿®è¾;àÃÚD*7¨½lÁ¢ßHå¦9`)HÜ·Øõ¯F¶;¡ŽŒzVõÙT,¯ÈÁ}-~jMgáI0ÇÀvÝ߃ž¦JqYMJS´,¦áD—Ñ4âB×ž$˜‘¥ˆyãÞšž®8q~Uµ)ÉëK4®ñt}%HÓÇjPR…ãà)ì[¢¼NS>`×"õW*ûƒÁ@{\i‹–¾eª\cŽÆÑõØ2‘.ÔÈʆ‚¨$°LÄEp…Àƒ%á
t(sP¼ð
@D;ž\ûD怑?=Ê ˆrmAÙ#n‘ãƒË¬äˆŒÞÙá|Ú®È 	t-…fSx¡€A×	,	#Ðý£¾’î5ìðc‡;ðÂ@¼EUD"žX"ƒ™ˆ°\ãð$v_C®Ô¸„0ZÎtPé¨ì(éSv‘ç­Ñ•–e¨RLGÞ-mMWøæA¹H~
ûC

[...]
So, does anyone know a way to parse Amazon?
User avatar
SilverAzide
Rainmeter Sage
Posts: 2663
Joined: March 23rd, 2015, 5:26 pm

Re: Web Parser on Amazon

Post by SilverAzide »

RicardoTM wrote: May 19th, 2024, 12:57 pm So, I was thinking about making a little skin to display some products prices I want to buy, but I found that WebParser won't work with amazon.

RainRegExp won't return anything and Debug=2 returns:

So, does anyone know a way to parse Amazon?
It works for me. Your debug file looks a little like an encoding issue, but I get a normal UTF-8 response. So you are going to have to be a little more specific about which URL you are trying to grab. Their site uses a lot of javascript, so it's possible that you won't be able to scrape it.

I found it somewhat amusing that Amazon puts ASCII art comments in the payload, LOL...

Code: Select all

<!--       _
       .__(.)< (MEOW)
        \___)   
 ~~~~~~~~~~~~~~~~~~-->
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 16325
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Web Parser on Amazon

Post by balala »

RicardoTM wrote: May 19th, 2024, 12:57 pm So, I was thinking about making a little skin to display some products prices I want to buy, but I found that WebParser won't work with amazon.
Code please? Which code are you working with?
RicardoTM
Posts: 292
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Web Parser on Amazon

Post by RicardoTM »

Sorry guys, I made it work. I only needed to add the UserAgent and worked right away.

This is the code:

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1

[Metadata]
Name=
Author=
Information=
Version=
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Variables]

[MeterString]
Meter=String

[MeasureSite]
Measure=WebParser
URL=https://www.amazon.com.mx/dp/B0C1TL9CT9/ref=cbw_us_mx_dp_narx_gl_pc?th=1
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
RegExp=(?siU)<span class="a-offscreen">(.*)</span>

[SiteValue]
Measure=WebParser
URL=[MeasureSite]
StringIndex=1
Yep, it was simply a test code to make sure it works before getting creative.
User avatar
balala
Rainmeter Sage
Posts: 16325
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Web Parser on Amazon

Post by balala »

RicardoTM wrote: May 19th, 2024, 11:30 pm This is the code:
Well, to be honest I strongly doubt this is working for you. In fact it is working, indeed it does, but the skin doesn't show anything, due to the Update=-1 option of the [Rainmeter] section. I'm saying this because if you set the Update to -1, the skin is never updated after the very first moment. But WebParser measures need time to get the online results. But after this (few) seconds, even if the [SiteValue] measure get the online value, it is not shown by the (String probably) meter, because it is not updated at this point and is never later. Generally speaking, you either should set the Update to the default Update=1000 (this is the normal and most common Update value for all skins using WebParser measures), or if you want to keep the Update=-1 (even if not recommended, it is completely possible), you have to add a FinishAction option to the parent WebParser measure ([MeasureSite] in this case), to update the String (or whatever) meter, which will show the result (for instance: FinishAction=[!UpdateMeter "Meter-Showing-Result"][!Redraw]. Come back for further explanations if it's not quite clear what I wrote above, because as said, I doubt the skin is showing the result.
RicardoTM
Posts: 292
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Web Parser on Amazon

Post by RicardoTM »

balala wrote: May 20th, 2024, 6:16 am Well, to be honest I strongly doubt this is working for you. In fact it is working, indeed it does, but the skin doesn't show anything, due to the Update=-1 option of the [Rainmeter] section. I'm saying this because if you set the Update to -1, the skin is never updated after the very first moment. But WebParser measures need time to get the online results. But after this (few) seconds, even if the [SiteValue] measure get the online value, it is not shown by the (String probably) meter, because it is not updated at this point and is never later. Generally speaking, you either should set the Update to the default Update=1000 (this is the normal and most common Update value for all skins using WebParser measures), or if you want to keep the Update=-1 (even if not recommended, it is completely possible), you have to add a FinishAction option to the parent WebParser measure ([MeasureSite] in this case), to update the String (or whatever) meter, which will show the result (for instance: FinishAction=[!UpdateMeter "Meter-Showing-Result"][!Redraw]. Come back for further explanations if it's not quite clear what I wrote above, because as said, I doubt the skin is showing the result.
Don't worry about it, the code I shared, as I said, was a simple test that made sure only the required information is parsed, viewable through the About skin tab. Not meant to display anything. The skin I'm making however, has the appropriate bangs to make sure everything displays correctly, from product images to prices.
RicardoTM
Posts: 292
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Web Parser on Amazon

Post by RicardoTM »

I got another question tho

I want to add a Lowest Price value, which would only change if the current price is less than the lowest price.

So, this is what I have so far:

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1
DynamicWindowSize=1

[Metadata]
Name=
Author=
Information=
Version=
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Variables]
Product1Link=https://www.amazon.com.mx/dp/B0C1TL9CT9/ref=cbw_us_mx_dp_narx_gl_pc?th=1

[MSTextS]
FontSize=8
StringStyle=Bold
h=25
w=170
FontColor=184,184,184
ClipString=2

[MSTextB]
FontSize=12
AntiAlias=1
FontColor=184,184,184

[MSImages]
H=50
W=50
PreserveAspectRatio=2
AntiAlias=1
DynamicVariables=1

[BG]
Meter=Shape
Shape=Rectangle 0,0,250,200 | Fill Color 020,020,020 | StrokeWidth 0

[Product1]
Measure=WebParser
URL=[#Product1Link]
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
RegExp=(?siU)id="twister-plus-price-data-price" value="(.*)".*<span id="tp-tool-tip-subtotal-price-currency-symbol" class="a-size-medium a-price-symbol">(.*)</span>.*<ul class="a-unordered-list a-nostyle a-horizontal list maintain-height">.*src="(.*)".*<span id="productTitle" class="a-size-large product-title-word-break">\s*(\S.*)</span>
FinishAction=[!EnableMeasure Product1MinPriceM][!Update]

[Product1SymbolM]
Measure=WebParser
URL=[Product1]
StringIndex=2
FinishAction=[!Update]

[Product1ImageM]
Measure=WebParser
URL=[Product1]
StringIndex=3
Download=1
FinishAction=[!Update]

[Product1Image]
Meter=Image
MeasureName=[#CurrentSection]M
MeterStyle=MSImages
y=10
x=10
LeftMouseUpAction=[#Product1Link#]

[Product1TitleM]
Measure=WebParser
URL=[Product1]
StringIndex=4

[Product1Title]
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextS
X=10R
y=2r
LeftMouseUpAction=[#Product1Link#]

[Product1PriceM]
Measure=WebParser
URL=[Product1]
StringIndex=1
RegExpSubstitute=1
Substitute=^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":"
DynamicVariables=1

[Product1Price]
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB
Text=[Product1SymbolM]%1
y=5R
x=r
And I tried adding:

Code: Select all

[Variables]
Product1MinPrice=SomeValue

[Product1MinPriceM]
Disabled=1
Measure=Calc
IfCondition=[Product1PriceM]<[#Product1MinPrice]
IfTrueAction=[!SetVariable Product1MinPrice [Product1PriceM]][!Update][!WriteKey....]
DynamicVariables=1
With everything else added (lowest price meter and enable measure and update bangs), the whole code ends up like this:

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1
DynamicWindowSize=1

[Metadata]
Name=
Author=
Information=
Version=
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Variables]
Product1Link=https://www.amazon.com.mx/dp/B0C1TL9CT9/ref=cbw_us_mx_dp_narx_gl_pc?th=1
Product1MinPrice=5000

[MSTextS]
FontSize=8
StringStyle=Bold
h=25
w=170
FontColor=184,184,184
ClipString=2

[MSTextB]
FontSize=12
AntiAlias=1
FontColor=184,184,184

[MSTextM]
FontColor=143,143,143

[MSImages]
H=50
W=50
PreserveAspectRatio=2
AntiAlias=1
DynamicVariables=1

[BG]
Meter=Shape
Shape=Rectangle 0,0,250,200 | Fill Color 020,020,020 | StrokeWidth 0

[Product1]
Measure=WebParser
URL=[#Product1Link]
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
RegExp=(?siU)id="twister-plus-price-data-price" value="(.*)".*<span id="tp-tool-tip-subtotal-price-currency-symbol" class="a-size-medium a-price-symbol">(.*)</span>.*<ul class="a-unordered-list a-nostyle a-horizontal list maintain-height">.*src="(.*)".*<span id="productTitle" class="a-size-large product-title-word-break">\s*(\S.*)</span>
FinishAction=[!EnableMeasure Product1MinPriceM][!Update]

[Product1SymbolM]
Measure=WebParser
URL=[Product1]
StringIndex=2
FinishAction=[!Update]

[Product1ImageM]
Measure=WebParser
URL=[Product1]
StringIndex=3
Download=1
FinishAction=[!Update]

[Product1Image]
Meter=Image
MeasureName=[#CurrentSection]M
MeterStyle=MSImages
y=10
x=10
LeftMouseUpAction=[#Product1Link#]

[Product1TitleM]
Measure=WebParser
URL=[Product1]
StringIndex=4

[Product1Title]
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextS
X=10R
y=2r
LeftMouseUpAction=[#Product1Link#]

[Product1PriceM]
Measure=WebParser
URL=[Product1]
StringIndex=1
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
DynamicVariables=1

[Product1Price]
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB
Text=[Product1SymbolM]%1
y=5R
x=r
DynamicVariables=1

[Product1MinPriceM]
Disabled=1
Measure=String
String=[#Product1MinPrice]
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
IfCondition=[Product1PriceM] < [#Product1MinPrice]
IfTrueAction=[!SetVariable Product1MinPrice [Product1PriceM]][!WriteKeyValue variables Product1MinPrice [#Product1MinPrice]][!Update]
DynamicVariables=1

[Product1MinPrice]
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB|MSTextM
Text=[Product1SymbolM]%1
y=r
x=10R
DynamicVariables=1
And it doesn't work...

The problem is with the Substitutes on [Product1PriceM] and [Product1MinPriceM], which I made to format the numbers, so it is 1,000.00 instead of 1000.00.

If we comment those out, the ifConditions work, and the Product1MinPrice updates correctly.

I tried using [Product1PriceM:] instead but it will show 0 instead of the correct price, (which should be the same as the current price).

According to my ignorance, when a measure has number and string values, it should use the number value when doing calculations, instead it decides to use none.

What am I doing wrong?

Edit:

Duh, I had to use Product1PriceM without brackets on the ifCondition and [Product1PriceM:] on the action, silly me.
RicardoTM
Posts: 292
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Web Parser on Amazon

Post by RicardoTM »

Hey balala, just a <quick> question about the time it takes to parse a website.

I decided to go with Update-1 (I like to sync it manually to avoid it from taking resources each update). i was wondering if it is causing it to parse slower, I don't use web parser skins so I'm not aware of the time it takes, but the deviant art example on the documentation loads fairly quickly compared to mine.

This is the code I have so far:

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1
DynamicWindowSize=1
MiddleMouseUpAction=[!CommandMeasure Product1 Update][!CommandMeasure Product2 Update][!CommandMeasure Product3 Update][!CommandMeasure Product4 Update][!CommandMeasure Product5 Update]

[Metadata]
Name=PriceScraper
Author=RicardoTM
Information=
Version=
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Variables]
nProducts=5
Amazon=id="twister-plus-price-data-price" value="(.*)".*<span id="tp-tool-tip-subtotal-price-currency-symbol" class="a-size-medium a-price-symbol">(.*)</span>.*<ul class="a-unordered-list a-nostyle a-horizontal list maintain-height">.*src="(.*)".*<span id="productTitle" class="a-size-large product-title-word-break">\s*(\S.*)</span>

Product1Link=https://www.amazon.com.mx/CableMod-ModFlex-Cable-interno-%C3%A1ngulo/dp/B0799G9MMX
Product1CurPrice=568.37
Product1PrePrice=568.37
Product1LowPrice=568.37

Product2Link=https://www.amazon.com.mx/dp/B0BHJDY57J/ref=cbw_us_mx_dp_narx_gl_pc
Product2CurPrice=3699
Product2PrePrice=3699
Product2LowPrice=3699

Product3Link=https://www.amazon.com.mx/dp/B0C1TL9CT9/ref=cbw_us_mx_dp_narx_gl_pc
Product3CurPrice=4501.32
Product3PrePrice=4501.32
Product3LowPrice=4501.32

Product4Link=https://www.amazon.com.mx/gp/product/B0CG11C7PX/ref=ox_sc_act_title_1?smid=A1G99GVHAT2WD8
Product4CurPrice=5328.15
Product4PrePrice=5328.15
Product4LowPrice=5328.15

Product5Link=https://www.amazon.com.mx/Asus-GeForce-Tarjeta-gr%C3%A1fica-DisplayPort/dp/B0C4BT9N8T
Product5CurPrice=13490
Product5PrePrice=13399
Product5LowPrice=13399

[MSTextS]
FontSize=8
StringStyle=Bold
h=25
w=220
X=10R
y=2r
AntiAlias=1
FontColor=184,184,184
ClipString=2

[MSTextB]
FontSize=10
AntiAlias=1
FontColor=184,184,184
y=5R
x=r

[MSTextM]
FontColor=143,143,143
FontSize=8
y=r
x=5R

[MSTextInc]
FontColor=143,143,143
AntiAlias=1
FontSize=8
y=5r
x=R

[MSImages]
H=50
W=50
x=10
y=9R
PreserveAspectRatio=1
SolidColor=255,255,255
AntiAlias=1
DynamicVariables=1

[BG]
Meter=Shape
Shape=Rectangle 0,0,300,(70*([#nProducts]-0.5)-5) | Fill Color 020,020,020 | StrokeWidth 0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;					PRODUCT 1				   ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[Product1]
Group=Products
Measure=WebParser
URL=[#Product1Link]
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
RegExp=(?siU)[#Amazon]
FinishAction=[!EnableMeasureGroup Product1]

[Product1SymbolM]
Disabled=1
Group=Product1
Measure=WebParser
URL=[Product1]
StringIndex=2

[Product1ImageM]
Disabled=1
Group=Product1
Measure=WebParser
URL=[Product1]
StringIndex=3
Download=1
FinishAction=[!ShowMeterGroup Product1][!Update]

[Product1Image]
Hidden=1
Group=Product1
Meter=Image
MeasureName=[#CurrentSection]M
MeterStyle=MSImages
y=10
LeftMouseUpAction=[#Product1Link#]

[Product1TitleM]
Disabled=1
Group=Product1
Measure=WebParser
URL=[Product1]
StringIndex=4

[Product1Title]
Hidden=1
Group=Product1
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextS
LeftMouseUpAction=[#Product1Link#]

[Product1PriceM]
Disabled=1
Group=Product1
Measure=WebParser
URL=[Product1]
StringIndex=1
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
IfCondition=Product1PriceM <> [#Product1CurPrice] && (Product1PriceM > 0)
IfTrueAction=[!SetVariable Product1PrePrice [#Product1CurPrice]][!SetVariable Product1CurPrice [Product1PriceM:]][!Update][!WriteKeyValue variables Product1PrePrice [#Product1PrePrice]][!WriteKeyValue variables Product1CurPrice [#Product1CurPrice]]
IFCondition2=Product1PriceM = [#Product1PrePrice] 
IfTrueAction2=[!SetOption Product1Price InLineSetting "Color | 184,184,184"][!SetOption Product1Price Text [&*Product1SymbolM*]%1[\x2010]][!SetOption Product1PriceP MeasureName ""][!SetOption Product1PriceP Text ""][!SetOption Product1PriceP FontColor 184,184,184]
IFCondition3=Product1PriceM > [#Product1PrePrice] && (Product1PriceM < [#Product1PrePrice]*1.05)
IfTrueAction3=[!SetOption Product1Price InLineSetting "Color | 184,184,184"][!SetOption Product1Price Text [&*Product1SymbolM*]%1[\x25B2]][!SetOption Product1PriceP FontColor 184,184,184]
IFCondition4=Product1PriceM >= [#Product1PrePrice]*1.05
IfTrueAction4=[!SetOption Product1Price InLineSetting "Color | 215,071,071"][!SetOption Product1Price Text [&*Product1SymbolM*]%1[\x25B2]][!SetOption Product1PriceP FontColor 215,071,071]
IFCondition5=Product1PriceM < [#Product1PrePrice] && (Product1PriceM > [#Product1PrePrice]/1.05)
IfTrueAction5=[!SetOption Product1Price InLineSetting "Color | 184,184,184"][!SetOption Product1Price Text [&*Product1SymbolM*]%1[\x25BC]][!SetOption Product1PriceP FontColor 184,184,184]
IFCondition6=Product1PriceM <= [#Product1PrePrice]/1.05
IfTrueAction6=[!SetOption Product1Price InLineSetting "Color | 167,229,138"][!SetOption Product1Price Text [&*Product1SymbolM*]%1[\x25BC]][!SetOption Product1PriceP FontColor 167,229,138]
DynamicVariables=1

[Product1Price]
Hidden=1
Group=Product1
Meter=String
MeasureName=[#CurrentSection]M
InLinePattern=[\x25B2]|[\x25BC]|[\x2010]
MeterStyle=MSTextB
DynamicVariables=1

[Product1PricePM]
Disabled=1
Group=Product1
Measure=Calc
Formula=((Product1PriceM-[#Product1PrePrice])/[#Product1PrePrice])*100
DynamicVariables=1

[Product1PriceP]
Hidden=1
Group=Product1
Meter=String
MeasureName=[#CurrentSection]M
NumOfDecimals=1
Text=(%1%)
MeterStyle=MSTextInc
y=2r

[Product1PrePriceM]
Disabled=1
Group=Product1
Measure=String
String=[#Product1PrePrice]
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
DynamicVariables=1

[Product1PrePrice]
Hidden=1
Group=Product1
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB|MSTextM
Text=[Product1SymbolM]%1
DynamicVariables=1

[Product1LowPriceM]
Disabled=1
Group=Product1
Measure=String
String=[#Product1LowPrice]
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
IfCondition=Product1PriceM < [#Product1LowPrice]
IfTrueAction=[!SetVariable Product1LowPrice [Product1PriceM:]][!WriteKeyValue variables Product1LowPrice [#Product1LowPrice]][!Update]
IfCondition2=Product1PriceM <= [#Product1LowPrice]*1.02
IfTrueAction2=[!SetOption Product1Price FontColor 167,229,138][!SetOption Product1LowPrice FontColor 167,229,138][!SetOption Product1LowPriceP FontColor 167,229,138]  
IFCondition3=Product1PriceM >= [#Product1LowPrice]*1.05
IfTrueAction3=[!SetOption Product1Price FontColor 215,071,071][!SetOption Product1LowPriceP FontColor 215,071,071]
IFCondition4=Product1PriceM = [#Product1LowPrice]
IfTrueAction4=[!SetOption Product1LowPriceP MeasureName ""][!SetOption Product1LowPriceP Text ""][!SetOption Product1LowPriceP FontColor 184,184,184]
DynamicVariables=1

[Product1LowPrice]
Hidden=1
Group=Product1
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB|MSTextM
y=r
Text=[Product1SymbolM]%1
DynamicVariables=1

[Product1LowPricePM]
Disabled=1
Group=Product1
Measure=Calc
Formula=((Product1PriceM-[#Product1LowPrice])/[#Product1LowPrice])*100
DynamicVariables=1

[Product1LowPriceP]
Hidden=1
Group=Product1
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextInc
NumOfDecimals=1
Text=(%1%)
y=r
DynamicVariables=1

[Product1Separator]
Hidden=1
Group=Product1
Meter=Image
H=1
W=1
X=10
Y=([Product1Image:Y]+[Product1Image:H])
DynamicVariables=1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;					PRODUCT 2				   ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[Product2]
Group=Products
Measure=WebParser
URL=[#Product2Link]
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
RegExp=(?siU)[#Amazon]
FinishAction=[!EnableMeasureGroup Product2]

[Product2SymbolM]
Disabled=1
Group=Product2
Measure=WebParser
URL=[Product2]
StringIndex=2

[Product2ImageM]
Disabled=1
Group=Product2
Measure=WebParser
URL=[Product2]
StringIndex=3
Download=1
FinishAction=[!ShowMeterGroup Product2][!Update]

[Product2Image]
Hidden=1
Group=Product2
Meter=Image
MeasureName=[#CurrentSection]M
MeterStyle=MSImages
LeftMouseUpAction=[#Product2Link#]

[Product2TitleM]
Disabled=1
Group=Product2
Measure=WebParser
URL=[Product2]
StringIndex=4

[Product2Title]
Hidden=1
Group=Product2
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextS
LeftMouseUpAction=[#Product2Link#]

[Product2PriceM]
Disabled=1
Group=Product2
Measure=WebParser
URL=[Product2]
StringIndex=1
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
IfCondition=Product2PriceM <> [#Product2CurPrice] && (Product2PriceM > 0)
IfTrueAction=[!SetVariable Product2PrePrice [#Product2CurPrice]][!SetVariable Product2CurPrice [Product2PriceM:]][!Update][!WriteKeyValue variables Product2PrePrice [#Product2PrePrice]][!WriteKeyValue variables Product2CurPrice [#Product2CurPrice]]
IFCondition2=Product2PriceM = [#Product2PrePrice] 
IfTrueAction2=[!SetOption Product2Price InLineSetting "Color | 184,184,184"][!SetOption Product2Price Text [&*Product2SymbolM*]%1[\x2010]][!SetOption Product2PriceP MeasureName ""][!SetOption Product2PriceP Text ""][!SetOption Product2PriceP FontColor 184,184,184]
IFCondition3=Product2PriceM > [#Product2PrePrice] && (Product2PriceM < [#Product2PrePrice]*1.05)
IfTrueAction3=[!SetOption Product2Price InLineSetting "Color | 184,184,184"][!SetOption Product2Price Text [&*Product2SymbolM*]%1[\x25B2]][!SetOption Product2PriceP FontColor 184,184,184]
IFCondition4=Product2PriceM >= [#Product2PrePrice]*1.05
IfTrueAction4=[!SetOption Product2Price InLineSetting "Color | 215,071,071"][!SetOption Product2Price Text [&*Product2SymbolM*]%1[\x25B2]][!SetOption Product2PriceP FontColor 215,071,071]
IFCondition5=Product2PriceM < [#Product2PrePrice] && (Product2PriceM > [#Product2PrePrice]/1.05)
IfTrueAction5=[!SetOption Product2Price InLineSetting "Color | 184,184,184"][!SetOption Product2Price Text [&*Product2SymbolM*]%1[\x25BC]][!SetOption Product2PriceP FontColor 184,184,184]
IFCondition6=Product2PriceM <= [#Product2PrePrice]/1.05
IfTrueAction6=[!SetOption Product2Price InLineSetting "Color | 167,229,138"][!SetOption Product2Price Text [&*Product2SymbolM*]%1[\x25BC]][!SetOption Product2PriceP FontColor 167,229,138]
DynamicVariables=1

[Product2Price]
Hidden=1
Group=Product2
Meter=String
MeasureName=[#CurrentSection]M
InLinePattern=[\x25B2]|[\x25BC]|[\x2010]
MeterStyle=MSTextB
DynamicVariables=1

[Product2PricePM]
Disabled=1
Group=Product2
Measure=Calc
Formula=((Product2PriceM-[#Product2PrePrice])/[#Product2PrePrice])*100
DynamicVariables=1

[Product2PriceP]
Hidden=1
Group=Product2
Meter=String
MeasureName=[#CurrentSection]M
NumOfDecimals=1
Text=(%1%)
MeterStyle=MSTextInc
y=2r

[Product2PrePriceM]
Disabled=1
Group=Product2
Measure=String
String=[#Product2PrePrice]
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
DynamicVariables=1

[Product2PrePrice]
Hidden=1
Group=Product2
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB|MSTextM
Text=[Product2SymbolM]%1
DynamicVariables=1

[Product2LowPriceM]
Disabled=1
Group=Product2
Measure=String
String=[#Product2LowPrice]
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
IfCondition=Product2PriceM < [#Product2LowPrice]
IfTrueAction=[!SetVariable Product2LowPrice [Product2PriceM:]][!WriteKeyValue variables Product2LowPrice [#Product2LowPrice]][!Update]
IfCondition2=Product2PriceM <= [#Product2LowPrice]*1.02
IfTrueAction2=[!SetOption Product2Price FontColor 167,229,138][!SetOption Product2LowPrice FontColor 167,229,138][!SetOption Product2LowPriceP FontColor 167,229,138]  
IFCondition3=Product2PriceM >= [#Product2LowPrice]*1.05
IfTrueAction3=[!SetOption Product2Price FontColor 215,071,071][!SetOption Product2LowPriceP FontColor 215,071,071]
IFCondition4=Product2PriceM = [#Product2LowPrice]
IfTrueAction4=[!SetOption Product2LowPriceP MeasureName ""][!SetOption Product2LowPriceP Text ""][!SetOption Product2LowPriceP FontColor 184,184,184]
DynamicVariables=1

[Product2LowPrice]
Hidden=1
Group=Product2
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB|MSTextM
y=r
Text=[Product2SymbolM]%1
DynamicVariables=1

[Product2LowPricePM]
Disabled=1
Group=Product2
Measure=Calc
Formula=((Product2PriceM-[#Product2LowPrice])/[#Product2LowPrice])*100
DynamicVariables=1

[Product2LowPriceP]
Hidden=1
Group=Product2
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextInc
NumOfDecimals=1
Text=(%1%)
y=r
DynamicVariables=1

[Product2Separator]
Hidden=1
Group=Product2
Meter=Image
H=1
W=1
X=10
Y=([Product2Image:Y]+[Product2Image:H])
DynamicVariables=1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;					PRODUCT 3				   ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[Product3]
Group=Products
Measure=WebParser
URL=[#Product3Link]
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
RegExp=(?siU)[#Amazon]
FinishAction=[!EnableMeasureGroup Product3]

[Product3SymbolM]
Disabled=1
Group=Product3
Measure=WebParser
URL=[Product3]
StringIndex=2

[Product3ImageM]
Disabled=1
Group=Product3
Measure=WebParser
URL=[Product3]
StringIndex=3
Download=1
FinishAction=[!ShowMeterGroup Product3][!Update]

[Product3Image]
Hidden=1
Group=Product3
Meter=Image
MeasureName=[#CurrentSection]M
MeterStyle=MSImages
LeftMouseUpAction=[#Product3Link#]

[Product3TitleM]
Disabled=1
Group=Product3
Measure=WebParser
URL=[Product3]
StringIndex=4

[Product3Title]
Hidden=1
Group=Product3
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextS
LeftMouseUpAction=[#Product3Link#]

[Product3PriceM]
Disabled=1
Group=Product3
Measure=WebParser
URL=[Product3]
StringIndex=1
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
IfCondition=Product3PriceM <> [#Product3CurPrice] && (Product3PriceM > 0)
IfTrueAction=[!SetVariable Product3PrePrice [#Product3CurPrice]][!SetVariable Product3CurPrice [Product3PriceM:]][!Update][!WriteKeyValue variables Product3PrePrice [#Product3PrePrice]][!WriteKeyValue variables Product3CurPrice [#Product3CurPrice]]
IFCondition2=Product3PriceM = [#Product3PrePrice] 
IfTrueAction2=[!SetOption Product3Price InLineSetting "Color | 184,184,184"][!SetOption Product3Price Text [&*Product3SymbolM*]%1[\x2010]][!SetOption Product3PriceP MeasureName ""][!SetOption Product3PriceP Text ""][!SetOption Product3PriceP FontColor 184,184,184]
IFCondition3=Product3PriceM > [#Product3PrePrice] && (Product3PriceM < [#Product3PrePrice]*1.05)
IfTrueAction3=[!SetOption Product3Price InLineSetting "Color | 184,184,184"][!SetOption Product3Price Text [&*Product3SymbolM*]%1[\x25B2]][!SetOption Product3PriceP FontColor 184,184,184]
IFCondition4=Product3PriceM >= [#Product3PrePrice]*1.05
IfTrueAction4=[!SetOption Product3Price InLineSetting "Color | 215,071,071"][!SetOption Product3Price Text [&*Product3SymbolM*]%1[\x25B2]][!SetOption Product3PriceP FontColor 215,071,071]
IFCondition5=Product3PriceM < [#Product3PrePrice] && (Product3PriceM > [#Product3PrePrice]/1.05)
IfTrueAction5=[!SetOption Product3Price InLineSetting "Color | 184,184,184"][!SetOption Product3Price Text [&*Product3SymbolM*]%1[\x25BC]][!SetOption Product3PriceP FontColor 184,184,184]
IFCondition6=Product3PriceM <= [#Product3PrePrice]/1.05
IfTrueAction6=[!SetOption Product3Price InLineSetting "Color | 167,229,138"][!SetOption Product3Price Text [&*Product3SymbolM*]%1[\x25BC]][!SetOption Product3PriceP FontColor 167,229,138]
DynamicVariables=1

[Product3Price]
Hidden=1
Group=Product3
Meter=String
MeasureName=[#CurrentSection]M
InLinePattern=[\x25B2]|[\x25BC]|[\x2010]
MeterStyle=MSTextB
DynamicVariables=1

[Product3PricePM]
Disabled=1
Group=Product3
Measure=Calc
Formula=((Product3PriceM-[#Product3PrePrice])/[#Product3PrePrice])*100
DynamicVariables=1

[Product3PriceP]
Hidden=1
Group=Product3
Meter=String
MeasureName=[#CurrentSection]M
NumOfDecimals=1
Text=(%1%)
MeterStyle=MSTextInc
y=2r

[Product3PrePriceM]
Disabled=1
Group=Product3
Measure=String
String=[#Product3PrePrice]
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
DynamicVariables=1

[Product3PrePrice]
Hidden=1
Group=Product3
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB|MSTextM
Text=[Product3SymbolM]%1
DynamicVariables=1

[Product3LowPriceM]
Disabled=1
Group=Product3
Measure=String
String=[#Product3LowPrice]
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
IfCondition=Product3PriceM < [#Product3LowPrice]
IfTrueAction=[!SetVariable Product3LowPrice [Product3PriceM:]][!WriteKeyValue variables Product3LowPrice [#Product3LowPrice]][!Update]
IfCondition2=Product3PriceM <= [#Product3LowPrice]*1.02
IfTrueAction2=[!SetOption Product3Price FontColor 167,229,138][!SetOption Product3LowPrice FontColor 167,229,138][!SetOption Product3LowPriceP FontColor 167,229,138]  
IFCondition3=Product3PriceM >= [#Product3LowPrice]*1.05
IfTrueAction3=[!SetOption Product3Price FontColor 215,071,071][!SetOption Product3LowPriceP FontColor 215,071,071]
IFCondition4=Product3PriceM = [#Product3LowPrice]
IfTrueAction4=[!SetOption Product3LowPriceP MeasureName ""][!SetOption Product3LowPriceP Text ""][!SetOption Product3LowPriceP FontColor 184,184,184]
DynamicVariables=1

[Product3LowPrice]
Hidden=1
Group=Product3
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB|MSTextM
y=r
Text=[Product3SymbolM]%1
DynamicVariables=1

[Product3LowPricePM]
Disabled=1
Group=Product3
Measure=Calc
Formula=((Product3PriceM-[#Product3LowPrice])/[#Product3LowPrice])*100
DynamicVariables=1

[Product3LowPriceP]
Hidden=1
Group=Product3
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextInc
NumOfDecimals=1
Text=(%1%)
y=r
DynamicVariables=1

[Product3Separator]
Hidden=1
Group=Product3
Meter=Image
H=1
W=1
X=10
Y=([Product3Image:Y]+[Product3Image:H])
DynamicVariables=1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;					PRODUCT 4				   ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[Product4]
Group=Products
Measure=WebParser
URL=[#Product4Link]
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
RegExp=(?siU)[#Amazon]
FinishAction=[!EnableMeasureGroup Product4]

[Product4SymbolM]
Disabled=1
Group=Product4
Measure=WebParser
URL=[Product4]
StringIndex=2

[Product4ImageM]
Disabled=1
Group=Product4
Measure=WebParser
URL=[Product4]
StringIndex=3
Download=1
FinishAction=[!ShowMeterGroup Product4][!Update]

[Product4Image]
Hidden=1
Group=Product4
Meter=Image
MeasureName=[#CurrentSection]M
MeterStyle=MSImages
LeftMouseUpAction=[#Product4Link#]

[Product4TitleM]
Disabled=1
Group=Product4
Measure=WebParser
URL=[Product4]
StringIndex=4

[Product4Title]
Hidden=1
Group=Product4
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextS
LeftMouseUpAction=[#Product4Link#]

[Product4PriceM]
Disabled=1
Group=Product4
Measure=WebParser
URL=[Product4]
StringIndex=1
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
IfCondition=Product4PriceM <> [#Product4CurPrice] && (Product4PriceM > 0)
IfTrueAction=[!SetVariable Product4PrePrice [#Product4CurPrice]][!SetVariable Product4CurPrice [Product4PriceM:]][!Update][!WriteKeyValue variables Product4PrePrice [#Product4PrePrice]][!WriteKeyValue variables Product4CurPrice [#Product4CurPrice]]
IFCondition2=Product4PriceM = [#Product4PrePrice] 
IfTrueAction2=[!SetOption Product4Price InLineSetting "Color | 184,184,184"][!SetOption Product4Price Text [&*Product4SymbolM*]%1[\x2010]][!SetOption Product4PriceP MeasureName ""][!SetOption Product4PriceP Text ""][!SetOption Product4PriceP FontColor 184,184,184]
IFCondition3=Product4PriceM > [#Product4PrePrice] && (Product4PriceM < [#Product4PrePrice]*1.05)
IfTrueAction3=[!SetOption Product4Price InLineSetting "Color | 184,184,184"][!SetOption Product4Price Text [&*Product4SymbolM*]%1[\x25B2]][!SetOption Product4PriceP FontColor 184,184,184]
IFCondition4=Product4PriceM >= [#Product4PrePrice]*1.05
IfTrueAction4=[!SetOption Product4Price InLineSetting "Color | 215,071,071"][!SetOption Product4Price Text [&*Product4SymbolM*]%1[\x25B2]][!SetOption Product4PriceP FontColor 215,071,071]
IFCondition5=Product4PriceM < [#Product4PrePrice] && (Product4PriceM > [#Product4PrePrice]/1.05)
IfTrueAction5=[!SetOption Product4Price InLineSetting "Color | 184,184,184"][!SetOption Product4Price Text [&*Product4SymbolM*]%1[\x25BC]][!SetOption Product4PriceP FontColor 184,184,184]
IFCondition6=Product4PriceM <= [#Product4PrePrice]/1.05
IfTrueAction6=[!SetOption Product4Price InLineSetting "Color | 167,229,138"][!SetOption Product4Price Text [&*Product4SymbolM*]%1[\x25BC]][!SetOption Product4PriceP FontColor 167,229,138]
DynamicVariables=1

[Product4Price]
Hidden=1
Group=Product4
Meter=String
MeasureName=[#CurrentSection]M
InLinePattern=[\x25B2]|[\x25BC]|[\x2010]
MeterStyle=MSTextB
DynamicVariables=1

[Product4PricePM]
Disabled=1
Group=Product4
Measure=Calc
Formula=((Product4PriceM-[#Product4PrePrice])/[#Product4PrePrice])*100
DynamicVariables=1

[Product4PriceP]
Hidden=1
Group=Product4
Meter=String
MeasureName=[#CurrentSection]M
NumOfDecimals=1
Text=(%1%)
MeterStyle=MSTextInc
y=2r

[Product4PrePriceM]
Disabled=1
Group=Product4
Measure=String
String=[#Product4PrePrice]
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
DynamicVariables=1

[Product4PrePrice]
Hidden=1
Group=Product4
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB|MSTextM
Text=[Product4SymbolM]%1
DynamicVariables=1

[Product4LowPriceM]
Disabled=1
Group=Product4
Measure=String
String=[#Product4LowPrice]
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
IfCondition=Product4PriceM < [#Product4LowPrice]
IfTrueAction=[!SetVariable Product4LowPrice [Product4PriceM:]][!WriteKeyValue variables Product4LowPrice [#Product4LowPrice]][!Update]
IfCondition2=Product4PriceM <= [#Product4LowPrice]*1.02
IfTrueAction2=[!SetOption Product4Price FontColor 167,229,138][!SetOption Product4LowPrice FontColor 167,229,138][!SetOption Product4LowPriceP FontColor 167,229,138]  
IFCondition3=Product4PriceM >= [#Product4LowPrice]*1.05
IfTrueAction3=[!SetOption Product4Price FontColor 215,071,071][!SetOption Product4LowPriceP FontColor 215,071,071]
IFCondition4=Product4PriceM = [#Product4LowPrice]
IfTrueAction4=[!SetOption Product4LowPriceP MeasureName ""][!SetOption Product4LowPriceP Text ""][!SetOption Product4LowPriceP FontColor 184,184,184]
DynamicVariables=1

[Product4LowPrice]
Hidden=1
Group=Product4
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB|MSTextM
y=r
Text=[Product4SymbolM]%1
DynamicVariables=1

[Product4LowPricePM]
Disabled=1
Group=Product4
Measure=Calc
Formula=((Product4PriceM-[#Product4LowPrice])/[#Product4LowPrice])*100
DynamicVariables=1

[Product4LowPriceP]
Hidden=1
Group=Product4
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextInc
NumOfDecimals=1
Text=(%1%)
y=r
DynamicVariables=1

[Product4Separator]
Hidden=1
Group=Product4
Meter=Image
H=1
W=1
X=10
Y=([Product4Image:Y]+[Product4Image:H])
DynamicVariables=1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;					PRODUCT 5				   ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[Product5]
Group=Products
Measure=WebParser
URL=[#Product5Link]
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
RegExp=(?siU)[#Amazon]
FinishAction=[!EnableMeasureGroup Product5]

[Product5SymbolM]
Disabled=1
Group=Product5
Measure=WebParser
URL=[Product5]
StringIndex=2

[Product5ImageM]
Disabled=1
Group=Product5
Measure=WebParser
URL=[Product5]
StringIndex=3
Download=1
FinishAction=[!ShowMeterGroup Product5][!Update]

[Product5Image]
Hidden=1
Group=Product5
Meter=Image
MeasureName=[#CurrentSection]M
MeterStyle=MSImages
LeftMouseUpAction=[#Product5Link#]

[Product5TitleM]
Disabled=1
Group=Product5
Measure=WebParser
URL=[Product5]
StringIndex=4

[Product5Title]
Hidden=1
Group=Product5
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextS
LeftMouseUpAction=[#Product5Link#]

[Product5PriceM]
Disabled=1
Group=Product5
Measure=WebParser
URL=[Product5]
StringIndex=1
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
IfCondition=Product5PriceM <> [#Product5CurPrice] && (Product5PriceM > 0)
IfTrueAction=[!SetVariable Product5PrePrice [#Product5CurPrice]][!SetVariable Product5CurPrice [Product5PriceM:]][!Update][!WriteKeyValue variables Product5PrePrice [#Product5PrePrice]][!WriteKeyValue variables Product5CurPrice [#Product5CurPrice]]
IFCondition2=Product5PriceM = [#Product5PrePrice] 
IfTrueAction2=[!SetOption Product5Price InLineSetting "Color | 184,184,184"][!SetOption Product5Price Text [&*Product5SymbolM*]%1[\x2010]][!SetOption Product5PriceP MeasureName ""][!SetOption Product5PriceP Text ""][!SetOption Product5PriceP FontColor 184,184,184]
IFCondition3=Product5PriceM > [#Product5PrePrice] && (Product5PriceM < [#Product5PrePrice]*1.05)
IfTrueAction3=[!SetOption Product5Price InLineSetting "Color | 184,184,184"][!SetOption Product5Price Text [&*Product5SymbolM*]%1[\x25B2]][!SetOption Product5PriceP FontColor 184,184,184]
IFCondition4=Product5PriceM >= [#Product5PrePrice]*1.05
IfTrueAction4=[!SetOption Product5Price InLineSetting "Color | 215,071,071"][!SetOption Product5Price Text [&*Product5SymbolM*]%1[\x25B2]][!SetOption Product5PriceP FontColor 215,071,071]
IFCondition5=Product5PriceM < [#Product5PrePrice] && (Product5PriceM > [#Product5PrePrice]/1.05)
IfTrueAction5=[!SetOption Product5Price InLineSetting "Color | 184,184,184"][!SetOption Product5Price Text [&*Product5SymbolM*]%1[\x25BC]][!SetOption Product5PriceP FontColor 184,184,184]
IFCondition6=Product5PriceM <= [#Product5PrePrice]/1.05
IfTrueAction6=[!SetOption Product5Price InLineSetting "Color | 167,229,138"][!SetOption Product5Price Text [&*Product5SymbolM*]%1[\x25BC]][!SetOption Product5PriceP FontColor 167,229,138]
DynamicVariables=1

[Product5Price]
Hidden=1
Group=Product5
Meter=String
MeasureName=[#CurrentSection]M
InLinePattern=[\x25B2]|[\x25BC]|[\x2010]
MeterStyle=MSTextB
DynamicVariables=1

[Product5PricePM]
Disabled=1
Group=Product5
Measure=Calc
Formula=((Product5PriceM-[#Product5PrePrice])/[#Product5PrePrice])*100
DynamicVariables=1

[Product5PriceP]
Hidden=1
Group=Product5
Meter=String
MeasureName=[#CurrentSection]M
NumOfDecimals=1
Text=(%1%)
MeterStyle=MSTextInc
y=2r

[Product5PrePriceM]
Disabled=1
Group=Product5
Measure=String
String=[#Product5PrePrice]
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
DynamicVariables=1

[Product5PrePrice]
Hidden=1
Group=Product5
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB|MSTextM
Text=[Product5SymbolM]%1
DynamicVariables=1

[Product5LowPriceM]
Disabled=1
Group=Product5
Measure=String
String=[#Product5LowPrice]
RegExpSubstitute=1
Substitute="^([\-\+]?\d+)$":"\1.","(\d)(?=(?:\d{3})+\.)":"\1,","\.$":""
IfCondition=Product5PriceM < [#Product5LowPrice]
IfTrueAction=[!SetVariable Product5LowPrice [Product5PriceM:]][!WriteKeyValue variables Product5LowPrice [#Product5LowPrice]][!Update]
IfCondition2=Product5PriceM <= [#Product5LowPrice]*1.02
IfTrueAction2=[!SetOption Product5Price FontColor 167,229,138][!SetOption Product5LowPrice FontColor 167,229,138][!SetOption Product5LowPriceP FontColor 167,229,138]  
IFCondition3=Product5PriceM >= [#Product5LowPrice]*1.05
IfTrueAction3=[!SetOption Product5Price FontColor 215,071,071][!SetOption Product5LowPriceP FontColor 215,071,071]
IFCondition4=Product5PriceM = [#Product5LowPrice]
IfTrueAction4=[!SetOption Product5LowPriceP MeasureName ""][!SetOption Product5LowPriceP Text ""][!SetOption Product5LowPriceP FontColor 184,184,184]
DynamicVariables=1

[Product5LowPrice]
Hidden=1
Group=Product5
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextB|MSTextM
y=r
Text=[Product5SymbolM]%1
DynamicVariables=1

[Product5LowPricePM]
Disabled=1
Group=Product5
Measure=Calc
Formula=((Product5PriceM-[#Product5LowPrice])/[#Product5LowPrice])*100
DynamicVariables=1

[Product5LowPriceP]
Hidden=1
Group=Product5
Meter=String
MeasureName=[#CurrentSection]M
MeterStyle=MSTextInc
NumOfDecimals=1
Text=(%1%)
y=r
DynamicVariables=1

[Product5Separator]
Hidden=1
Group=Product5
Meter=Image
H=1
W=1
X=10
Y=([Product5Image:Y]+[Product5Image:H])
DynamicVariables=1
They're 5 products but all measures and meters are the same, as they are a copy of the Product1 meters and measures. So far the skin gets the current price, compares it to the previous price and calculates the difference in percentage, same for the lowest price. Colors change according to these changes.

Left is current price, Middle is Previous Price and Right is Lowest Price. At the start all numbers are the same since it just started reading, and prices don't change too often, hence why I don't mind the Update=-1 setting.

It also displays the correct currency symbol according to the link provided. (Links and prices on the code are on Mexican Pesos)

Anyway, the question is: why does it take longer to parse?

And an extra couple questions: When having Update=-1, using CommandMeasure to update it makes sense? I added MiddleMouseUpAction=[!CommandMeasure Product1 Update][!CommandMeasure Product2 Update][!CommandMeasure Product3 Update][!CommandMeasure Product4 Update][!CommandMeasure Product5 Update]
to the rainmeter section but I'm not sure it does anything, since prices haven't changed yet. I normally update it using refresh.

And final question, since I have 5 products, is there a way to update all of them? Like [!CommandMeasureGroup Products Update] (I know this is not correct).

TIA.
User avatar
Yincognito
Rainmeter Sage
Posts: 7491
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Web Parser on Amazon

Post by Yincognito »

Didn't test the code, but:
- Update=-1 is just as speedy as Update=1000 in terms of data retrieval and webparsing, the only difference is the frequency of updating (once vs periodically)
- you're only enabling the ProductN groups in the FinishActions, you need to also update those measure groups and optionally meters coupled with redrawing the skin, in order to display stuff immediately as soon as data is retrieved (this might be the cause of the perceived "slowness")
- you're commanding all 5 ProductN measures to update at roughly the same time, so apart from some being a few ms behind others in retrieval, this should normally happen more or less concurrently (i.e. at the same time) and be faster than the same done sequentially (i.e. one after the other has finished)
- no, there isn't a group bang for commanding measures, but, if you find a way to retrieve multiple product data via the query string in the site's URL (this typically involves an API offering that, and might not be free), then you should be able to use a single request to retrieve multiple product data

P.S. If you want to make the commanding measure chain more automated and compact, you could use something like:

Code: Select all

[CommandBangs]
Measure=String
String=1,2,3,4,5,
RegExpSubstitute=1
Substitute="(\d+),":"[!CommandMeasure Product\1 Update]"
and then simply use [CommandBangs] instead of [!CommandMeasure Product1 Update][!CommandMeasure Product2 Update][!CommandMeasure Product3 Update][!CommandMeasure Product4 Update][!CommandMeasure Product5 Update] when needed. You could even store the "1,2,3,4,5," as a variable and use it as the value of the above String option, for ease of use by editing the said variable.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16325
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Web Parser on Amazon

Post by balala »

Yincognito wrote: May 22nd, 2024, 8:26 am - you're only enabling the ProductN groups in the FinishActions, you need to also update those measure groups and optionally meters coupled with redrawing the skin, in order to display stuff immediately as soon as data is retrieved (this might be the cause of the perceived "slowness")
Just to clarify a thing: the meters have to be updated and the skin has to be redrawn, however the WebParser child measures is enough to be enabled. Not absolutely needed to update them, even if this seems little bit illogical. I1m not talking about slowness / quickness, I'm talking strictly about if they have or not to be updated, in order to retrieve the proper information. When enabling them, they are updated. Obviously not a problem if you update them, but strictly speaking, there is no need for this.