Jump to content

trbot

Members
  • Posts

    9
  • Joined

  • Last visited

trbot's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Tnx! is it possible to make index.php and index.py config that way if index.py absent it will not show current dir content and try open index.php and if it also absent show 404 ?
  2. Finally I find out Python is so weird... If I call file re.py and (requests inside) it will not work if I rename file in another name it will works! but if I have file called json.py in same dir requests module will not works at any py files! so my conclusion don't call filenames like json.py or re.py !!! Json.py & Re.py will be ok. Can you tell me is it possible to configure .htaccess file or some another cfg same way that when I open dir with index.py inside it I can directly open a base dir like this: http://host/cgi-bin/test/ - ->> http://host/cgi-bin/test/index.py like it works with index.php/index.html files I'm newbie in Python so I making my first steps...
  3. Before staring this topic I'm trying everything First time it works well and I used https://www.alphavantage.co with python and it just can't ban coz it give stock info for everyone! OK now I create PHP script with this lines on your server: echo file_get_contents('http://www.ya.ru/');echo file_get_contents('https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=MSFT&apikey=demo'); and it works! in python: #!/usr/bin/python3.6 print("Content-Type: text/html\n\n") import requests response = requests.get('http://www.ya.ru')print(response.url + response.text) response2 = requests.get('https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=MSFT&apikey=demo')print(response2.url + response2.text) and it NOT working!!! I see only Content-Type: text/html and it just create json.cpython-36.pyc in __pycache__ dir and nothing happens So how you can explain that in PHP it work fine but not working in python? There is no any ban 100% I'm tryed a lot of different sites and nothing! it's something wrong with requests module in python
  4. yes correct I was misprint 0755 requests module not working
  5. Hi! some days ago everything was good and my script working well here it is: #!/usr/bin/python3.6 print("Content-Type: text/html\n\n") import requests response = requests.get('https://www.ya.ru') print(response.url + response.text) the problem is in requests module it's just not work anymore! I get only Content-Type: text/html and thats's all can you fix it please? I run it in cgi-bin dir with 0775 rights
  6. Still not understand why my script not working today on your server in console on my local machine it’s works can you contact to me with discord please? slazee#4664
  7. I think it’s not needed Can anybody help me figure out what's happen with Python today on Ricky? yesterday my script works well https://pastebin.com/raw/5p0irNzL but today I just got "Content-Type: text/html" and it create folder __pycache__ and file inside json.cpython-36.pyc why is that? permisson on PY file is set to 0775 and it's in cgi-bin dir
  8. Hi! Can I request to install Json lib for python3.6 on Ricky server? If it’s matter my acc name trbot. Tnx.
×
×
  • Create New...