There's a href link with # in a website's source code:
<li class="tab-real-estate-index"><a href="#realestate-index" id="realEstateTab">Emlak Endeksi</a></li>
I can send connection request to it's normal link (/path/linktoRealEstate/details) with following command. It returns HTTP Status 200 to me:
import http.client
conn = http.client.HTTPSConnection("www.website.com")
myLink= f"/path/linktoRealEstate/details"
conn.request("GET",myLink,payload, headers)
But when I send connection request to /path/linktoRealEstate/details#realestate-index
, it returns me 400 error.
<!DOCTYPE html>
<html lang="en"><head><title>HTTP Status 400 – Bad Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 400 – Bad Request</h1></body></html>
How can I get HTTP status 200 with Python?
HTTP Status 400 – Bad Request
– Soul Jul 15 '22 at 19:54