UltimaScraper icon indicating copy to clipboard operation
UltimaScraper copied to clipboard

TimeoutError: [WinError 10060]

Open Septan opened this issue 7 years ago • 10 comments

I still getting timeouts, It did output to the error log. Do you need info from error log?

Traceback (most recent call last):

  File "C:\Python37\lib\urllib\request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "C:\Python37\lib\http\client.py", line 1244, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Python37\lib\http\client.py", line 1290, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Python37\lib\http\client.py", line 1239, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Python37\lib\http\client.py", line 1026, in _send_output
    self.send(msg)
  File "C:\Python37\lib\http\client.py", line 966, in send
    self.connect()
  File "C:\Python37\lib\http\client.py", line 1406, in connect
    super().connect()
  File "C:\Python37\lib\http\client.py", line 938, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "C:\Python37\lib\socket.py", line 727, in create_connection
    raise err
  File "C:\Python37\lib\socket.py", line 716, in create_connection
    sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "OnlyFans.py", line 221, in <module>
    scrape_choice()
  File "OnlyFans.py", line 87, in scrape_choice
    media_scraper(image_api, location, j_directory, only_links)
  File "OnlyFans.py", line 170, in media_scraper
    pool.starmap(download_media, product(media_set.items(), [directory]))
  File "C:\Python37\lib\multiprocessing\pool.py", line 276, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "C:\Python37\lib\multiprocessing\pool.py", line 657, in get
    raise self._value
  File "C:\Python37\lib\multiprocessing\pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "C:\Python37\lib\multiprocessing\pool.py", line 47, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "OnlyFans.py", line 192, in download_media
    urlretrieve(link, directory)
  File "C:\Python37\lib\urllib\request.py", line 247, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "C:\Python37\lib\urllib\request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Python37\lib\urllib\request.py", line 525, in open
    response = self._open(req, data)
  File "C:\Python37\lib\urllib\request.py", line 543, in _open
    '_open', req)
  File "C:\Python37\lib\urllib\request.py", line 503, in _call_chain
    result = func(*args)
  File "C:\Python37\lib\urllib\request.py", line 1360, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "C:\Python37\lib\urllib\request.py", line 1319, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>

Septan avatar Sep 03 '19 08:09 Septan

I need the line that has the TimeoutError, it should include the link as well

UltimaHoarder avatar Sep 03 '19 08:09 UltimaHoarder

This from error log

2019-09-03 02:10:58,077 DEBUG urllib3.connectionpool Starting new HTTPS connection (1): onlyfans.com:443
2019-09-03 02:10:58,380 DEBUG urllib3.connectionpool https://onlyfans.com:443 "GET /api2/v2/users/benicenatasha&app-token= HTTP/1.1" 200 5297
2019-09-03 02:11:01,154 DEBUG urllib3.connectionpool https://onlyfans.com:443 "GET /api2/v2/users/133446/posts/photos?limit=100&offset=0&order=publish_date_desc&app-token= HTTP/1.1" 200 4585922
2019-09-03 02:11:03,899 DEBUG urllib3.connectionpool https://onlyfans.com:443 "GET /api2/v2/users/133446/posts/photos?limit=100&offset=100&order=publish_date_desc&app-token= HTTP/1.1" 200 3803008
2019-09-03 02:11:05,226 DEBUG urllib3.connectionpool https://onlyfans.com:443 "GET /api2/v2/users/133446/posts/photos?limit=100&offset=200&order=publish_date_desc&app-token= HTTP/1.1" 200 1356400
2019-09-03 02:11:05,507 DEBUG urllib3.connectionpool https://onlyfans.com:443 "GET /api2/v2/users/133446/posts/photos?limit=100&offset=300&order=publish_date_desc&app-token= HTTP/1.1" 200 2

Septan avatar Sep 03 '19 08:09 Septan

I added a new commit to the onlyfans.py. I was trying to catch the wrong error you had. It should throw the same error but it should print in the errors.log

UltimaHoarder avatar Sep 03 '19 08:09 UltimaHoarder

here one the links from many others.

2019-09-03 04:01:16,195 ERROR OSError in Function (download_media) Link: https://cdn.onlyfans.com/Protected/expiretime=1567555200;ip=REDACTED/c99004d0d7ee1cf821f0ae5390a28dfb8fce01c578514ba1c0ec53c3a89a0f15/files/b/bc/bc95c829e77daa21ddd05ca8b9c42c89/1620x2160_dda5d15f2427f7b2600b14652353b8ab562387.jpg

Septan avatar Sep 03 '19 09:09 Septan

Are any of them downloading?

UltimaHoarder avatar Sep 03 '19 09:09 UltimaHoarder

I check and none are downloading. Here another line this wasn't in the log earlier.

2019-09-03 04:13:42,465 ERROR FileNotFoundError in Function (download_media) Link: https://cdn.onlyfans.com/Protected/expiretime=1567555200;ip=REDACTED/c99004d0d7ee1cf821f0ae5390a28dfb8fce01c578514ba1c0ec53c3a89a0f15/files/b/bc/bc95c829e77daa21ddd05ca8b9c42c89/1620x2160_dda5d15f2427f7b2600b14652353b8ab562387.jpg

Septan avatar Sep 03 '19 09:09 Septan

Oh.. Do you have overwrite set to false in the settings.json?

UltimaHoarder avatar Sep 03 '19 10:09 UltimaHoarder

I left it default settings, which is true. Looking back through the browser, the images are broken some of the old posts.

Septan avatar Sep 03 '19 11:09 Septan

Ohh, I thought that would be the case. I will add something to check if the image is there first

UltimaHoarder avatar Sep 04 '19 10:09 UltimaHoarder

I updated the script

UltimaHoarder avatar Sep 04 '19 10:09 UltimaHoarder