Quote:
|
Originally Posted by zem52887
any other options? is "a" even viable? is it possible to have two if statements in one return function and is that a good way of approaching it... similar to the if statement we have for financial information. Only, this if statement would skip links in brackets...
|
Take a look at the links themselves.
Here's a normal link:
http://us.rd.yahoo.com/finance/indus...01/101292.html
And here's a ticker link:
http://us.rd.yahoo.com/finance/indus...o.com/q?s=EDEN
So far as I can see, all the ticker links have "q?s" in, and the normal links do not. The links are all in a standard format, so far as I can see, so presumable one could just add another "if" condition to the list comprehension:
return [a['href'] for a in urls if "q?s" not in a['href'] and ...]
Quote:
|
Originally Posted by zem52887
also, I ran it and just had it continue after the errors from running the bracketed functions, and the script stopped after the first industry. No errors, just stopped, any ideas?
|
If you're running the script with "sys.exit" in, it's exiting because sys.exit tells it to do so. Otherwise, I need more information to give any suggestions on the problem.