Skip to content

Google Changed HTML Structure - 'delims' constants are off now #16

@DaveStoneDotNet

Description

@DaveStoneDotNet

Hey there busy, awesome developer person.

Not sure if you're still interested or if this repo is dead, but it looks like Google changed their HTML structure recently (March 2023) and your delims are now off.

Please see LINE 29 in /src/lib/index.ts

const delims = [
  '</div></div></div></div><div class="hwc"><div class="BNeawe tAd8D AP7Wnd"><div><div class="BNeawe tAd8D AP7Wnd">',
  '</div></div></div><div><span class="hwc"><div class="BNeawe uEec3 AP7Wnd">',
];

... which are referenced on LINE 63...

return searchResult.split(delims[0])[1].split(delims[1])[0];

As of today, March 21, 2023, the HTML structure should look something like the HTML results shown below...

<div class="wDYxhc NFQFxe" data-attrid="kc:/music/recording_cluster:lyrics" data-md="113" style="clear:none">
    <div class="wGduib" data-hveid="CCoQAA" data-ved="2ahUKEwj5l9agyO79AhWdI0QIHUZQBlcQsEx6BAgqEAA">
        <div class="Z1hOCe">
            <div class="PZPZlf zloOqf" data-lyricid="Lyricfind002-1071544">
                <div class="xaAUmb">
                    <div jsname="Vinbg"/>
                    <div jsname="WbKHeb">
                        <div jsname="U8S5sf" class="ujudUb">
                            <span jsname="YS01Ge">Work, work, work, work, work, work</span>
                            <br aria-hidden="true">
                                <span jsname="YS01Ge">He said me haffi work, work, work, work, work, work</span>

... etc ...

At least... I think that might be somewhere around what's going on. (I only looked at it for about 5 minutes.)

Oh the perils of scraping.

Anyway. Not sure if you were no longer interested, or if you still wanted to .... work, work, work, work, work, work... on it.

Either way. Thanks, and wish you all the best.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions