On Thu, Sep 18, 2014 at 6:10 PM, Peter Otten <__pete...@web.de> wrote:
>
> The doesn't have an href attribute, its child has. Try
>
> [a.attrs["href"] for a in s.select("div.authorline a")]
OMG, I completely forgot about the 'a'... http://goo.gl/A8sRLT
Thanks! 100% Working.
___
Juan Christian wrote:
> My code:
>
> import requests
> import bs4
>
>
> FORUM_ID = "440"
>
> response = requests.get('
> http://steamcommunity.com/app/{id}/tradingforum'.format(id = FORUM_ID))
> soup = bs4.BeautifulSoup(response.text)
> topics = [a.attrs.get('href') for a in
> soup.select('a.f
My code:
import requests
import bs4
FORUM_ID = "440"
response = requests.get('
http://steamcommunity.com/app/{id}/tradingforum'.format(id = FORUM_ID))
soup = bs4.BeautifulSoup(response.text)
topics = [a.attrs.get('href') for a in soup.select('a.forum_topic_overlay')]
for topic in topics:
r = r