From fec93137b0f19fd8bbd083d7ec130f4a50d5db0f Mon Sep 17 00:00:00 2001 From: John Bohne Date: Mon, 3 Mar 2014 18:51:23 -0600 Subject: [PATCH] Removed anchor links from queue in ready_queue --- ready_queue.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ready_queue.py b/ready_queue.py index d390020..f280bc8 100644 --- a/ready_queue.py +++ b/ready_queue.py @@ -7,6 +7,9 @@ def ready_queue(address, html): links = linkregex.findall(html) queue = [] for link in links: + #no anchors i.e. video#title + if "#" in link: + continue if link.startswith("/"): queue.append('http://'+url[1]+link) elif link.startswith("http") or link.startswith("https"): @@ -16,4 +19,4 @@ def ready_queue(address, html): else: queue.append(urlparse.urljoin(url.geturl(),link)) return queue - \ No newline at end of file +