renamed 'archive_media' and 'media' to avoid name collision, changed scope of test fixture controller to 'function' so that db is fresh for each executed test

This commit is contained in:
Tristan Lee
2022-03-09 13:19:35 -06:00
parent 739e1d8484
commit 6cf3b8842d
20 changed files with 130 additions and 125 deletions

View File

@@ -13,48 +13,48 @@ logger.add(sys.stderr, level="INFO")
logger.add("../russian_telegram_ingest.log")
test_channels = [
# Channel(
# id=0,
# name="QAnon Россия",
# platform_id=-1001319637748,
# category="Qanon",
# followers=94048,
# platform="Telegram",
# url="https://t.me/qanonrus",
# screenname="qanonrus",
# country="RU",
# influencer=None,
# public=True,
# chat=False,
# notes=""),
# Channel(
# id=1,
# name="The Great Awakening | Q",
# platform_id=-1001325597521,
# category="Qanon",
# followers=5715,
# platform="Telegram",
# url="https://t.me/greatawakin",
# screenname="greatawakin",
# country="RU",
# influencer=None,
# public=True,
# chat=False,
# notes=""),
# Channel(
# id=2,
# name="Великое Пробуждение",
# platform_id=-1001285898079,
# category="Qanon",
# followers=5861,
# platform="Telegram",
# url="https://t.me/greatawakeningrus",
# screenname="greatawakeningrus",
# country="RU",
# influencer=None,
# public=True,
# chat=False,
# notes=""),
Channel(
id=0,
name="QAnon Россия",
platform_id=-1001319637748,
category="Qanon",
followers=94048,
platform="Telegram",
url="https://t.me/qanonrus",
screenname="qanonrus",
country="RU",
influencer=None,
public=True,
chat=False,
notes=""),
Channel(
id=1,
name="The Great Awakening | Q",
platform_id=-1001325597521,
category="Qanon",
followers=5715,
platform="Telegram",
url="https://t.me/greatawakin",
screenname="greatawakin",
country="RU",
influencer=None,
public=True,
chat=False,
notes=""),
Channel(
id=2,
name="Великое Пробуждение",
platform_id=-1001285898079,
category="Qanon",
followers=5861,
platform="Telegram",
url="https://t.me/greatawakeningrus",
screenname="greatawakeningrus",
country="RU",
influencer=None,
public=True,
chat=False,
notes=""),
Channel(
id=3,
name="T🕊Редакция Президент Гордон🕊",
@@ -134,5 +134,5 @@ controller.register_scraper(telegram)
engine = create_engine('sqlite:///russian_telegram.db')
controller.connect_to_db(engine)
controller.scrape_channels(test_channels)
controller.scrape_channels(test_channels, archive_media = False)