Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pdf.load(page)
- label = pdf.pq('LTTextLineHorizontal:contains("Precinct")')
- x0 = float(label.attr('x0'))
- y0 = float(label.attr('y0'))
- x1 = float(label.attr('x1'))
- y1 = float(label.attr('y1'))
- precinct = pdf.pq('LTTextLineHorizontal:in_bbox("%s, %s, %s, %s")' &
- (x0, y0, x1, y1)).text()
- df.set_value(page, 'Precinct', precinct)
- precinct = pdf.pq('LTTextLineHorizontal:in_bbox("%s, %s, %s, %s")' &
- (x0, y0, x1, y1)).text()
- Traceback (most recent call last):File "Scraper.py", line 36, in <module>
- (x0, y0, x1, y1)).text()
- TypeError: unsupported operand type(s) for &: 'str' and 'tuple'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement