Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danielzsh committed Feb 28, 2024
1 parent 5e28e42 commit 5d7f5ad
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import argparse
import json
import urllib.request
import urllib.request, ssl
import os
from typing import Iterable, Optional, Tuple

Expand All @@ -16,7 +16,8 @@


def parse(url: str) -> BeautifulSoup:
page = urllib.request.urlopen(url)
req = urllib.request.Request(url, headers={"User-Agent": "Magic Browser"})
page = urllib.request.urlopen(req)
return BeautifulSoup(page, "html.parser")


Expand Down

0 comments on commit 5d7f5ad

Please sign in to comment.