Home » Football » Burnley (w) (England)

Burnley Women FC: Premier League Squad, Achievements & Stats

Overview of Burnley Women’s Football Team

The Burnley Women’s Football Team, based in Burnley, England, competes in the FA Women’s Championship. Founded in 2019, the team is currently managed by Steve Harrison and plays its home games at Turf Moor.

Team History and Achievements

Burnley (w) has made significant strides since its inception, quickly establishing itself as a competitive force. Notable achievements include reaching the FA Women’s Championship playoffs multiple times and securing a strong league position consistently.

Notable Seasons and Records

The team has had several standout seasons, with key victories that have bolstered their reputation in the league. Their performance metrics often reflect a resilient squad capable of challenging top-tier teams.

Current Squad and Key Players

The squad boasts several key players who are instrumental to their success. Standout performers include:

  • Laura Jackson – Goalkeeper
  • Nicola Docherty – Midfielder
  • Kelly Smith – Forward

Player Statistics

Key players like Laura Jackson have impressive stats, with high save percentages and clean sheets contributing to the team’s defensive strength.

Team Playing Style and Tactics

Burnley (w) employs a 4-3-3 formation, focusing on solid defense and quick counter-attacks. Their strategy emphasizes teamwork and exploiting opposition weaknesses.

Strengths and Weaknesses

  • ✅ Strengths: Strong defense, effective counter-attacks.
  • ❌ Weaknesses: Occasional lapses in midfield control.

Interesting Facts and Unique Traits

The team is known as “The Clarets,” with a passionate fanbase supporting them fiercely. They have rivalries with local teams that add excitement to their matches.

Fanbase and Traditions

Burnley (w) fans are known for their loyalty and vibrant support during matches, contributing to an electrifying atmosphere at Turf Moor.

Lists & Rankings of Players, Stats, or Performance Metrics

  • ✅ Top Scorer: Kelly Smith – 12 goals this season.
  • 🎰 Most Assists: Nicola Docherty – 8 assists this season.
  • 💡 Defensive Record: Laura Jackson – 15 clean sheets this season.

Comparisons with Other Teams in the League or Division

Burnley (w) often compares favorably against other mid-table teams due to their tactical discipline and ability to perform under pressure.

Case Studies or Notable Matches

A breakthrough game for Burnley (w) was their victory over a top-tier team last season, showcasing their potential to disrupt league standings with strategic play.

Tables Summarizing Team Stats, Recent Form, Head-to-Head Records, or Odds

Statistic Burnley (w) Average League Positioning
Last 5 Matches Wins/Losses/Draws 3W-1D-1L -/5/-/0/-/5-
Average Goals Scored per Match 1.8 -/1.5/-/0/-/1.7-</td
<>def _make_request(url,
timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
verify_ssl=True,
method=’get’,
headers=None,
data=None,
**kwargs):
“””
Utility function for making requests using requests library.
:param url(str): URL of the request
:param timeout(int): Timeout for request
:param verify_ssl(bool): Verify SSL certificate
:param method(str): HTTP method type
:param headers(dict): Headers for HTTP request
:param data(any): Data for HTTP request
:return:
dict: Containing following keys –
response_code(int)
response_body(str)
response_headers(dict)
error_code(int)
error_message(str)
“””
if sys.version_info.major == 3:
from urllib.parse import urlparse
url_parts = urlparse(url)
host = url_parts.hostname
if host is None:
raise Exception(“Invalid URL %s”, url)
port = url_parts.port
if port is None:
port = 443 if url_parts.scheme == ‘https’ else 80

if not verify_ssl:
import ssl

# pylint:disable=consider-using-with
context = ssl.create_default_context()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE

scheme = ‘https’ if verify_ssl else ‘http’
connection_string = ‘%s://%s:%d’ % (scheme,
host,
port)

from http.client import HTTPSConnection as Connection

connection = Connection(host=host,
port=port,
timeout=timeout,
context=context)

else:
connection_string = url

import httplib as http_client

if not verify_ssl:
# pylint:disable=consider-using-with
http_client.HTTPConnection.debuglevel = 1

connection = http_client.HTTPSConnection(host=urlparse(url).hostname,
port=urlparse(url).port)

connection.request(method.upper(),
url.replace(connection_string, ”),
body=data,
headers=headers or {})

response = connection.getresponse()
response_body_raw_bytes = response.read()
response_body_decoded_str = response_body_raw_bytes.decode(‘utf-8′)

# Solution-with-error-steps:

# Step-by-step analysis of the provided code snippet:

# Step 1: The function `_make_request` accepts various parameters including `url`, `timeout`, `verify_ssl`, `method`, `headers`, `data`, etc., which are used to configure an HTTP request.

# Step 2: It checks Python version using `sys.version_info.major`. If it’s Python 3 (`major == 3`), it uses `urllib.parse.urlparse` to parse the URL into components like hostname and port.

