0

I am trying to take a screenshot of a tweet from its link. I am planning to use Selenium for it. However, I am not sure how to find the location of a certain tweet from its link. I will use that location to crop the image. Do you have any advices for this task or should I change my approach to the problem?

What I mean by container is the part of the web page that contains this:

Link to the original tweet: https://twitter.com/Twitter/status/1250091410424037380] Link to the original tweet: https://twitter.com/Twitter/status/1250091410424037380

thekmb
  • 13
  • 1
  • 6
  • Have you tried the Twitter API? https://developer.twitter.com/en/docs – Frank Apr 16 '20 at 02:42
  • @Frank I searched it but it doesn't provide that specific information unfortunately. – thekmb Apr 16 '20 at 02:48
  • Check the Tweet object, it has coordinates and place: https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/tweet-object – Frank Apr 16 '20 at 02:53
  • @Frank it is geographic location. I am trying to find the location in the document. – thekmb Apr 16 '20 at 03:20
  • I see I misunderstand it. See if this one helps: https://stackoverflow.com/questions/13832322/how-to-capture-the-screenshot-of-a-specific-element-rather-than-entire-page-usin – Frank Apr 16 '20 at 03:33
  • @Frank Thank you! Resolved. https://stackoverflow.com/questions/47224293/how-to-screenshot-a-specified-webelement-in-selenium-using-python – thekmb Apr 16 '20 at 03:36

0 Answers0