Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesturk committed Aug 9, 2021
1 parent ee57b88 commit 5795c48
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/spatula/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ class Source:

class URL(Source):
def __init__(
self, url: str, method: str = "GET", data: dict = None, headers: dict = None, verify: bool = True
self,
url: str,
method: str = "GET",
data: dict = None,
headers: dict = None,
verify: bool = True,
):
"""
Defines a resource to fetch via URL, particularly useful for handling non-GET
Expand All @@ -32,7 +37,11 @@ def get_response(
self, scraper: scrapelib.Scraper
) -> Optional[requests.models.Response]:
return scraper.request(
method=self.method, url=self.url, data=self.data, headers=self.headers, verify=self.verify
method=self.method,
url=self.url,
data=self.data,
headers=self.headers,
verify=self.verify,
)

def __str__(self) -> str:
Expand Down

0 comments on commit 5795c48

Please sign in to comment.