# Step 3: For Python versions other than Python 3 (i.e., Python 2), it imports `httplib` instead of `http.client`.

# Step 4: If SSL verification is disabled (`not verify_ssl`), it sets up an SSL context with no hostname checking or certificate verification.

# Step 5: Constructs a connection string based on whether SSL verification is enabled or not.

# Step 6: Uses either `http.client.HTTPSConnection` for Python 3 or `httplib.HTTPSConnection` for other versions to create a connection object.

# Step 7: Sends an HTTP request using the specified method (`GET`, etc.) by calling `connection.request()`.

# Error Identification:

# The error occurs in how connections are handled differently between Python versions.
#
# In Python version check section:
#
## Issue Explanation:

The primary issue lies within how connections are created depending on the version of Python being used. Specifically:

1. **Python Version Handling**:
– For Python versions other than Python 3 (`else` block), there is an attempt to use both `urlparse()` from both modules (`urllib.parse` which should be imported first) without ensuring that it’s available in older versions.

## Suggestions for Fixing:

To resolve these issues effectively while maintaining backward compatibility:

1. **Import Compatibility**:

Ensure correct imports based on version compatibility before using them within each branch.

python
import sys

def _make_request(url,
timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
verify_ssl=True,
method=’get’,
headers=None,
data=None,
**kwargs):

# Determine python version specific imports here

if sys.version_info.major == 3:
from urllib.parse import urlparse

# Rest remains same…

else:
try:
from urlparse import urlparse # Correctly import urlparse for older versions

import httplib as http_client

# Rest remains same…

This ensures that each module function is correctly imported based on the current running version of Python before they’re used within respective blocks.
<>: Alright, I see what you’re getting at with the imports. But I’m thinking we can make this cleaner by abstracting out some common functionality into helper functions. Like we could have one function that handles creating the SSL context since that’s something we do regardless of the Python version when verify_ssl is False. And maybe another one that just takes care of parsing the URL since that’s also common across versions but uses different modules depending on whether it’s Py3 or not. What do you think?
<> That sounds like a great idea! Abstracting common functionality into helper functions can make your code cleaner and more maintainable. Here’s how you can refactor your code:

python
import sys
import socket

def create_ssl_context():
“””Create an SSL context with no hostname checking or certificate verification.”””
import ssl
context = ssl.create_default_context()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
return context

def parse_url(url):
“””Parse URL based on Python version.”””
if sys.version_info.major == 3:
from urllib.parse import urlparse
return urlparse(url)
else:
from urlparse import urlparse as pyurlparse
return pyurlparse(url)

def _make_request(url,
timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
verify_ssl=True,
method=’get’,
headers=None,
data=None,
**kwargs):

url_parts = parse_url(url)

host = url_parts.hostname
if host is None:
raise Exception(“Invalid URL %s” % url)

port = url_parts.port if url_parts.port else (443 if url_parts.scheme == ‘https’ else 80)

if not verify_ssl:
context = create_ssl_context()

scheme = ‘https’ if verify_ssl else ‘http’

connection_string = ‘%s://%s:%d’ % (scheme, host, port)

if sys.version_info.major == 3:
from http.client import HTTPSConnection as Connection

connection_class_args = {
‘host’: host,
‘port’: port,
‘timeout’: timeout
}

if not verify_ssl:
connection_class_args[‘context’] = context

connection_class_kwargs = {}

connection_class_name_args_map_dict_name_list_pair_list_of_tuples_for_which_the_first_element_is_the_name_of_the_argument_and_the_second_element_is_a_tuple_containing_the_name_of_the_corresponding_keyword_argument_and_the_value_of_that_argument_for_this_particular_instance_of_the_connection_class_creation=[(‘context’, (‘context’,context))]

kwargs.update(dict(connection_class_name_args_map_dict_name_list_pair_list_of_tuples_for_which_the_first_element_is_the_name_of_the_argument_and_the_second_element_is_a_tuple_containing_the_name_of_the_corresponding_keyword_argument_and_the_value_of_that_argument_for_this_particular_instance_of_the_connection_class_creation))

kwargs=dict(connection_class_kwargs.items() + tuple(kwargs.items()))

print(kwargs)

kwargs.pop(‘context’)

print(kwargs)

kwargs[‘connection’]=(connection_class_kwargs,**kwargs)[0]

print(kwargs)

kwargs[‘connection’]=connection_class(**kwargs[‘connection’])

print(kwargs[‘connection’])

del kwargs[‘connection’]

print(kwargs)

else:

import httplib as http_client

if not verify_ssl:

http_client.HTTPConnection.debuglevel=1

connection=http_client.HTTPSConnection(host=urlparse(url).hostname,port=urlparse(url).port)

connection.request(method.upper(),url.replace(connection_string,”),body=data,headers=headersor{})

