Category : python-requests

i have python script which trigger the jenkins job remotely but i have no idea how i can get the build status of the job with get triggered and the console output. jenkins_job_name = "job name" Jenkins_url = "url" jenkins_user = "username" jenkins_pwd = "psswrd" buildWithParameters = True jenkins_params = {‘token’: ‘token’, ‘password’:’psswrd’, ‘file’: grp, ..

Read more

I have been trying to scrape data from investing.com and get Volume and Net Volume data for some bonds from the technical analysis charts (Example: https://ng.investing.com/rates-bonds/us912810rk60-streaming-chart) Technical analysis chart showing volume and net volume I attempted this using python requests module but got stuck when retrieving data from the graph itself. Source: Python..

Read more

I am trying to improve an existing snippet that extracts data from: https://bscscan.com/tx/0x1b6f00c8cd99e0daac5718c743ef9a51af40f95feae23bf29960ae1f66a1cff7 and I cant figure out how to extract some fields as it returns None. from bs4 import BeautifulSoup from urllib import request from urllib.request import Request, urlopen req = Request(‘https://bscscan.com/tx/0x1b6f00c8cd99e0daac5718c743ef9a51af40f95feae23bf29960ae1f66a1cff7’, headers={‘User-Agent’: ‘Mozilla/5.0’}) webpage = urlopen(req).read() soup = BeautifulSoup(webpage, ‘html.parser’) val = soup.find(‘span’, ..

Read more

Exception in thread Thread-1: Traceback (most recent call last): File "C:UsersGerdooAppDataLocalProgramsPythonPython39libthreading.py", line 973, in bootstrap_inner self.run() File "C:UsersGerdooAppDataLocalProgramsPythonPython39libthreading.py", line 910, in run self.target(*self.args, **self.kwargs) File "c:UsersGerdooDesktopdistutube_downloader.py", line 83, in first_to_second for i in range(len(video.streams)): File "C:UsersGerdooAppDataLocalProgramsPythonPython39libsite-packagespytube_main.py", line 308, in streams return StreamQuery(self.fmt_streams) File "C:UsersGerdooAppDataLocalProgramsPythonPython39libsite-packagespytube_main.py", line 211, in fmt_streams if "adaptive_fmts" in self.player_config_args: File "C:UsersGerdooAppDataLocalProgramsPythonPython39libsite-packagespytube_main.py", line ..

Read more

When using flask_restful to create model ‘Video’, i used a function ‘video_exist’ to check if the id is exist of not, if already have that id, abort request class Video(Resource): def get(self,video_id): video_non_exist(video_id) return videos[video_id] def post(self,video_id): video_exist(video_id) args = video_post_args.parse_args() videos[video_id] = args return{video_id: args},203 i can still post a new data with the ..

Read more

I am receiving an error while I am sending a POST request from Python :- my_headers = { ‘Authorization’:’Bearer TOKEN’, ‘Content-Type’:’application/json’, ‘Accept’:’*/*’ } query = { ‘templateId’:’DidDocumentModule:DIDDocument’, ‘contractId’:’00ae84c7187a15a65ee0f66b92d9aba2f7f3595f57de6f09ad7fc7f53af75c6336′, ‘choice’:’Archive’, ‘argument’:{ } } response = requests.post("http://127.0.0.1:7575/v1/exercise", data = query, headers = my_headers) I am getting the following error :- Cause: spray.json.Json“Parser$ParsingException: Unexpected character ‘e’ at input ..

Read more