Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- CancelledError Traceback (most recent call last)
- ~/Documents/src/twint/twint/get.py in Response(session, url, params)
- 161 with timeout(30):
- --> 162 async with session.get(url, ssl=False, params=params, proxy=httpproxy) as response:
- 163 return await response.text()
- ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/client.py in __aenter__(self)
- 1004 async def __aenter__(self) -> _RetType:
- -> 1005 self._resp = await self._coro
- 1006 return self._resp
- ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/client.py in _request(self, method, str_or_url, params, data, json, cookies, headers, skip_auto_headers, auth, allow_redirects, max_redirects, compress, chunked, expect100, raise_for_status, read_until_eof, proxy, proxy_auth, timeout, verify_ssl, fingerprint, ssl_context, ssl, proxy_headers, trace_request_ctx)
- 475 traces=traces,
- --> 476 timeout=real_timeout
- 477 )
- ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/connector.py in connect(self, req, traces, timeout)
- 521 try:
- --> 522 proto = await self._create_connection(req, traces, timeout)
- 523 if self._closed:
- ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/connector.py in _create_connection(self, req, traces, timeout)
- 853 _, proto = await self._create_direct_connection(
- --> 854 req, traces, timeout)
- 855
- ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/connector.py in _create_direct_connection(self, req, traces, timeout, client_error)
- 973 local_addr=self._local_addr,
- --> 974 req=req, client_error=client_error)
- 975 except ClientConnectorError as exc:
- ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/aiohttp/connector.py in _wrap_create_connection(self, req, timeout, client_error, *args, **kwargs)
- 923 Tuple[asyncio.Transport, ResponseHandler],
- --> 924 await self._loop.create_connection(*args, **kwargs))
- 925 except cert_errors as exc:
- ~/anaconda3/envs/twitter_scraping/lib/python3.6/asyncio/base_events.py in create_connection(self, protocol_factory, host, port, ssl, family, proto, flags, sock, local_addr, server_hostname)
- 780 logger.debug("connect %r to %r", sock, address)
- --> 781 yield from self.sock_connect(sock, address)
- 782 except OSError as exc:
- ~/anaconda3/envs/twitter_scraping/lib/python3.6/asyncio/selector_events.py in sock_connect(self, sock, address)
- 438 self._sock_connect(fut, sock, address)
- --> 439 return (yield from fut)
- 440
- CancelledError:
- During handling of the above exception, another exception occurred:
- TimeoutError Traceback (most recent call last)
- <ipython-input-16-9b996182bcac> in <module>
- 4 c1.Username = user
- 5 c1.Store_object = True
- ----> 6 twint.run.Following(c1)
- 7 ego_network.extend(twint.output.follows_list)
- 8 time.sleep(60)
- ~/Documents/src/twint/twint/run.py in Following(config)
- 252 config.Favorites = False
- 253 config.TwitterSearch = False
- --> 254 run(config)
- 255 if config.Pandas_au:
- 256 storage.panda._autoget("following")
- ~/Documents/src/twint/twint/run.py in run(config, callback)
- 211 def run(config, callback=None):
- 212 logme.debug(__name__+':run')
- --> 213 get_event_loop().run_until_complete(Twint(config).main(callback))
- 214
- 215 def Favorites(config):
- ~/anaconda3/envs/twitter_scraping/lib/python3.6/asyncio/base_events.py in run_until_complete(self, future)
- 482 raise RuntimeError('Event loop stopped before Future completed.')
- 483
- --> 484 return future.result()
- 485
- 486 def stop(self):
- ~/Documents/src/twint/twint/run.py in main(self, callback)
- 152 task.add_done_callback(callback)
- 153
- --> 154 await task
- 155
- 156 async def run(self):
- ~/Documents/src/twint/twint/run.py in run(self)
- 187 if self.config.Followers or self.config.Following:
- 188 logme.debug(__name__+':Twint:main:follow')
- --> 189 await self.follow()
- 190 elif self.config.Favorites:
- 191 logme.debug(__name__+':Twint:main:favorites')
- ~/Documents/src/twint/twint/run.py in follow(self)
- 107
- 108 async def follow(self):
- --> 109 await self.Feed()
- 110 if self.config.User_full:
- 111 logme.debug(__name__+':Twint:follow:userFull')
- ~/Documents/src/twint/twint/run.py in Feed(self)
- 55 consecutive_errors_count = 0
- 56 while True:
- ---> 57 response = await get.RequestUrl(self.config, self.init, headers=[("User-Agent", self.user_agent)])
- 58 if self.config.Debug:
- 59 print(response, file=open("twint-last-request.log", "w", encoding="utf-8"))
- ~/Documents/src/twint/twint/get.py in RequestUrl(config, init, headers)
- 116 logme.debug(__name__+':RequestUrl:Favorites')
- 117 _url = await url.Favorites(config.Username, init)
- --> 118 response = await MobileRequest(_url, connector=_connector)
- 119 _serialQuery = _url
- 120
- ~/Documents/src/twint/twint/get.py in MobileRequest(url, **options)
- 132 logme.debug(__name__+':MobileRequest:notConnector')
- 133 async with aiohttp.ClientSession() as session:
- --> 134 return await Response(session, url)
- 135
- 136 def ForceNewTorIdentity(config):
- ~/Documents/src/twint/twint/get.py in Response(session, url, params)
- 161 with timeout(30):
- 162 async with session.get(url, ssl=False, params=params, proxy=httpproxy) as response:
- --> 163 return await response.text()
- 164
- 165 async def RandomUserAgent():
- ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/async_timeout/__init__.py in __exit__(self, exc_type, exc_val, exc_tb)
- 43 exc_val: BaseException,
- 44 exc_tb: TracebackType) -> Optional[bool]:
- ---> 45 self._do_exit(exc_type)
- 46 return None
- 47
- ~/anaconda3/envs/twitter_scraping/lib/python3.6/site-packages/async_timeout/__init__.py in _do_exit(self, exc_type)
- 90 self._cancel_handler = None
- 91 self._task = None
- ---> 92 raise asyncio.TimeoutError
- 93 if self._timeout is not None and self._cancel_handler is not None:
- 94 self._cancel_handler.cancel()
- TimeoutError:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement