Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract comment url from html #15

Open
FriendlyUser opened this issue Aug 25, 2022 · 0 comments
Open

Extract comment url from html #15

FriendlyUser opened this issue Aug 25, 2022 · 0 comments

Comments

@FriendlyUser
Copy link
Member

<article aria-setsize="-1" class="StreamMessage_container__ssbYY relative border-b first|border-t border-stream-border w-full pt-[18px] pb-[7px] StreamMessage_clickable__uCi7m cursor-pointer hover|bg-message-hover"><div class="StreamMessage_main___aESy grid"><span><div class="StreamMessage_avatar__7RrCR flex flex-col items-center relative"><a aria-label="Avatar image for Drock33" class="StreamMessage_avatarImage__AStmd block overflow-hidden rounded-full" role="img" href="/Drock33"><img alt="" src="https://avatars.stocktwits.com/cdn-cgi/image/f=auto,width=50/production/250658/thumb-1401362236.png" height="50" width="50"></a></div></span><div class="StreamMessage_heading__Yw4XG flex items-center"><span><a href="/Drock33"><span class="StreamMessage_username-default__gka83 font-bold" aria-label="Username">Drock33</span></a></span><a href="/Drock33/message/481146903"><time datetime="2022-08-25T23:08:54Z" class="StreamMessage_timestamp__CP2QT text-stream-text ml-2 text-[11px]" aria-label="Time this message was posted">36m</time></a><div class="StreamMessage_more__H48dV absolute top-2.5 right-2.5"><div><div class="Dropdown_triggerWrap__LW6BW cursor-pointer"><div class="flex flex-col"><button aria-label="More" class="StreamMessageItem_container__vy8tl px-4 appearance-none tabletSm|p-2.5 inline-flex justify-center items-center outline-none min-h-[2rem] rounded-3xl tabletMd|hover|bg-message-buttons-hover tabletMd|focus|bg-secondary-button-hover outline-none min-w-[35px] w-[60px] w-fit StreamMessageItem_unselected__J_C0G text-stream-text" tabindex="0"><span class="StreamMessageItem_icon__yFBLb relative h-3.5"><svg width="100%" height="100%" viewBox="0 0 13 4" fill="none" xmlns="http://www.w3.org/2000/svg" class="StreamMessageMore_moreIcon__OMdwI relative"><path d="M0.0298438 1.92C0.0298438 1.42667 0.149844 1.08 0.389844 0.88C0.629844 0.68 0.91651 0.58 1.24984 0.58C1.59651 0.58 1.88984 0.68 2.12984 0.88C2.38318 1.08 2.50984 1.42667 2.50984 1.92C2.50984 2.4 2.38318 2.74667 2.12984 2.96C1.88984 3.17333 1.59651 3.28 1.24984 3.28C0.91651 3.28 0.629844 3.17333 0.389844 2.96C0.149844 2.74667 0.0298438 2.4 0.0298438 1.92ZM5.26984 1.92C5.26984 1.42667 5.38984 1.08 5.62984 0.88C5.86984 0.68 6.15651 0.58 6.48984 0.58C6.83651 0.58 7.12984 0.68 7.36984 0.88C7.62318 1.08 7.74984 1.42667 7.74984 1.92C7.74984 2.4 7.62318 2.74667 7.36984 2.96C7.12984 3.17333 6.83651 3.28 6.48984 3.28C6.15651 3.28 5.86984 3.17333 5.62984 2.96C5.38984 2.74667 5.26984 2.4 5.26984 1.92ZM10.4898 1.92C10.4898 1.42667 10.6098 1.08 10.8498 0.88C11.0898 0.68 11.3765 0.58 11.7098 0.58C12.0565 0.58 12.3498 0.68 12.5898 0.88C12.8432 1.08 12.9698 1.42667 12.9698 1.92C12.9698 2.4 12.8432 2.74667 12.5898 2.96C12.3498 3.17333 12.0565 3.28 11.7098 3.28C11.3765 3.28 11.0898 3.17333 10.8498 2.96C10.6098 2.74667 10.4898 2.4 10.4898 1.92Z" fill="currentcolor"></path></svg></span></button></div></div></div></div></div><div role="presentation"></div><div class="StreamMessage_messageContent__1ftRy overflow-hidden StreamMessage_messageContentDefault__EImcP StreamMessage_messageContent__1ftRy overflow-hidden pr-5"><div class="ToggleContent_inner__d4_Y5 overflow-hidden" aria-expanded="false"><div class=""><div class="RichTextMessage_body__Fa2W1 whitespace-pre-wrap"><span><a class="RichTextMessage_link__uSAzO text-blue-ada inline-flex items-center" title="stocktwits.com/symbol/ZIM" href="/symbol/ZIM">$ZIM</a></span> I don't care about it dropping. I'm insured. If trend continues it will be at 30 dollars a share in October</div></div></div><div class=""></div></div><div role="presentation"></div><div class="StreamMessageFooter_default___Zbj1 StreamMessageFooter_container__6wxEZ grid items-center relative -ml-2.5 xxs-down xxs-down|text-xs text-center cursor-pointer" role="group"><div><div class="StreamMessageItem_buttonContainer__dfJjh flex flex-col"><div class="flex flex-col"><button aria-label="Reply" class="StreamMessageItem_container__vy8tl px-4 appearance-none tabletSm|p-2.5 inline-flex justify-center items-center outline-none min-h-[2rem] rounded-3xl tabletMd|hover|bg-message-buttons-hover tabletMd|focus|bg-secondary-button-hover outline-none min-w-[35px] w-[60px] w-fit StreamMessageItem_unselected__J_C0G text-stream-text" data-cy="stream-message-item-reply" tabindex="0"><span class="StreamMessageItem_icon__yFBLb relative h-3.5"><svg fill="none" height="100%" viewBox="0 0 15 14" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M10.8668 1.75C9.88815 1.26786 8.80918 1 7.65493 1C6.47559 1 5.39661 1.26786 4.41801 1.75C3.43941 2.25893 2.66154 2.92857 2.08442 3.78571C1.5073 4.64286 1.23128 5.55357 1.23128 6.57143C1.23128 7.83036 1.65785 8.95536 2.56118 9.94643C2.41062 10.4018 2.1597 10.8571 1.8335 11.3393L1.83349 11.3393C1.60766 11.6607 1.45711 11.875 1.38183 11.9554C1.30656 12.0357 1.25637 12.1429 1.23128 12.25C1.20619 12.3839 1.23128 12.5179 1.28146 12.625C1.33165 12.7321 1.40693 12.8393 1.5073 12.8929C1.60767 12.9732 1.70803 13 1.8335 13C3.06302 13 4.21727 12.5982 5.32134 11.7679C6.07411 12.0357 6.85197 12.1429 7.65493 12.1429C8.80918 12.1429 9.88815 11.9018 10.8668 11.3929C11.8454 10.9107 12.6232 10.2411 13.2003 9.38393C13.7775 8.52679 14.0786 7.58929 14.0786 6.57143C14.0786 5.55357 13.7775 4.64286 13.2003 3.78571C12.6232 2.92857 11.8454 2.25893 10.8668 1.75Z" stroke="currentcolor"></path></svg></span></button></div></div></div><div><div class="StreamMessageItem_buttonContainer__dfJjh flex flex-col"><div><div class="Dropdown_triggerWrap__LW6BW cursor-pointer"><div class="flex flex-col"><button aria-label="Reshare" class="StreamMessageItem_container__vy8tl px-4 appearance-none tabletSm|p-2.5 inline-flex justify-center items-center outline-none min-h-[2rem] rounded-3xl tabletMd|hover|bg-message-buttons-hover tabletMd|focus|bg-secondary-button-hover outline-none min-w-[35px] w-[60px] w-fit StreamMessageItem_unselected__J_C0G text-stream-text" data-cy="stream-message-item-reshare" tabindex="0"><span class="StreamMessageItem_icon__yFBLb relative h-3.5"><svg fill="none" height="100%" viewBox="0 0 19 14" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M13.3376 0.574219H7.82983C7.39771 0.574219 7.13403 0.815918 7.14136 1.2041C7.14868 1.59961 7.39771 1.83398 7.82983 1.83398H13.2791C13.9456 1.83398 14.3118 2.18555 14.3118 2.87402V10.2275L13.3083 9.14355L12.7004 8.54297C12.4368 8.28662 12.0706 8.26465 11.7996 8.52832C11.5359 8.79199 11.5432 9.17285 11.8142 9.43652L14.1653 11.7803C14.656 12.2637 15.2126 12.2637 15.7034 11.7803L18.0618 9.43652C18.3254 9.17285 18.3328 8.79199 18.0691 8.52832C17.8054 8.26465 17.4392 8.2793 17.1682 8.54297L16.5676 9.14355L15.5715 10.2202V2.78613C15.5715 1.32129 14.8098 0.574219 13.3376 0.574219ZM1.1062 5.48877C1.36987 5.75244 1.74341 5.73047 2.0144 5.4668L2.61499 4.87354L3.61108 3.79688V11.231C3.61108 12.6885 4.3728 13.4355 5.84497 13.4355H11.3528C11.7776 13.4355 12.0413 13.2012 12.0339 12.8057C12.0339 12.4175 11.7776 12.1758 11.3528 12.1758H5.89624C5.23706 12.1758 4.87085 11.8315 4.87085 11.1357V3.78955L5.87427 4.87354L6.47485 5.4668C6.74585 5.73047 7.11206 5.75244 7.38306 5.48877C7.6394 5.2251 7.63208 4.84424 7.36841 4.58057L5.01733 2.23682C4.51929 1.74609 3.96997 1.74609 3.47192 2.23682L1.12085 4.58057C0.857178 4.84424 0.842529 5.2251 1.1062 5.48877Z" fill="currentcolor"></path></svg></span></button></div></div></div></div></div><div><div class="StreamMessageItem_buttonContainer__dfJjh flex flex-col"><div class="flex flex-col"><button aria-label="Like message" class="StreamMessageItem_container__vy8tl px-4 appearance-none tabletSm|p-2.5 inline-flex justify-center items-center outline-none min-h-[2rem] rounded-3xl tabletMd|hover|bg-message-buttons-hover tabletMd|focus|bg-secondary-button-hover outline-none min-w-[35px] w-[60px] w-fit StreamMessageItem_unselected__J_C0G text-stream-text" data-cy="stream-message-item-like" tabindex="0"><span class="StreamMessageItem_icon__yFBLb relative h-3.5"><svg fill="none" height="100%" viewBox="0 0 15 14" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M0.91333 5.04199C0.91333 8.00098 3.38892 10.9087 7.27808 13.4062C7.46118 13.5234 7.69556 13.6333 7.85669 13.6333C8.01782 13.6333 8.2522 13.5234 8.4353 13.4062C12.3245 10.9087 14.8 8.00098 14.8 5.04199C14.8 2.54443 13.0789 0.786621 10.823 0.786621C9.51929 0.786621 8.47925 1.39453 7.85669 2.32471C7.24146 1.40186 6.20142 0.786621 4.89771 0.786621C2.63452 0.786621 0.91333 2.54443 0.91333 5.04199ZM2.18042 5.03467C2.18042 3.24756 3.35229 2.03906 4.927 2.03906C6.20874 2.03906 6.92651 2.82275 7.37329 3.49658C7.5564 3.7749 7.68823 3.86279 7.85669 3.86279C8.03247 3.86279 8.14233 3.76758 8.34741 3.49658C8.81616 2.8374 9.51929 2.03906 10.7864 2.03906C12.3684 2.03906 13.5403 3.24756 13.5403 5.03467C13.5403 7.54688 10.9036 10.2935 7.99585 12.2271C7.92993 12.271 7.88599 12.3003 7.85669 12.3003C7.83472 12.3003 7.79077 12.271 7.72485 12.2271C4.80981 10.2935 2.18042 7.54688 2.18042 5.03467Z" fill="currentcolor"></path></svg></span></button></div></div></div><div><div><div><div class="Dropdown_triggerWrap__LW6BW cursor-pointer"><div class="flex flex-col"><button aria-label="Share" class="StreamMessageItem_container__vy8tl px-4 appearance-none tabletSm|p-2.5 inline-flex justify-center items-center outline-none min-h-[2rem] rounded-3xl tabletMd|hover|bg-message-buttons-hover tabletMd|focus|bg-secondary-button-hover outline-none min-w-[35px] w-[60px] w-fit StreamMessageItem_unselected__J_C0G text-stream-text" data-cy="stream-message-item-share" tabindex="0"><span class="StreamMessageItem_icon__yFBLb relative h-3.5"><svg fill="none" height="100%" viewBox="0 0 12 16" width="100%" xmlns="http://www.w3.org/2000/svg" class="StreamMessageShare_shareIcon__YBWLz"><path d="M0.634064 5.5L5.63406 1M5.63406 1L10.6341 5.5M5.63406 1V10.5" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M0.646759 11V14C0.646759 14.5523 1.09447 15 1.64676 15H9.63468C10.187 15 10.6347 14.5523 10.6347 14V11" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg></span></button></div></div></div></div></div><div><div class="flex"><div><div class="Dropdown_triggerWrap__LW6BW cursor-pointer"><div class="flex flex-col"><button aria-label="Share" class="StreamMessageItem_container__vy8tl px-4 appearance-none tabletSm|p-2.5 inline-flex justify-center items-center outline-none min-h-[2rem] rounded-3xl tabletMd|hover|bg-message-buttons-hover tabletMd|focus|bg-secondary-button-hover outline-none min-w-[35px] w-[60px] w-fit StreamMessageItem_unselected__J_C0G text-stream-text" data-cy="stream-message-item-search" tabindex="0"><span class="StreamMessageItem_icon__yFBLb relative h-3.5"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" stroke="currentcolor" fill="currentcolor" stroke-width="0" width="100%" height="100%" class="StreamMessageShare_searchIcon__Ja0kB"><g><path d="m508.5,481.6l-129,-129c-2.3,-2.3 -5.3,-3.5 -8.5,-3.5l-10.3,0c34.3,-37.1 55.3,-86.6 55.3,-141.1c0,-114.9 -93.1,-208 -208,-208s-208,93.1 -208,208s93.1,208 208,208c54.5,0 104,-21 141.1,-55.2l0,10.2c0,3.2 1.3,6.2 3.5,8.5l129,129c4.7,4.7 12.3,4.7 17,0l9.9,-9.9c4.7,-4.7 4.7,-12.3 0,-17zm-300.5,-97.6c-97.3,0 -176,-78.7 -176,-176s78.7,-176 176,-176s176,78.7 176,176s-78.7,176 -176,176z"></path></g></svg></span></button></div></div></div></div></div></div><div role="presentation"></div></div></article>

Extract href from comment and update url.

@FriendlyUser FriendlyUser changed the title Extract comment from Extract comment url from html Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant