49 Args:
50 major (str): Only consider versions which are "descendants" of this major version string
51 short_urls (bool): Whether we should try to return shorter URLs for release data
52 assets_filter (Union[str, Pattern]): Regular expression for filtering assets for the latest release 53 only (str): Only consider tags with this text. Useful for repos with multiple projects.
54 The argument supports negation and regular expressions. To indicate a regex,
55 start it with tilde sign, to negate the expression, start it with exclamation
472 # API requests are varied by cookie, we don't want serializer for cache fail because of that
473 self.cookies.clear()
474 if r.status_code == 404 and not rename_checked:
475 # #44: in some network locations, GitHub returns 404 (as opposed to 301 redirect) for the renamed476 # repositories /releases.atom. When we get a 404, we lazily load repo info via API, and hopefully
477 # get redirect there as well as the new repo full name
478 r = self.repo_query('')
473 self.cookies.clear()
474 if r.status_code == 404 and not rename_checked:
475 # #44: in some network locations, GitHub returns 404 (as opposed to 301 redirect) for the renamed
476 # repositories /releases.atom. When we get a 404, we lazily load repo info via API, and hopefully477 # get redirect there as well as the new repo full name
478 r = self.repo_query('')
479 if r.status_code == 200:
145 """Get the preferred filename from the `Content-Disposition` header.
146
147 Examples:
148 `attachment; filename="emulationstation-de-2.0.0-x64.deb"; filename*=UTF-8''emulationstation-de-2.0.0-x64.deb`149
150 """
151 filename = None
Docstring line lengths are recommended to be no greater than 79 characters.