Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import requests
  2. from bs4 import BeautifulSoup
  3. import pytesseract
  4. from PIL import Image
  5.  
  6. r = requests.get('http://challenge01.root-me.org/programmation/ch8/')
  7. data = r.text
  8. soup = BeautifulSoup(data, 'html.parser')
  9.  
  10. for imgtag in soup.find_all('img'):
  11. img = imgtag['src']
  12. print(imgtag['src'])
  13.  
  14. image = Image.open('index.png')
  15.  
  16. print(pytesseract.image_to_string(image))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement