Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
fixed error about user-agent initialization in the wrong place
Browse files Browse the repository at this point in the history
  • Loading branch information
fecton committed Aug 10, 2022
1 parent 5705d8f commit ce22d1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def process(start: int, end: int, args: argparse.Namespace) -> None:
VIEW_URL = "https://rutracker.org/forum/"
KEYWORD = args.game

ua = UserAgent()
if not os.path.exists("cache"):
os.mkdir("cache")

Expand Down Expand Up @@ -94,6 +93,8 @@ def process(start: int, end: int, args: argparse.Namespace) -> None:


if __name__ == "__main__":
ua = UserAgent()

parser = argparse.ArgumentParser(description='RuTracker: Native Linux Games parser')
parser.add_argument('--game', '-g', help='A game as search query')
parser.add_argument('--details', '-d', help='Shows more deatiled information during searching', action="store_true", default=False)
Expand Down

0 comments on commit ce22d1c

Please # to comment.