Hello! The code creates a database of more than 100 rows in SQLite, but only the first hundred open, while you can manually create new records in the created database. Probably worth some kind of restriction, but I do not see it point-blank. Help me please!

import urllib.request as ur from twurl import augment import json import sqlite3 conn = sqlite3.connect('status_new2.sqlite') cur = conn.cursor() cur.executescript(''' DROP TABLE IF EXISTS Status; CREATE TABLE Status ( title TEXT UNIQUE )''') print ("* Calling Twitter...") url = augment('https://api.twitter.com/1.1/statuses/user_timeline.json', {'screen_name': 'screenname', 'count': '200'} ) connection = ur.urlopen(url) data = connection.read().decode("utf-8") info = json.loads(data) for status in info: s = status["text"] cur.execute('''INSERT OR IGNORE INTO Status (title) VALUES ( ? )''', ( s, ) ) conn.commit() print("Done") 
  • What does "open" mean? For example, you put the data, and where is the code to get it? - m9_psy pm
  • After running the code, a database is created that is filled with more than 100 lines, but when I open the resulting database (just in the sqlite browser), only the first 100 lines are displayed there - Aranea
  • one
    So maybe this is a question for a content viewer? Run a simple SELECT COUNT (*) to find out how many rows are valid. Also, the question may relate to the Twitter API, because it can give the results page by page, and you could not take this into account. Or maybe even give a maximum of a hundred, regardless of your desire. - m9_psy pm
  • pages in the sqlite browser while one or you can go to the next? raw.githubusercontent.com/sqlitebrowser/sqlitebrowser/master ... ... - Igor
  • Save not all elements, but, for example, in batches of 50. Maybe you have sqlite assembled with a limit of 100 elements per insert (by default, like 999). Give the system version how to get the number of items. More details that we guess the tea leaves then? - FeroxTL

0