Skip to content

Commit

Permalink
Fix relative import in ATK Girlfriends
Browse files Browse the repository at this point in the history
  • Loading branch information
Maista6969 committed Dec 19, 2023
1 parent 4fcb313 commit bedad6c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scrapers/ATKGirlfriends/ATKGirlfriends.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import json
import os
import re
import requests
import sys

# to import from a parent directory we need to add that directory to the system path
csd = os.path.dirname(os.path.realpath(__file__)) # get current script directory
parent = os.path.dirname(csd) # parent directory (should be the scrapers one)
sys.path.append(
parent
) # add parent dir to sys path so that we can import py_common from there

try:
import py_common.log as log
except ModuleNotFoundError:
Expand Down

0 comments on commit bedad6c

Please sign in to comment.