Skip to content

Commit

Permalink
Use dictionary literals where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
kannibalox committed Feb 16, 2024
1 parent b78923c commit 3e27f2d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/ptpapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,20 +341,20 @@ def not_missing_li(tag):

def collage_add(self, coll_id, movieobj):
"""Adds a given movie to a collage, requires password login."""
search_terms = dict(id=coll_id)
search_terms = {"id": coll_id}
req = session.base_get("collages.php", params=search_terms)
soup = bs4(req.content, "html.parser")
csrf_token = soup.find(id="add_film").find("input")["value"]
movieobj.load_inferred_data()
resp = session.base_post(
"collages.php",
params=dict(action="add_torrent"),
data=dict(
AntiCsrfToken=csrf_token,
action="add_torrent",
collageid=coll_id,
url=movieobj.data["Link"],
),
params={"action": "add_torrent"},
data={
"AntiCsrfToken": csrf_token,
"action": "add_torrent",
"collageid": coll_id,
"url": movieobj.data["Link"],
},
)
return resp

Expand Down

0 comments on commit 3e27f2d

Please sign in to comment.