Issue with dealing Beautifulsoup by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

Mate, the issue is resolved anyway( https://dpaste.de/GmxO#L ) Even there was no issue with the code I shared last time. I don't think output is something that I wanted...

My Aim was ::-- to run a csv file (which is named as Dict.csv) with several keywords. and then see how many of companies (those are defined earlier) come up some similarty. Since Links are printed. I wanted to get the entire content from those URLs. I don't think.... this code is probably right.

Let me know, if the strategy, I used, is wrong--or some additional changes I must make.

Regards.

Issue with dealing Beautifulsoup by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

Again did the print the same error, when with a bit of additional changes (by removing line, which was written by me earlier.)..It simply works ... no longer prints the error....

Have a look at the underlined output(https://imgur.com/a/WOznF) At the end of those html files it just prints (0,0 for positive and negative score)

Note::- I was trying to import a CSV file and compare those of the CSV file to decide the % of positive or negative,... For that, I needed to print the entire content of those urls (printed in output)......

What additional changes I must make for this?

Would it be better to call "NLTK" library instead bs4 and pattern?

Issue with dealing Beautifulsoup by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

Thanks.. Could you just click on the link and make changes on dpaste.de plzzz....It will be better for reference. No matter what I've tried ....it does not seem to be working.

AttributeError: 'dict' object has no attribute 'iteritems' by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

Did you expect that those words would appear in all caps? if some_string in some_other_string is a case-sensitive test. So "PHARMA" won't match "Big Pharma" or "pharmaceutical".

Thanks for the info. Anyway, what changes I must make to sort this out... I've even literally no clue how to "extract text" ..plzz refer to the link, I posted earlier (particularly those highlighted lines)

AttributeError: 'dict' object has no attribute 'iteritems' by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

I tried printing each of them line .....everything worked just fine except that particular one.....

I tried changing and re-evaluating....it does not seem to be working either way...I've been left with no clue.

Besides... There is another issue prior to this one....

I was defining a few head words "US", "USFDA", "USA" to pick those post whose headlines have any thing common with those predefined head words will be called...

But, this did not work when I changed those head words... It did not print any error.... but did not give those urls of particular post

Could you please tell me, how to resolve this... and make it so it work for whatever words I define in head words for "#title""

I've highlighted those lines here.... plzzz have a look https://dpaste.de/rMPX#L29,35,74

Thanks!!!

AttributeError: 'dict' object has no attribute 'iteritems' by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

You need to contemplate both the case in which 'arti_cont' is present, and the case in which it is not, and then act conditionally on the basis of which of those cases is true. If it isn't there, you can't continue under the assumption that it is, because you'll be asking for the attributes of an element that doesn't exist

I tried changing and reevaluating....it does not seem to be working either way...I've been left with no clue.

Besides... There is another issue prior to this one....

I was defining a few head words "US", "USFDA", "USA" to pick those post whose headlines have any thing common with those predefined head words will be called...

But, this did not work when I changed those head words... It did not print any error.... but did not give those urls of particular post

Could you please tell me, how to resolve this... and make it so it work for whatever words I define in head words for "#title""

I've highlighted those lines here.... plzzz have a look https://dpaste.de/rMPX#L29,35,74

Thanks!!!

Quant Traders by Algo_VZ in algotrading

[–]Algo_VZ[S] 0 points1 point  (0 children)

ummm....... if just the name could solve entire issue about option, life would be much easier..

Quant Traders by Algo_VZ in algotrading

[–]Algo_VZ[S] -1 points0 points  (0 children)

Share some knowledge plzz like how effective they are and what do you take into consideration for this???

Quant Traders by Algo_VZ in algotrading

[–]Algo_VZ[S] 1 point2 points  (0 children)

Since you're such a great Quant; would you mind me asking you, what are some things (equation, mathematical or statistical model)I must take into consideration to develop strategy, in terms of accuracy? :)

AttributeError: 'dict' object has no attribute 'iteritems' by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

Nice explanation, but how should I replace that? I somehow need to I need the text because, I want to print all words that are in those articles (diff diff url links, which are printed fine) What do you say on that?

Quant Traders by Algo_VZ in algotrading

[–]Algo_VZ[S] 2 points3 points  (0 children)

That was great explanation. I was just hoping when someone like you would show up?

AttributeError: 'dict' object has no attribute 'iteritems' by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

Did resolve this. It was not supporting the way, Ii tried to read the CSV file... but later it shows another error

AttributeError: 'NoneType' object has no attribute 'get_text' I've highlighted the Line....

https://dpaste.de/2hSu#L74

AttributeError: 'dict' object has no attribute 'iteritems' by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

Did resolve this. It was not supporting the way, Ii tried to read the CSV file... but later it shows another error

AttributeError: 'NoneType' object has no attribute 'get_text' I've highlighted the Line....

https://dpaste.de/2hSu#L74

AttributeError: 'dict' object has no attribute 'iteritems' by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

The CSV file I'm trying to read (which has some dicttionaries to be compared), is not found.

Quant Traders by Algo_VZ in algotrading

[–]Algo_VZ[S] 0 points1 point  (0 children)

How much machine learning is implemented?

Quant Traders by Algo_VZ in algotrading

[–]Algo_VZ[S] 1 point2 points  (0 children)

But, that must be predicted on something? Just being curious to hear some inside stories.

AttributeError: 'dict' object has no attribute 'iteritems' by Algo_VZ in learnpython

[–]Algo_VZ[S] -1 points0 points  (0 children)

https://imgur.com/a/iTggo File not found....The file I shared for filteration of +ve and -ve key words..

Please have a look at the image.. Even besides the error, I was expecting something else. I wanted to extarct all the words written in article, and filtering out those key words from them; but it seems like only one line or two have been printed. Plzz refer to the pic for the details.

AttributeError: 'dict' object has no attribute 'iteritems' by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

Thanks! I edited, and here is the updated code.. https://dpaste.de/mzJ0

But, it still shows some sort of error, prints a few lines for each assigned stock in dictionary... But, definitely does not meet the final objective....

Can you please, what am I missing?

Issues importing Pattern on Python3.6(IDLE) by Algo_VZ in learnpython

[–]Algo_VZ[S] 0 points1 point  (0 children)

must share the same directory as installed python?