chickity china chinese chicken

Oct 31, 2021 19:14
thanks you too, good luck!
Oct 31, 2021 19:14
great, i'm stiff confused, but glad you got it 😀
Oct 31, 2021 19:14
glad you figured it out!
Oct 31, 2021 19:14
Ah
Oct 31, 2021 19:13
open() is expecting a file name after the name.py from your command
Oct 31, 2021 19:12
means that it is trying to read a file
Oct 31, 2021 19:12
`fd = open(sys.argv[1], "rb")
data = fd.read()`
Oct 31, 2021 19:12
the first 2 lines of your code
Oct 31, 2021 19:11
python3 name.py mystring
Oct 31, 2021 19:11
ok make sure you include all 3 terms when you run it
Oct 31, 2021 19:10
python3 name.py mystring?
Oct 31, 2021 19:09
when you run your script do you include the string after your script name?
Oct 31, 2021 19:08
were you given a file to read from?
Oct 31, 2021 19:07
like reading data from a textfile or something?
Oct 31, 2021 19:07
so you are encoding some data from somewhere?
Oct 31, 2021 19:07
okay sounds good
Oct 31, 2021 19:06
python3 myscript.py afile.txt ?
Oct 31, 2021 19:05
it seems your script is expecting a file to read?
Oct 31, 2021 19:05
what commands are you passing when you run your script?
Oct 31, 2021 19:04
that last IndexError means the script is not getting any input from command line inputs
Oct 31, 2021 19:03
you fixed the base45 import problem
Oct 31, 2021 19:02
be sure you are running with python3, e.g. python3 yourscript.py
Oct 31, 2021 19:00
safest command to remove python2 on ubuntu appears to be sudo apt purge python2.x-minimal
Oct 31, 2021 18:59
i'm not much familiar with ubuntu package manager, but just be careful purging python package
Oct 31, 2021 18:58
you can run python3 -m pip install base64 to get that package installed for python3
Oct 31, 2021 18:56
what does python3 -V output?
Oct 31, 2021 18:55
seems you already have python3 installed too
Oct 31, 2021 18:55
if you don't need python2.7 for anything, the easiest would be remove python2.7, and only install python3
Oct 31, 2021 18:54
well, remove it only if you don't want python2.7, but you don't have to remove python2.7
Oct 31, 2021 18:53
so you'll need to run your script with python3, not python2 :-/
Oct 31, 2021 18:53
seems base45 package requires Python >=3.6
Oct 31, 2021 18:49
need to get pip installed for python2 to run your script
Oct 31, 2021 18:49
seems pip is only installed for python3
Oct 31, 2021 18:46
what output do you get for pip -V?
Oct 31, 2021 18:43
when you run python -V what version shows up?
Oct 31, 2021 18:42
Hello
Oct 31, 2021 18:39
you have tagged the question with both python2.7 and python-3.x, for which version of python did you install base45?
Oct 31, 2021 18:39
ok, yes both of those commands effectively do the same thing, then you do have the package installed already
Oct 31, 2021 18:39
Have you run 'python -m pip install base45', or simply 'pip install base45'?
 
May 8, 2019 00:18
yes that's right I'm also in LA, I'm not much of a scraper but just familiar with it. Unfortunately I'm not familiar with "distill protected site".
May 8, 2019 00:16
Ah yes, using the Google tag (as you did correctly in the post) does return html with the <a href, we can get the href try using simple print(results[0]['href'])?
May 8, 2019 00:06
ok, if only need that href, I'll try to provide a solution, otherwise we can try more tomorrow. cheers
May 8, 2019 00:04
<a href="https://blahblah.com//link//asdfqwersdf" onclick="googleTag('click-listings-item-image');"> is not in results[0]
May 8, 2019 00:01
hm, when I print results[0], the output starts with <div class="results-panel-new col-sm-12">, the first line in your post that you want to extract is not displayed? see here: repl.it/@downshift/TransparentSuperbSystemsoftware Maybe this is why we're getting None.
May 7, 2019 23:46
hm, then results[0] may actually be None and not contain the html output displayed in the question? results[0] is really not empty? I'm at a loss.
May 7, 2019 23:46
which element is NoneType? is results_list or results_list.a None? I'm trying to reproduce your results: repl.it/@downshift/TransparentSuperbSystemsoftware
May 7, 2019 23:46
Ah yes, my bad. What about re-parsing results[0] as a BeautifulSoup html object: results_list = BeautifulSoup(results[0], "html.parser"); print(results_list.a['href'])?
May 7, 2019 23:46
what about html_source.a['href']?
 

Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Mar 16, 2019 00:33
check out that room Mikhail, probably find a lot of people doing interesting ML work