Adapt BeautifulSoup import for WAPT 1.8

This commit is contained in:
Daniel Berteaud 2020-04-16 09:56:42 +02:00
parent 93c5c610cc
commit ab0eff0898
1 changed files with 5 additions and 1 deletions

View File

@ -45,8 +45,12 @@ def sendmessagebox(msg,title,boxtype=4096):
def update_package():
import requests,BeautifulSoup,re
import requests,re
from waptpackage import PackageEntry
try:
import bs4 as BeautifulSoup
except:
import BeautifulSoup
page = requests.get('https://www.java.com/en/download/manual.jsp',headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'}).text
bs = BeautifulSoup.BeautifulSoup(page)