'strict' to raise a ValueError exception if there is an encoding error. The default value of None has the same effect.
'ignore' ignores errors. Note that ignoring encoding errors can lead to data loss.
'replace' causes a replacement marker (such as '?') to be inserted where there is malformed data.
'surrogateescape' will represent any incorrect bytes as low surrogate code units ranging from U+DC80 to U+DCFF. These surrogate code units will then be turned back into the same bytes when the surrogateescape error handler is used when writing data. This is useful for processing files in an unknown encoding.
'xmlcharrefreplace' is only supported when writing to a file. Characters not supported by the encoding are replaced with the appropriate XML character reference &#nnn;.
'backslashreplace' replaces malformed data by Python’s backslashed escape sequences.
'namereplace' (also only supported when writing) replaces unsupported characters with \N{...} escape sequences.
import requests
url = "https://www.work.ua/_data/_ajax/by-category-block.php"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0",
"Accept": "*/*","Accept-Language": "ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"X-Requested-With": "XMLHttpRequest"
}
data = "region_id=0&search_type=jobs"
r = requests.post(url=url, headers=headers , data=data)
print(r.text)
ctx.beginPath();
ctx.arc(75,75,50,0,Math.PI*2,true);
ctx.stroke();
ctx.beginPath();
ctx.arc(75,75,35,0,Math.PI,false); // рот (по часовой стрелке)
ctx.stroke();
import subprocess
args = ["ping.exe", "www.yahoo.com"]
process = subprocess.Popen(args, stdout=subprocess.PIPE)
data = process.communicate()
print(data)
<meta property="og:image" content="http://habrastorage.org/files/373/e8b/dd3/373e8bdd3cb644d3bbeba47d34d1876d.png">
<meta property="og:image" content="http://habrastorage.org/files/69b/dff/42b/69bdff42b7764722bc11aff85e29693d.png">
<meta property="og:title" content="Как транслировать title, description, image чужого сайта к себе?">
<meta property="og:description" content="Ожидают ответа 1 человек. Станьте первым, кто даст ответ! Или подпишитесь на вопрос, чтобы узнать ответ, когда он появится.">
<meta property="og:keywords" content="php, javascript">
<meta property="og:url" content="https://toster.ru/q/296500">