# HTTP.CookiesForURL broken?

**URL:** <https://forums.plex.tv/t/http-cookiesforurl-broken/213185>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [November 6, 2017, 6:30pm UTC](https://forums.plex.tv/t/http-cookiesforurl-broken/213185 "2017-11-06T18:30:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![czukowski](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/czukowski/32/9008_2.png) [@czukowski](https://forums.plex.tv/u/czukowski)\
**Post date:** [November 6, 2017, 6:30pm UTC](https://forums.plex.tv/t/http-cookiesforurl-broken/213185/1 "2017-11-06T18:30:46Z")

</div>

I’ve started getting this error recently: _TypeError: get\_cookies\_for\_url() takes exactly 3 arguments (2 given)_

Sure enough, from _api/networkkit.py_:

```auto
  def CookiesForURL(self, url):
    """
      Returns the cookies associated with the given URL.
    """
    cookie_jar = self._context.cookie_jar
    cookies = self._core.networking.get_cookies_for_url(url, cookie_jar=cookie_jar)
    if cookies:
      return cookies
    elif cookie_jar:
      return self._core.networking.get_cookies_for_url(url)

```

From _components/networking.py_:

```auto
  def get_cookies_for_url(self, url, cookie_jar):
    if cookie_jar == None: cookie_jar = self._cookie_jar
    ...

```

The `cookie_jar` argument is required and the calling function doesn’t use it .

Searching the forum has given me two really old posts with the same error message:

> **[\[REL\] NFL Network](https://forums.plex.tv/discussion/comment/721015#Comment_721015)**
>
> NFL Channel was working for me last weekend this weekend it stopped. I have the gamepass sub and it works on my computer so I know it is an issue with plex and this channel.  Unable to play media  Typeerror:get\_cookies\_for\_url() takes...

> **[\[REL\] NFL Network](https://forums.plex.tv/discussion/comment/1016796#Comment_1016796)**
>
> I can’t get any gamepass content to work. I can play gamepass content from the machine running plex in chrome just fine, but it won’t work through the plugin in plex. NFL.com content works, but nothing gamepass. 2015-09-11 09:51:47,949...

I haven’t saved the previous Framework folder in order to compare changes, right now the one I have is called `Plug-ins-1bf240a65`. If nothing has changed in these functions above and the code has been as such since long time ago, there must have been something that has switched the code flow of my channel into the other broken if-branch (elif)…

Any ideas?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 8, 2020, 8:05pm UTC](https://forums.plex.tv/t/http-cookiesforurl-broken/213185/2 "2020-01-08T20:05:49Z")

</div>


