Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9318715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T03:11:56+00:00 2026-06-19T03:11:56+00:00

I am using following code to scrape data from a tabular structure present on

  • 0

I am using following code to scrape data from a tabular structure present on a webpage using beautiful Soup:

# -*- coding: cp1252 -*-
import csv
import urllib2
import sys
import urllib
import time
import mechanize
from bs4 import BeautifulSoup
from itertools import islice


page = urllib2.urlopen('http://www.t-mobile.de/tarifuebersicht-telefonieren-und-surfen/0,23786,25241-_,00.html#grp=0&dev=0').read()
soup = BeautifulSoup(page)
for row in soup('table', {'class' : 'wloCol5'}).tbody('tr'):
    tds = row['td']
    print tds

This code is giving me AttributeError: 'ResultSet' object has no attribute 'tbody' error. I am using similar code for another webpage which is running without any glitches. Please advise what may be the issue with this code/webpage structure which is causing this error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T03:11:58+00:00Added an answer on June 19, 2026 at 3:11 am

    The call soup('table', {...}) finds more that one table, so it returns a list-like object.

    Try something like:

    for table in soup('table', {...}):
        for tr in table("tr"):
            ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using following code to scrape data from a website. # -*- coding:
I've been using the following code to scrape keywords from Google: $data=file_get_contents('http://clients1.google.com/complete/search?hl=en&gl=us&q='.$keyword); However, my
Using the following code I am trying to scrape a call log from our
I am currently trying to do a screen scrape using the following code: HttpWebRequest
I am using following code to get bitmap from url. This function is used
I'm using the following code to scrape an eBay listing using the scrAPI gem:
I am scraping data from following html structure from 30-40 webpages like these https://www.o2.co.uk/shop/tariffs/sony/xperia-z-purple/
I am using javascript, using regex to scrape images from html code. I want
I'm trying to scrape data from the table at the following url: http://www.nfpa.org/itemDetail.asp?categoryID=953&itemID=23033 The
I am using Beautiful Soup to try and scrape a page. I am trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.