This commit is contained in:
simon 2019-12-17 10:53:32 -05:00
parent 10a6a5d4aa
commit ec03e5e412
2 changed files with 6 additions and 2 deletions

View File

@ -9,5 +9,8 @@ setup(
packages=["vanwanet_scrape"],
install_requires=[
"requests", "bs4", "hexlib @ git+git://github.com/simon987/hexlib.git",
]
],
package_data={
"vanwanet_scrape": ["*.js"],
}
)

View File

@ -1,3 +1,4 @@
import os
import re
import subprocess
from http.cookiejar import CookieJar
@ -6,7 +7,7 @@ import requests
from bs4 import BeautifulSoup
from hexlib.web import cookie_from_string
with open("aes.js", "r") as f:
with open(os.path.join(os.path.dirname(__file__), "aes.js"), "r") as f:
AES = f.read()
SUB_PATTRN = re.compile(r'document\.cookie="(.+)";location.+$')