it helps when you don't reference [0] for two separate elements...
This commit is contained in:
parent
edf9bfc1f5
commit
67d89ff9eb
2
crawl.sh
2
crawl.sh
@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
cargo run -- https://discord.com 5 | python3 driver.py
|
||||
cargo run -- $1 1000 | python3 driver.py
|
||||
|
@ -14,13 +14,15 @@ async def main():
|
||||
# for line in ["https://oliveratkinson.net;->;http://google.com"]:
|
||||
|
||||
urls = line.split(";->;")
|
||||
ffrom = urls[0]
|
||||
to= urls[0]
|
||||
ffrom = urls[0].strip()
|
||||
to= urls[1].strip()
|
||||
|
||||
to_id = None
|
||||
from_id = None
|
||||
|
||||
print(ffrom, "->", to)
|
||||
if (ffrom == to):
|
||||
print('Site has self-reference, ignoring')
|
||||
continue
|
||||
|
||||
# FROM
|
||||
result = await db.query(f"SELECT id FROM website WHERE url='{ffrom}'")
|
||||
|
Loading…
Reference in New Issue
Block a user