bocchilorenzo / ntscraper

Scrape from Twitter using Nitter instances
MIT License
168 stars 29 forks source link

Using local instance #61

Closed CubeAuCarre closed 5 months ago

CubeAuCarre commented 7 months ago

Hi !

I'm completely new to all of this but I'm trying my best to understand.

I got tired of using public instances so I tried running Nitter locally.

Unfortunately, I don't think I can call my own personnal local instance with ntscraper. Tried :

scraper = Nitter(instance = "127.0.0.1") to specify but it doesn't work.

Then I checked the code and saw that instance is always defined by _get_instances(self) which automatically chooses public ones.

Are there ways to go around this ? I'm not even sure it'll work cause I only ran Nitter on a redis server locally and I'm not sure how to test this.

Thank you in advance for help !

bocchilorenzo commented 7 months ago

Hi, local instances are compatible with the scraper, simply try to change "127.0.0.1" in "http://localhost" and it should work. If it doesn't, add the port "http://localhost:8080" (change 8080 in your port if it's different). Keep in mind that due to the recent issues with guest accounts even a local instance might get limited after a while.