Categories
Linux Mastering Development

curl –data-binary $’ inside a shell script

I have tried everything to do a curl from within a shell script. This curl has a –data-binary $’ part which I just can not get my script to recreate. It will move the $ inside the single quote for some weird reason. Any ideas how to fix it? –data-binary ‘$ curl -s -H ‘Connection: […]

Categories
Linux Mastering Development

curl –data-binary $’ inside a shell script

I have tried everything to do a curl from within a shell script. This curl has a –data-binary $’ part which I just can not get my script to recreate. It will move the $ inside the single quote for some weird reason. Any ideas how to fix it? –data-binary ‘$ curl -s -H ‘Connection: […]

Categories
Linux Mastering Development

curl –data-binary $’ inside a shell script

I have tried everything to do a curl from within a shell script. This curl has a –data-binary $’ part which I just can not get my script to recreate. It will move the $ inside the single quote for some weird reason. Any ideas how to fix it? –data-binary ‘$ curl -s -H ‘Connection: […]

Categories
Linux Mastering Development

Performing a “complex” curl inside a shell script

I have tried everything to do a curl from within a shell script. This curl has a –data-binary $’ part which I just can not get my script to recreate. It will move the $ inside the single quote for some weird reason. Any ideas how to fix it? –data-binary ‘$ curl -s -H ‘Connection: […]

Categories
Mastering Development

AttributeError: ‘str’ object has no attribute ‘items’ (python)

I am trying to post data to api of website using this code: import requests as r import json load={“accept”: “application/json, text/plain, */*”, “accept-encoding”: “gzip, deflate, br”, “accept-language”: “en-US,en;q=0.9”, “content-length”: “40”, “content-type”: “application/json”, “origin”: “www.mysite.com”, “referer”: “www.mysite.com”, “sec-fetch-dest”: “empty”, “sec-fetch-mode”: “cors”, “sec-fetch-site”: “cross-site”, “user-agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 […]

Categories
Mastering Development

I am trying to scrape a wikipedia page in nodejs

I am trying to scrape a wikipedia page https://en.wikipedia.org/wiki/List_of_largest_companies_by_revenue. My target is to store all 50 rows in the table to csv file. But I am not able to do so. Please find the code attached. // Importing necessary modules const request = require(“request-promise”) const cheerio = require(“cheerio”) const fs = require(“fs”) const json2csv = […]

Categories
Mastering Development

POST REQUEST PYTHON does not change the default date in the response

enter image description hereI am trying to post a form data at the https://seffaflik.epias.com.tr/transparency/piyasalar/gop/ptf.xhtml and i get a response but not with the proper date i post. Here is the code i use: import requests.sessions url = “https://seffaflik.epias.com.tr/transparency/piyasalar/gop/ptf.xhtml” aaa = {“j_idt202”: “j_idt202”, “j_idt202:date1_input”: “15.04.2020”, “j_idt202:date2_input”: “17.04.2020”, “j_idt202:goster”: “”, “j_idt202:dt_rppDD”: “24”, “javax.faces.ViewState”: “-4553737376077641878:8530200118323030971”} bbb = {“Accept”: […]

Categories
Mastering Development System & Network

Multiple domains and multiple php-fpm pools conflicting

For some reason when running multiple domains/vhosts it is conflicting and it does not pass the relevant PHP pool? Now I have created two maps.conf as each domain will have multiple domains/stores. Now the issue is domain1 using xxxxx pool and when I var_dump $params = $_SERVER; var_dump($_SERVER); exit; For domain1 it returns the following: […]

Categories
Linux Mastering Development

Running of curl processes in parallel in bash

I think post my data by curl command in terminal at the time but thousands of times to get a good turn. I wrote the following bash code: contents=$(< /Users/Andrea/Desktop/data.txt) eval “words=( $contents )” arguments=() for i in {1..10000} do arguments+=( “${words[@]}” ); done; curl “${arguments[@]}”; which my JSON data are saved in data.txt. When […]

Categories
Linux Mastering Development

Running thousands of curl processes in parallel in bash script as fast as possible

Let me first explain what I’m trying to do. Indeed every day at a specific time I am going to a queue to get an appointment. In this queue there are about 50000 people and the first 10 will get success and the rest have to try in next days. To do this we send […]