From 1262dc2ba78b4cef15749d3bed46ae3083e59b0f Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 24 Sep 2019 19:12:31 -0400 Subject: [PATCH] Change package reference to avoid clashes --- src/utils/scraper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/scraper.py b/src/utils/scraper.py index dae24f5..1ad5b78 100644 --- a/src/utils/scraper.py +++ b/src/utils/scraper.py @@ -3,7 +3,7 @@ import ast import re from bs4 import BeautifulSoup -from lxml import html +import lxml from hurry.filesize import size, alternative from misc import exceptions as exc @@ -108,7 +108,7 @@ async def get_post(url): async def get_image(url): content = await u.fetch(url) - value = html.fromstring(content).xpath( + value = lxml.html.fromstring(content).xpath( 'string(/html/body/div[@id="content"]/div[@id="post-view"]/div[@class="content"]/div[2]/img/@src)') return value