{% load spurl %}
<a class="page-link" href="{% spurl query=request.GET set_query='page={{ p }}'%}">{{ p }}</a>
import requests
url = 'SOME_URL'
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_4) AppleWebKit/537.36 '
'(KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36',
'Referer': 'https://www.sex.com/'
}
response = requests.get(url, headers=headers)