commit
dcfa7039aa
3 changed files with 420 additions and 0 deletions
@ -0,0 +1,5 @@ |
||||
* |
||||
!.gitignore |
||||
!sraudio_streamlit.py |
||||
!app.py |
||||
!requirements.txt |
||||
@ -0,0 +1,52 @@ |
||||
import streamlit as st |
||||
import requests |
||||
from bs4 import BeautifulSoup |
||||
|
||||
|
||||
def download_content(url): |
||||
response = requests.get(url) |
||||
if response.status_code == 200: |
||||
with open("downloaded_content.txt", "wb") as file: |
||||
file.write(response.content) |
||||
st.success("Content downloaded successfully!") |
||||
else: |
||||
st.error("Failed to download content. Please check the URL.") |
||||
|
||||
def main(): |
||||
url_article = st.text_input('Adress till artikeln').strip() |
||||
if url_article == '': |
||||
st.stop() |
||||
else: |
||||
url_article |
||||
r = requests.get(url_article).content |
||||
soup = BeautifulSoup(r, "html.parser") |
||||
id = soup.find("button", { |
||||
"class": "details-button" |
||||
}).attrs["data-audio-id"] |
||||
|
||||
# Hitta länken till ljudet i Isidor |
||||
url = f"https://sverigesradio.se/playerajax/audio?id={id}&type=publication&quality=high" |
||||
|
||||
d = requests.get(url, headers={'Accept': 'application/json'}).json() |
||||
|
||||
comment = d["metadata"]["items"][0]["description"] + f' \n{url_article}' |
||||
|
||||
title = d["metadata"]["items"][0]["subtitle"] |
||||
filename = title + ".m4a" |
||||
|
||||
url = d["audioUrl"] |
||||
url |
||||
# Spara ljudet till en fil |
||||
r = requests.get(url) |
||||
# with open(file, "wb") as f: |
||||
# f.write(r.content) |
||||
|
||||
with open(filename, "wb") as f: |
||||
f.write(r.content) |
||||
|
||||
with open(filename, 'rb') as f: |
||||
st.download_button('Ladda ned ljudet', r.content, mime="audio/mpeg", file_name= filename) |
||||
|
||||
|
||||
if __name__ == "__main__": |
||||
main() |
||||
@ -0,0 +1,363 @@ |
||||
absl-py==1.3.0 |
||||
adbnx-adapter==0.0.0.2.5.1 |
||||
altair==4.2.2 |
||||
appdirs==1.4.4 |
||||
applescript==2021.2.9 |
||||
appnope==0.1.3 |
||||
argcomplete==1.10.3 |
||||
argon2-cffi==21.3.0 |
||||
argon2-cffi-bindings==21.2.0 |
||||
astroid==2.4.2 |
||||
asttokens==2.0.5 |
||||
astunparse==1.6.3 |
||||
async-generator==1.10 |
||||
attrs==21.4.0 |
||||
Babel==2.12.1 |
||||
backcall==0.2.0 |
||||
backports.zoneinfo==0.2.1 |
||||
banal==1.0.6 |
||||
bcrypt==3.2.0 |
||||
beautifulsoup4==4.8.2 |
||||
black==20.8b1 |
||||
bleach==5.0.0 |
||||
blinker==1.5 |
||||
blis==0.7.9 |
||||
Brotli==1.0.9 |
||||
cachetools==5.2.0 |
||||
caffeinate==0.1.0 |
||||
catalogue==2.0.7 |
||||
certifi==2020.12.5 |
||||
cffi==1.14.5 |
||||
chardet==3.0.4 |
||||
charset-normalizer==2.0.12 |
||||
click==8.1.3 |
||||
click-plugins==1.1.1 |
||||
cligj==0.7.2 |
||||
cmake==3.20.3 |
||||
colorama==0.4.4 |
||||
coloredlogs==15.0.1 |
||||
comm==0.1.3 |
||||
compressed-rtf==1.0.6 |
||||
confection==0.0.3 |
||||
configparser==5.2.0 |
||||
contourpy==1.0.6 |
||||
countrynames==1.14.3 |
||||
crayons==0.4.0 |
||||
cryptography==36.0.1 |
||||
cycler==0.11.0 |
||||
cymem==2.0.6 |
||||
Cython==0.29.32 |
||||
DateTime==4.3 |
||||
debugpy==1.6.6 |
||||
decorator==4.4.2 |
||||
defusedxml==0.7.1 |
||||
dill==0.3.4 |
||||
distlib==0.3.6 |
||||
distro==1.7.0 |
||||
dlib==19.22.0 |
||||
docker==4.4.1 |
||||
docx2txt==0.8 |
||||
dtw-python==1.3.0 |
||||
ebcdic==1.1.1 |
||||
EbookLib==0.17.1 |
||||
english==2020.7.0 |
||||
entrypoints==0.4 |
||||
et-xmlfile==1.0.1 |
||||
executing==0.8.3 |
||||
extract-msg==0.28.7 |
||||
face-recognition==1.3.0 |
||||
face-recognition-models==0.3.0 |
||||
fastjsonschema==2.15.3 |
||||
ffmpeg==1.4 |
||||
ffmpeg-python==0.2.0 |
||||
filelock==3.9.0 |
||||
fingerprints==1.0.3 |
||||
Fiona==1.9.0 |
||||
Flask==2.0.3 |
||||
flatbuffers==1.12 |
||||
followthemoney==3.3.0 |
||||
fonttools==4.38.0 |
||||
future==0.18.2 |
||||
gast==0.4.0 |
||||
geographiclib==1.52 |
||||
geopandas==0.12.2 |
||||
geopy==2.2.0 |
||||
gitdb==4.0.10 |
||||
GitPython==3.1.31 |
||||
gnureadline==8.0.0 |
||||
google-api-core==2.8.1 |
||||
google-auth==2.14.0 |
||||
google-auth-oauthlib==0.4.6 |
||||
google-cloud-core==2.3.0 |
||||
google-cloud-speech==2.14.0 |
||||
google-cloud-storage==2.3.0 |
||||
google-crc32c==1.3.0 |
||||
google-pasta==0.2.0 |
||||
google-resumable-media==2.3.3 |
||||
googleapis-common-protos==1.56.2 |
||||
greenlet==1.1.3.post0 |
||||
grpcio==1.46.3 |
||||
grpcio-status==1.46.3 |
||||
h11==0.13.0 |
||||
h5py==3.7.0 |
||||
huggingface-hub==0.12.1 |
||||
humanfriendly==10.0 |
||||
idna==2.10 |
||||
ijson==3.1.3 |
||||
imageio==2.9.0 |
||||
imageio-ffmpeg==0.4.3 |
||||
IMAPClient==2.1.0 |
||||
importlib-metadata==5.0.0 |
||||
importlib-resources==5.7.1 |
||||
instagram-private-api==1.6.0.0 |
||||
instagram-scraper==1.9.1 |
||||
install==1.3.4 |
||||
ipykernel==6.22.0 |
||||
ipython==8.3.0 |
||||
ipython-genutils==0.2.0 |
||||
ipywidgets==8.0.5 |
||||
isodate==0.6.1 |
||||
isort==5.7.0 |
||||
itsdangerous==2.1.2 |
||||
jdcal==1.4.1 |
||||
jedi==0.18.1 |
||||
Jinja2==3.1.0 |
||||
joblib==1.2.0 |
||||
json2html==1.3.0 |
||||
jsonschema==4.5.1 |
||||
jupyter==1.0.0 |
||||
jupyter-client==7.3.1 |
||||
jupyter-console==6.6.3 |
||||
jupyter_core==5.3.0 |
||||
jupyterlab-pygments==0.2.2 |
||||
jupyterlab-widgets==3.0.6 |
||||
keras==2.9.0 |
||||
Keras-Preprocessing==1.1.2 |
||||
kiwisolver==1.4.4 |
||||
langcodes==3.3.0 |
||||
languagecodes==1.1.1 |
||||
lazy-object-proxy==1.4.3 |
||||
Levenshtein==0.21.0 |
||||
libclang==14.0.6 |
||||
llvmlite==0.39.1 |
||||
lxml==4.6.2 |
||||
Markdown==3.4.1 |
||||
markdown-it-py==2.1.0 |
||||
MarkupSafe==2.1.1 |
||||
matplotlib==3.6.2 |
||||
matplotlib-inline==0.1.3 |
||||
mccabe==0.6.1 |
||||
mdurl==0.1.2 |
||||
mistune==0.8.4 |
||||
monotonic==1.5 |
||||
more-itertools==9.0.0 |
||||
moviepy==1.0.3 |
||||
mpmath==1.3.0 |
||||
munch==2.5.0 |
||||
murmurhash==1.0.7 |
||||
mutagen==1.45.1 |
||||
mypy-extensions==0.4.3 |
||||
nbclient==0.6.3 |
||||
nbconvert==6.5.0 |
||||
nbformat==5.4.0 |
||||
neo4j==4.2.1 |
||||
neotime==1.7.4 |
||||
nest-asyncio==1.5.5 |
||||
networkx==3.0 |
||||
neuralgym @ git+https://github.com/JiahuiYu/neuralgym@88292adb524186693a32404c0cfdc790426ea441 |
||||
nltk==3.8.1 |
||||
nmslib==2.1.1 |
||||
normality==2.3.3 |
||||
notebook==6.4.11 |
||||
numba==0.56.4 |
||||
numpy==1.23.5 |
||||
oauthlib==3.2.2 |
||||
olefile==0.46 |
||||
onnxruntime==1.14.1 |
||||
openai-whisper @ git+https://github.com/openai/whisper.git@248b6cb124225dd263bb9bd32d060b6517e067f8 |
||||
opencv-python==4.5.2.54 |
||||
openpyxl==3.1.2 |
||||
opt-einsum==3.3.0 |
||||
orjson==3.8.11 |
||||
outcome==1.1.0 |
||||
packaging==21.3 |
||||
pandarallel==1.6.1 |
||||
pandas==1.5.3 |
||||
pandocfilters==1.5.0 |
||||
pansi==2020.7.3 |
||||
pantomime==0.6.0 |
||||
paramiko==2.9.2 |
||||
parso==0.8.3 |
||||
pathspec==0.8.1 |
||||
pathy==0.6.1 |
||||
pdfminer.six==20191110 |
||||
pexpect==4.8.0 |
||||
phonenumbers==8.13.11 |
||||
pi==0.1.2 |
||||
pickleshare==0.7.5 |
||||
Pillow==8.1.0 |
||||
platformdirs==2.6.2 |
||||
playsound==1.3.0 |
||||
prefixdate==0.4.1 |
||||
preshed==3.0.6 |
||||
prettytable==0.7.2 |
||||
proglog==0.1.9 |
||||
prometheus-client==0.14.1 |
||||
prompt-toolkit==3.0.38 |
||||
proto-plus==1.20.5 |
||||
protobuf==3.19.6 |
||||
psutil==5.9.0 |
||||
psycopg2-binary==2.8.4 |
||||
ptyprocess==0.7.0 |
||||
pure-eval==0.2.2 |
||||
py2neo==2020.1.1 |
||||
pyArango==1.3.4 |
||||
pyarrow==11.0.0 |
||||
pyasn1==0.4.8 |
||||
pyasn1-modules==0.2.8 |
||||
pybind11==2.6.1 |
||||
pycparser==2.20 |
||||
pycryptodome==3.14.1 |
||||
pycryptodomex==3.15.0 |
||||
pydantic==1.8.2 |
||||
pydeck==0.8.0 |
||||
pydub==0.25.1 |
||||
Pygments==2.14.0 |
||||
PyICU==2.9 |
||||
PyJWT==2.0.1 |
||||
pylint==2.6.0 |
||||
Pympler==1.0.1 |
||||
PyMuPDF==1.19.6 |
||||
PyNaCl==1.4.0 |
||||
pynput==1.7.6 |
||||
pyobjc-core==9.0.1 |
||||
pyobjc-framework-ApplicationServices==9.0.1 |
||||
pyobjc-framework-Cocoa==9.0.1 |
||||
pyobjc-framework-Quartz==9.0.1 |
||||
pyOpenSSL==22.0.0 |
||||
pyparsing==3.0.9 |
||||
PyPDF2==1.26.0 |
||||
pyperclip==1.8.2 |
||||
pyproj==3.4.1 |
||||
pyreadline==2.1 |
||||
pyrsistent==0.18.1 |
||||
PySocks==1.7.1 |
||||
PySoundFile==0.9.0.post1 |
||||
python-arango==7.3.2 |
||||
python-dateutil==2.8.2 |
||||
python-Levenshtein==0.21.0 |
||||
python-pptx==0.6.21 |
||||
python-stdnum==1.18 |
||||
pytube==12.1.0 |
||||
pytz==2022.6 |
||||
pytz-deprecation-shim==0.1.0.post0 |
||||
PyYAML==6.0 |
||||
pyzmq==23.0.0 |
||||
qtconsole==5.4.1 |
||||
QtPy==2.3.0 |
||||
rapidfuzz==3.0.0 |
||||
rdflib==6.2.0 |
||||
regex==2022.10.31 |
||||
requests==2.27.1 |
||||
requests-oauthlib==1.3.1 |
||||
requests-toolbelt==0.9.1 |
||||
rich==13.3.1 |
||||
rise==5.7.1 |
||||
robobrowser==0.5.3 |
||||
rsa==4.9 |
||||
scikit-learn==1.1.1 |
||||
scipy==1.8.1 |
||||
seaborn==0.12.2 |
||||
selenium==4.1.0 |
||||
semver==2.13.0 |
||||
Send2Trash==1.8.0 |
||||
setuptools-scm==5.0.2 |
||||
shapely==2.0.1 |
||||
six==1.15.0 |
||||
sklearn==0.0.post1 |
||||
smart-open==5.2.1 |
||||
smmap==5.0.0 |
||||
sniffio==1.2.0 |
||||
sortedcontainers==2.4.0 |
||||
SoundFile==0.10.3.post1 |
||||
soupsieve==2.2 |
||||
sox==1.4.1 |
||||
spacy==3.4.2 |
||||
spacy-legacy==3.0.10 |
||||
spacy-loggers==1.0.2 |
||||
SpeechRecognition==3.8.1 |
||||
SQLAlchemy==1.4.43 |
||||
sqlalchemy2-stubs==0.0.2a34 |
||||
srsly==2.4.3 |
||||
sshtunnel==0.4.0 |
||||
stack-data==0.2.0 |
||||
streamlit==1.22.0 |
||||
stringcase==1.2.0 |
||||
style==1.1.0 |
||||
summarizer==0.0.7 |
||||
sv-core-news-lg @ https://github.com/explosion/spacy-models/releases/download/sv_core_news_lg-3.3.0/sv_core_news_lg-3.3.0-py3-none-any.whl |
||||
sympy==1.11.1 |
||||
tabula==1.0.5 |
||||
tabula-py==2.3.0 |
||||
tenacity==8.2.2 |
||||
tensorboard==2.9.1 |
||||
tensorboard-data-server==0.6.1 |
||||
tensorboard-plugin-wit==1.8.1 |
||||
tensorflow-addons @ file:///Users/Lasse/Downloads/tensorflow_addons-0.18.0-cp38-cp38-macosx_12_0_arm64.whl |
||||
tensorflow-estimator==2.9.0 |
||||
tensorflow-hub==0.12.0 |
||||
tensorflow-io-gcs-filesystem==0.27.0 |
||||
tensorflow-macos==2.9.0 |
||||
tensorflow-metal==0.5.0 |
||||
tensorflow-text @ file:///Users/Lasse/text/tensorflow_text-2.10.0-cp38-cp38-macosx_11_0_arm64.whl |
||||
termcolor==2.1.0 |
||||
terminado==0.15.0 |
||||
text-unidecode==1.3 |
||||
textract==1.6.4 |
||||
thinc==8.1.5 |
||||
thinc-apple-ops==0.1.2 |
||||
threadpoolctl==3.1.0 |
||||
tiktoken==0.3.1 |
||||
tinycss2==1.1.1 |
||||
tokenizers==0.13.2 |
||||
toml==0.10.2 |
||||
toolz==0.12.0 |
||||
torch==1.13.1 |
||||
torchaudio==0.13.1 |
||||
tornado==6.1 |
||||
tqdm==4.56.0 |
||||
traitlets==5.9.0 |
||||
transformers==4.26.1 |
||||
trio==0.19.0 |
||||
trio-websocket==0.9.2 |
||||
typed-ast==1.4.2 |
||||
typeguard==2.13.3 |
||||
typer==0.4.1 |
||||
types-PyYAML==6.0.12.9 |
||||
typing_extensions==4.5.0 |
||||
tzdata==2021.5 |
||||
tzlocal==4.1 |
||||
update==0.0.1 |
||||
urllib3==1.26.9 |
||||
validators==0.20.0 |
||||
virtualenv==20.17.1 |
||||
wasabi==0.9.1 |
||||
watchdog==2.2.1 |
||||
wcwidth==0.2.5 |
||||
webdriver-manager==3.5.2 |
||||
webencodings==0.5.1 |
||||
websocket-client==0.57.0 |
||||
websockets==10.3 |
||||
Werkzeug==2.2.2 |
||||
whisper-timestamped @ git+https://github.com/linto-ai/whisper-timestamped@2c55305d6aa53f0c0fa1fe63fc85c33bfa60e963 |
||||
whispercpp @ git+https://github.com/aarnphm/whispercpp.git@2117718c2b817c37dc18888bad322690b541749b |
||||
widgetsnbextension==4.0.6 |
||||
wrapt==1.12.1 |
||||
wsproto==1.0.0 |
||||
xlrd==2.0.1 |
||||
XlsxWriter==1.2.9 |
||||
yapf==0.32.0 |
||||
youtube-dl==2021.12.17 |
||||
yt-dlp==2022.9.1 |
||||
zipp==3.10.0 |
||||
zope.interface==5.2.0 |
||||
Loading…
Reference in new issue