Open azamet90 opened 3 years ago
also getting this issue, stepped through the code and found that it happens due to
<h1>This browser is no longer supported.</h1>
<p>
Please switch to a supported browser to continue using twitter.com. You can see a list of supported browsers in our Help Center.
</p>
<p class="errorButton"><a href="https://help.twitter.com/using-twitter/twitter-supported-browsers">Help Center</a>
</p>
and then BeautifulSoup fails to find a <div>
with class="user-actions"
the call to get.User
wasn't actually specifying a User-Agent. I fiddled around with the code so that it did, and now it's blocked by a lack of Javascript. This is using one of the list of User-Agents that the lib chooses randomly for some twitter endpoints when scraping.
Suggests that it needs a Selenium-style browser to scrape Twitter now or some other way to load Javascript
<h1>JavaScript is not available.</h1>
<p>We've detected that JavaScript is disabled in this browser. Please enable JavaScript or switch to a supported
browser to continue using twitter.com. You can see a list of supported browsers in
our Help Center.</p>
<p class="errorButton"><a href="https://help.twitter.com/using-twitter/twitter-supported-browsers">Help Center</a>
</p>
Syndication timelines can be used to scrape up to 3000 likes. The new twitter API doesn't support the previous (mobile web) route to view content. Timeline etc still works fine.
@i-infra how do i use the syndication timelines to scrape likes ? I'm new to twint. A small sample usage might be of great help , if possible.
twint -u rihanna
CRITICAL:root:twint.get:User:'NoneType' object is not subscriptable CRITICAL:root:twint.run:Twint:Feed:noDataExpecting value: line 1 column 1 (char 0)