last day (16 days later) » 

23:46
0
Q: BeautifulSoup - Find link in this HTML

maxutilHere's my code to get html from bs4 import BeautifulSoup import urllib.request from fake_useragent import UserAgent url = "https://blahblah.com" ua = UserAgent() ran_header = ua.random req = urllib.request.Request(url,data=None,headers={'User-Agent': ran_header}) uClient = urllib.request.urlope...

what about html_source.a['href']?
That's giving me an href, but one that occurs much earlier on the page. The reason for results is to isolate down to the listings that I care about.
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'])?
I'm getting TypeError: 'NoneType' object is not callable
which element is NoneType? is results_list or results_list.a None? I'm trying to reproduce your results: repl.it/@downshift/TransparentSuperbSystemsoftware
23:46
I got that error when doing the first line results_list = BeautifulSoup(results[0], "html.parser") so results_list
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.
once you pull results = html_source.findAll("div",{"class":"results-panel-new col-sm-12"})
the code for results[0] is as I posted

  last day (16 days later) »