fork(1) download
  1.  
  2. import urllib,re,time
  3.  
  4. cloudLink='https://w...content-available-to-author-only...e.com'
  5.  
  6. link='https://2...content-available-to-author-only...h.hk/s/res/1612756.html'
  7.  
  8. f1=urllib.urlopen(link);data=f1.read();f1.close()
  9. #f1=open('sos.htm','wb');f1.write(data);f1.close()
  10.  
  11. cfForm=re.findall(r'\<form.*?\<\/form\>',data,re.U+re.S)[0]
  12. cfInputs=re.findall(r'\<input.*?\/\>',cfForm,re.U+re.S)
  13. cfInputs.reverse()
  14. getLink=cloudLink+re.findall(r'action="([^"]+?)"',cfForm)[0]+'?'+re.findall(r'name="([^"]+?)"',cfInputs[0])[0]+'&'+'&'.join([re.findall(r'name="([^"]+?)"',_)[0]+'='+re.findall(r'value="([^"]+?)"',_)[0] for _ in cfInputs[1:]])
  15. time.sleep(5)
  16. f1=urllib.urlopen(getLink);data=f1.read();f1.close()
  17. #f1=open('sos2.htm','wb');f1.write(data);f1.close()
  18.  
  19. f1=urllib.urlopen(link);data=f1.read();print f1.info();f1.close()
  20. #f1=open('sos3.htm','wb');f1.write(data);f1.close()
  21.  
  22.  
Runtime error #stdin #stdout #stderr 0.07s 46424KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "<builtin>/app_main.py", line 75, in run_toplevel
  File "prog.py", line 8, in <module>
    f1=urllib.urlopen(link);data=f1.read();f1.close()
  File "/usr/lib/pypy/lib-python/2.7/urllib.py", line 87, in urlopen
    return opener.open(url)
  File "/usr/lib/pypy/lib-python/2.7/urllib.py", line 213, in open
    return getattr(self, name)(url)
  File "/usr/lib/pypy/lib-python/2.7/urllib.py", line 443, in open_https
    h.endheaders(data)
  File "/usr/lib/pypy/lib-python/2.7/httplib.py", line 997, in endheaders
    self._send_output(message_body)
  File "/usr/lib/pypy/lib-python/2.7/httplib.py", line 850, in _send_output
    self.send(msg)
  File "/usr/lib/pypy/lib-python/2.7/httplib.py", line 812, in send
    self.connect()
  File "/usr/lib/pypy/lib-python/2.7/httplib.py", line 1208, in connect
    HTTPConnection.connect(self)
  File "/usr/lib/pypy/lib-python/2.7/httplib.py", line 793, in connect
    self.timeout, self.source_address)
  File "/usr/lib/pypy/lib-python/2.7/socket.py", line 620, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
IOError: [Errno socket error] [Errno -2] Name or service not known