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

  • SEARCH
  • Home
  • 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 6909051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:38:25+00:00 2026-05-27T08:38:25+00:00

I changed how my script was getting it’s list and somehow I broke the

  • 0

I changed how my script was getting it’s list and somehow I broke the Gdata-API

sys.argv[1] is a text file of urls like this

The error starts when I comment out Part 1 & 2 and Add 3. When I Remove 3 and Uncomment Part 1 & 2 it works again.

Relevant code:

# PART 1 - parse bookmarks.html
#with open(sys.argv[1]) as bookmark_file:
#    soup = BeautifulSoup(bookmark_file.read())

# PART 2 - extract youtube video urls
#video_url_regex = re.compile('http://www.youtube.com/watch')
#urls = [link['href'] for link in soup('a', href=video_url_regex)]

# PART 3 - parse text file
urls = open(sys.argv[1]).readlines()

Error I get now:

Traceback (most recent call last):
  File "listtest.py", line 81, in <module>
    comments = comments.total_results.text
AttributeError: 'NoneType' object has no attribute 'total_results'

I’d like to continue getting the Total Comments field. Thanks.

Full Code:
http://pastebin.com/1yZdEySW

EDIT: One URL in a text file is fine. When the text file is increased to two or more items then the error is reproduced.

  • 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-05-27T08:38:25+00:00Added an answer on May 27, 2026 at 8:38 am

    I assigned urls to be:

    urls = ['http://www.youtube.com/watch?v=_wmD3M-BfVo']
    

    (Yeah, it’s T-Pain music video)
    And it worked just fine. You most likely have a problem with the file you’re opening or the parsing of the contents of that file. Or you just plain aren’t parsing it right. In any event, you’re getting comments assigned to none because you’re not passing valid ids in.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following event is not getting invoked: <script> $(#inputTxt).change(function() { alert(changed); }); </script> The
I am running 1.5.25 and somehow a .htaccess file keeps getting created on my
The following script works fine: $(#regform).validate().showErrors({username:message}); After I changed the script to the below
The .NET Security Policy can be changed from a script by using CasPol.exe .
I've got a script that changes the background colour of text that has been
I tried http://www.mail-archive.com/rebol-list@rebol.com/msg19437.html (I just changed to www.reboltutorial.com) : do http://www.rebol.it/giesse/async-protocol.r handler: func [port
Script below is not working. Not getting any php error messages. Had asked a
I have to do a site redirect through script for about 10 different URLS
I used the following code: <script type=text/javascript> function validate() { if ((document.changepass.newpassword.value != '')
I'm having trouble getting my content script to communicate with my background page. I'm

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.