May-16-2018, 04:18 PM
(May-16-2018, 04:11 PM)Geluidsgoeroe Wrote: That's why I'm trying to figure out how to get text in there from a webpageTake a look at Web-Scraping part-1.
Problem with retrieving and parsing from webpage.
|
May-16-2018, 04:18 PM
(May-16-2018, 04:11 PM)Geluidsgoeroe Wrote: That's why I'm trying to figure out how to get text in there from a webpageTake a look at Web-Scraping part-1.
May-16-2018, 04:29 PM
(May-16-2018, 04:18 PM)snippsat Wrote:(May-16-2018, 04:11 PM)Geluidsgoeroe Wrote: That's why I'm trying to figure out how to get text in there from a webpageTake a look at Web-Scraping part-1. Thanks, but that part has been figured out already. I have a working script that retrieves the text, and I have a working script that displays RDS. What I'm looking for now is how to put the output of the first one, into the second one.
May-16-2018, 04:37 PM
If you put print(data) below the request.get call, is 'data' printed to the terminal?
May-16-2018, 04:58 PM
May-16-2018, 05:20 PM
Test also to print(type(data)) and post what it prints.
May-16-2018, 05:27 PM
Good!
So, you give to setRDSbuffer a plain string and it works but if you give it an object which is also a string doesn't work? That no make sense at all. Both are strings.
May-16-2018, 06:10 PM
(May-16-2018, 05:44 PM)wavic Wrote: Good! Very informative. I'm learning new things here. Thanks. But. Erm... Wait... Looking more closely... The problem seems to originate in another (not necessarily customizable) script. Traceback (most recent call last): File "/home/pi/radio/radio.py", line 41, in <module> radio.setRDSbuffer( data) File "/home/pi/radio/Adafruit_Si4713.py", line 749, in setRDSbuffer bufferArray[i] = char IndexError: list assignment index out of rangeAny idea what that last line could mean? Quote:IndexError: list assignment index out of range
What is that library? Can you point a link to it?
|
|