Elive / periscope

Python module searching subtitles on the web. Used in plugins for the GNOME desktop.
http://code.google.com/p/periscope/
0 stars 1 forks source link

BeautifulSoup in python3 #3

Open triantares opened 2 years ago

triantares commented 2 years ago

Not sure if this relales to 'issue1' but ........ Shouldn't 'BeautifulSoup' be imported from 'bs4' in python3? i.e use all imports thus: "from bs4 import BeautifulSoup" ---------------------termial-snip------------- ack Beautiful periscope/plugins/Addic7ed.py 21:from BeautifulSoup import BeautifulSoup 97: soup = BeautifulSoup(content)

periscope/plugins/Podnapisi.py 22:from BeautifulSoup import BeautifulSoup 83: # Workaround for the Beautifulsoup 3.1 bug 85: soup = BeautifulSoup(content) 116: # Workaround for the Beautifulsoup 3.1 bug or HTML bugs 119: soup = BeautifulSoup(content)

periscope/plugins/TvSubtitles.py 9:import os, re, BeautifulSoup, urllib 269: soup = BeautifulSoup.BeautifulSoup(content) 294: soup = BeautifulSoup.BeautifulSoup(content) 314: soup2 = BeautifulSoup.BeautifulSoup(page2) 337: soup = BeautifulSoup.BeautifulSoup(content)

periscope/plugins/SubsWiki.py 21:from BeautifulSoup import BeautifulSoup 74: soup = BeautifulSoup(page)

periscope/plugins/SubDivX.py 27:from BeautifulSoup import BeautifulSoup 77: soup = BeautifulSoup(content) 112: soup = BeautifulSoup(content)

periscope/plugins/LegendasTV.py 35:from BeautifulSoup import BeautifulSoup, BeautifulStoneSoup 415: soup = BeautifulSoup(result)
532: soup = BeautifulSoup(result)
547: soup = BeautifulSoup(result)
572: soup = BeautifulSoup(result)
597: soup = BeautifulSoup(result)

periscope/plugins/SubScene.py 21:from BeautifulSoup import BeautifulSoup 92: soup = BeautifulSoup(page) 170: soup = BeautifulSoup(page)

periscope/plugins/Subtitulos.py 21:from BeautifulSoup import BeautifulSoup 70: soup = BeautifulSoup(content)

setup.py 15: install_requires = ["BeautifulSoup >= 3.2.0"] ----------------/terminal-snip-------------------------------------------------------

TheTechRobo commented 2 years ago

Already done that in my pull request

triantares commented 2 years ago

the 'setup.py' should have: install_requires = ["BeautifulSoup4 >= 4.9.0"]

TheTechRobo commented 2 years ago

Right, forgot.

I'll add you collaborator access so you can fix any bugs you find, as I'm busy with other projects. Not motivated to do this one because it's a mess. 🤕

TheTechRobo commented 2 years ago

Right, you should have an invitation now. :-)

triantares commented 2 years ago

When installing I get 'file periscope.py (for module periscope) not found' multiple times. Yet another stumbling block.

TheTechRobo commented 2 years ago

Oh, when installing. Dammit, I didn't think of that. Installation paths are probably different than the git repo.

Can you confirm that running bin/periscope works, though?

triantares commented 2 years ago

Can you confirm that running bin/periscope works, though? Same error as @Thanatermesis in his pastebin.

From installed path (/usr/local/bin/periscope): Traceback (most recent call last): File "/usr/local/bin/periscope", line 4, in import('pkg_resources').run_script('periscope==0.1.dev1', 'periscope') File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 651, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 1455, in run_script exec(script_code, namespace, namespace) File "/usr/local/lib/python3.9/dist-packages/periscope-0.1.dev1-py3.9.egg/EGG-INFO/scripts/periscope", line 191, in File "/usr/local/lib/python3.9/dist-packages/periscope-0.1.dev1-py3.9.egg/EGG-INFO/scripts/periscope", line 55, in main AttributeError: module 'periscope' has no attribute 'VERSION'

TheTechRobo commented 2 years ago

I meant from the git working directory. I know that one is fucked up.

I hate PEP 420.