Jump to content
UBot Underground

Scraping Twitter's Media Grid


Recommended Posts

Hi guys, so I want to scrape the images in the media grid but scrolling down to the bottom doesn't seem to work. The media grid overlays the timeline. When I used the javascript to scroll to the bottom, it's the timeline that's being loaded instead of the media grid. When I use the mouse to scroll down, that's the only time that the media grid is shown.

 

Any ideas? Here's my code:

 

 

navigate("https://twitter.com/MariahCarey/media/grid""Wait")
wait for browser event("Everything Loaded""")
loop(5) {
    run javascript("window.scrollTo(0, document.body.scrollHeight);")
    wait(3)
}

 

 

Link to post
Share on other sites

navigate("https://twitter.com/MariahCarey/media/grid", "Wait")
wait for element(<class="grid-media ratio">, "", "Appear")
wait(2)
focus(<class="header-subtitle js-nav">)
loop(50) {
type text(<class="grid-media ratio">, "\{DOWN\}", "Standard")
wait(.100)
}

  • Like 1
Link to post
Share on other sites
navigate("https://twitter.com/MariahCarey/media/grid", "Wait")
wait for element(<class="grid-media ratio">, "", "Appear")
wait(2)
focus(<class="header-subtitle js-nav">)
loop(50) {
    type text(<class="grid-media ratio">, "\{DOWN\}", "Standard")
    wait(.100)
}

 

Wow, this is awesome, thanks, zap! I didn't know about typing text to an element other than a textbox and using the word "DOWN". Is there a documentation for this?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...