Merge pull request #247 from rycee/fix/gitlab-update
This commit is contained in:
commit
693c27b5d5
1 changed files with 3 additions and 2 deletions
|
|
@ -13,9 +13,10 @@ from .manifest import LockedVersion, Repo, RepoType
|
|||
|
||||
|
||||
def fetch_commit_from_feed(url: str) -> str:
|
||||
req = urllib.request.urlopen(url)
|
||||
req = urllib.request.Request(url, headers={"User-Agent": "nur-updater"})
|
||||
res = urllib.request.urlopen(req)
|
||||
try:
|
||||
xml = req.read()
|
||||
xml = res.read()
|
||||
root = ET.fromstring(xml)
|
||||
ns = "{http://www.w3.org/2005/Atom}"
|
||||
xpath = f"./{ns}entry/{ns}link"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue