Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandhunt committed Jan 26, 2020
1 parent acc7255 commit 3e3e2bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scraper.py
Expand Up @@ -657,11 +657,12 @@ def doesscrapeurlexist(scrapesitelist, scrapeurl):
scrapsite['scrapefield']['imageselector'] = scrapsite['scrapefield']['imageselector'].encode().decode("unicode-escape")
#image_urls = ''
image_elements = prod_root.cssselect(scrapsite['scrapefield']['imageselector'])
for i in image_elements: print(i)
if image_elements:
for i in range(len(image_elements)):
image_elements[i] = str(etree.tostring(image_elements[i]))
image_dom = ','.join(image_elements)
#print('IMAGE DOM: ' + image_dom)
print('IMAGE DOM: ' + image_dom)
if altimggrab == '1':
output = re.finditer(r'image\=\"(.*)\"', image_dom, flags.U)
if output[1].len() > 0:
Expand Down

0 comments on commit 3e3e2bc

Please sign in to comment.