ntscraper
ntscraper copied to clipboard
Fetching failure again?
Hello,
Seems like the fetching issue is back again for some reason. Neither recent tweets nor old ones are being retrieved, while they are retrieved from Nitter page.
I just tried but on my end it works (see pic). Are you on the latest version of the library? Many instances error out, but for example https://nitter.privacydev.net and https://n.populas.no work for now.
Yeah I updated the library just before posting
I've added an instance check when launching the scraper. Now it takes a couple of seconds longer to start but it checks the instances that work in order to prevent many errors from happening. Let me know if it fixes the issue.
I've added an instance check when launching the scraper. Now it takes a couple of seconds longer to start but it checks the instances that work in order to prevent many errors from happening. Let me know if it fixes the issue.
There is a new error now on both Mac and Windows, as in below.
RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
^CFatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "/Users/user/opt/anaconda3/lib/python3.9/site.py", line 73, in
(base) user@users-MacBook-Pro Twitter Archive % /Users/user/opt/anaconda3/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 9 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d '
That error is because of the multiprocessing used during the instance check, which requires the scraper to be run in an "if name == 'main'" code block. I've removed multiprocessing, it's a bit slower to initialize but it works correctly without that code requirement.
That error is because of the multiprocessing used during the instance check, which requires the scraper to be run in an "if name == 'main'" code block. I've removed multiprocessing, it's a bit slower to initialize but it works correctly without that code requirement.
That fixed the error, thanks!
But it is wierd that still nothing gets fetched, I am not sure what is wrong exactly, because when I use the exact same search term on the instances webpages, tweets do get fetched.
24-Oct-23 15:01:22 - Empty profile on https://nitter.woodland.cafe. Trying https://nitter.mint.lgbt 24-Oct-23 15:01:25 - Empty profile on https://nitter.mint.lgbt. Trying https://nitter.catsarch.com 24-Oct-23 15:01:28 - Empty profile on https://nitter.catsarch.com. Trying https://nitter.dafriser.be 24-Oct-23 15:01:30 - Empty profile on https://nitter.dafriser.be. Trying https://nitter.uni-sonia.com 24-Oct-23 15:01:34 - Empty profile on https://nitter.uni-sonia.com. Trying https://n.populas.no 24-Oct-23 15:01:37 - Empty profile on https://n.populas.no. Trying https://nitter.woodland.cafe 24-Oct-23 15:01:39 - Empty profile on https://nitter.woodland.cafe. Trying https://nitter.tinfoil-hat.net 24-Oct-23 15:01:41 - Empty profile on https://nitter.tinfoil-hat.net. Trying https://nitter.privacydev.net 24-Oct-23 15:01:43 - Empty profile on https://nitter.privacydev.net. Trying https://nitter.ktachibana.party 24-Oct-23 15:01:47 - Empty profile on https://nitter.ktachibana.party. Trying https://nitter.dafriser.be 24-Oct-23 15:01:49 - Empty profile on https://nitter.dafriser.be. Trying https://nitter.perennialte.ch 24-Oct-23 15:01:52 - Empty profile on https://nitter.perennialte.ch. Trying https://nitter.woodland.cafe 24-Oct-23 15:01:54 - Empty profile on https://nitter.woodland.cafe. Trying https://nitter.privacydev.net 24-Oct-23 15:01:56 - Empty profile on https://nitter.privacydev.net. Trying https://nitter.perennialte.ch 24-Oct-23 15:01:59 - Empty profile on https://nitter.perennialte.ch. Trying https://nitter.catsarch.com 24-Oct-23 15:02:02 - Empty profile on https://nitter.catsarch.com. Trying https://nitter.mint.lgbt 24-Oct-23 15:02:05 - Empty profile on https://nitter.mint.lgbt. Trying https://nitter.dafriser.be 24-Oct-23 15:02:07 - Empty profile on https://nitter.dafriser.be. Trying https://nitter.d420.de 24-Oct-23 15:02:09 - Empty profile on https://nitter.d420.de. Trying https://nitter.dafriser.be 24-Oct-23 15:02:12 - Empty profile on https://nitter.dafriser.be. Trying https://nitter.mint.lgbt 24-Oct-23 15:02:14 - Max retries reached. Check your request and try again.
That's strange, I'll try to investigate a bit and see if I can find some fix
That's strange, I'll try to investigate a bit and see if I can find some fix
any luck?
I've tested with and without VPN to make sure it wasn't a network issue but was not able to replicate it. I'll keep it open for now.