question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

opening .jl file command doesn't show 'my_output_file.jl'

See original GitHub issue

My apologies in advance, I am still a python padawan. I swept through the documentation but couldn’t find an answer.

I am assuming that after i run;

import advertools as adv
adv.crawl('https://example.com', 'my_output_file.jl', follow_links=True)

and then

import pandas as pd
crawl_df = pd.read_json('my_output_file.jl', lines=True)

I am supposed to see the data from the scrape? (I did put in a real URL, and the output file is a 1.6MB .jl file was created. But when I run that cell, nothing happens. No errors but no data either. I am testing this in a jupyter notebook… all requirements are installed etc.

Also, if I may, as an SEO practitioner, how do I output these results into a CSV file that can viewed in excel or google sheets for further analysis? If you’re willing, can you provide an example command as to how to convert the .jl file to .csv? I tried to install json-lines but apparently it’s no longer supported. I assume what I need is to import csv but as far as how to structure it to encapsulate the data with column headers etc is a bit intimidating.

Thanks

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
eliasdabbascommented, Dec 1, 2022

The read_json function reads the jsonlines file and converts it to a DataFrame. It’s all handled by default, so there is nothing to worry about. Once you have a DataFrame, you can easily convert it to another file format if needed.

Can you please try running the code on one of the online notebook services like Google Colab or Kaggle and let me know what happens?

If you do so and still have issues, please share access to the notebook, and I’ll look into it.

0reactions
eliasdabbascommented, Dec 13, 2022

At least we have some time to do some work before GPT takes over everything hahahaha…

Yes, it’s correct, but there’s no need for the orient parameter.

Try it on one of the online platforms and feel free to re-open the issue if you still have problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running Julia .jl files - Stack Overflow
I'm wondering if it's a problem with my compiler, so I thought I would try compiling it in the default julia shell found...
Read more >
Additional file extensions for deploying julia scripts/apps #34759
Case 1: Deploy julia scripts to "clicky" end users (e.g. Windows). Let them install Julia and send them the script file. Then, just...
Read more >
How to Run a Julia Program / Script from Command Prompt in ...
In this tutorial, you will learn to Run a Julia ( julialang ) program / script from command prompt in windows 10.
Read more >
First steps: Start Julia in a certain folder in VSCode
a. Run the command “Julia: Start REPL” (from the command palette: Ctrl+Shift+P). b. Default keybinding: Alt+J, Alt+O.
Read more >
Running Code · Julia in VS Code
program : a path to a .jl file. This is the Julia file that will be run when this launch configuration is used....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found