response=connection.getresponse()

response_body_raw_bytes=response.read()

response_body_decoded_str=response_body_raw_bytes.decode(‘utf-8’)

In this refactored code:

1. **Helper Functions**:
– `create_ssl_context`: Creates an SSL context when SSL verification is disabled.
– `parse_url`: Parses the URL based on the Python version.

2. **Main Function** `_make_request`**:
– Uses these helper functions to handle common tasks.

This should make your code cleaner and easier to maintain while ensuring compatibility across different Python versions.
<>: Looks good! But I noticed there’s a bit of redundant code when setting up kwargs for creating the HTTPSConnection instance in Py3 branch. We’re updating kwargs twice unnecessarily after creating dict items from tuples which seems incorrect syntax-wise too. Can we streamline this part? Also, shouldn’t we use ‘with’ statement when creating connections to ensure they’re properly closed after use?
<>: Absolutely! Let’s streamline that part by removing redundant updates to `kwargs` and ensuring proper resource management using the `with` statement when creating connections.

Here’s an updated version of your code:

python
import sys
import socket

def create_ssl_context():
“””Create an SSL context with no hostname checking or certificate verification.”””
import ssl
context = ssl.create_default_context()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
return context

def parse_url(url):
“””Parse URL based on Python version.”””
if sys.version_info.major == 3:
from urllib.parse import urlparse
return urlparse(url)
else:
from urlparse import urlparse as pyurlparse
return pyurlparse(url)

def _make_request(url,
timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
verify_ssl=True,
method=’get’,
headers=None,
data=None,
**kwargs):

url_parts = parse_url(url)

host = url_parts.hostname
if host is None:
raise Exception(“Invalid URL %s” % url)

port =url_parts.port if url_parts.port else (443 if url_parts.scheme==’https’ else 80)

context =create_ssl_context() if not verify_ssl else None

scheme =’https’ if verify_ssl else ‘http’

connection_string=’%s://%s:%d’%(scheme host port)

if sys.version_info.major== 3:

from http client import HTTPSConnection as Connection

with Connection(host host port timeout timeout context=context if context else None) as connection:

connection.request(method.upper(), url.replace(connection_string,”), body=data headers=headersor{})

response = connection.getresponse()

response_body_raw_bytes=response.read()

response_body_decoded_str=response_body_raw_bytes.decode(‘utf-8’)

return{
‘response_code’: response.status,

‘response_body’: response_body_decoded_str,

‘response_headers’: response.getheaders(),

}

else:

import http client as http_client

if not verify_ssl:

http_client.HTTPConnection.debuglevel=1

with http_client.HTTPSConnection(host=url_parse.url.hostname,port=url_parse.url.port) as connection:

connection.request(method.upper(), url.replace(connection_string,”), body=data headers=headersor{})

response = connection.getresponse()

response_body_raw_bytes=response.read()

response_body_decoded_str=response_body_raw_bytes.decode(‘utf-8’)

return{
‘response_code’: response.status,

‘response_body’: response_body_decoded_str,

‘response_headers’: response.getheaders(),

}

### Key Changes:

1. **Streamlined Keyword Arguments**:
– Removed redundant updates to `kwargs`.

2. **Resource Management**:
– Used the `with` statement for creating connections to ensure they are properly closed after use.

This should make your code cleaner and more efficient while maintaining compatibility across different Python versions.
<>: That’s much better! Now let’s tackle exception handling around those network calls inside our ‘_make_request’ function. We should catch exceptions like timeouts or connection errors so our app doesn’t crash unexpectedly when there are network issues.
<>: Great point! Adding exception handling will make your application more robust against network issues like timeouts or connection errors. Here’s how you can incorporate exception handling into your `_make_request` function:

python
import sys
import socket

class RequestException(Exception):
pass

class TimeoutException(RequestException):
pass

class ConnectionException(RequestException):
pass

def create_ssl_context():
“””Create an SSL context with no hostname checking or certificate verification.”””
import ssl

context context=create_default_context()

context.check_hostname=False

context.verify_mode=CERT_NONE

return context

def parse_url(url):
“””Parse URL based on Python version.”””
if sys.version_info.major== url_parse=

if sys.version_info.major== url_parse=

from parse url as pyurlparse

return pyurlparse( url )

def _make_request( url,

timeout socket._GLOBAL_DEFAULT_TIMEOUT,

verify_SSL=True,

method=’get’,

headers=None,

data=None,

**kwargs):

try:

url_parse=parsed_url( url )

host=url_parse.hostname

if host is None :

raise RequestException( “Invalid URL” %url )

port=url_parse.port if url_parse.port else

(443 if url_parse.scheme==’https’

else

80 )

context create_SSL_Context()if not verify_SSL else None

scheme=’https’if verify_SSL else’http’

connection_string=’% scheme://host% port’

if sys.version_info.major==